WPIntell

Source evidence

Shortcode option?

Easy Quotes · support · 2024-05-21T19:28:00+00:00

mixedsentiment
mediumseverity
0.84relevance
5replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

2 / 21 rows with source links

9.5% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

19 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
gotequity resolved
Hi Jürgen, I’m interested in using this in the header of an older theme that isn’t built on blocks. Is there an option to integrate via shortcode or template tag? Thanks! Hi gotequity, normaly not. But I think it could be possible, if you can access an easy-quotes gutenberg block on a page or a post to create your “shortode”/”block-shortcode”. Add an easy quotes gutenberg block configure all your settings switch to Code editor (On the screens upper right corner, right of the post/page “update” button, the 3 vertical dots. Switch from “Visual editor” to “Code editor” Then you should see somthing like that. <!-- wp:layart/quotes-block {"isShowStars":true,"isShowRating":true,"selectedFontsCategory":"4","fontFamily":{"family":"Hachi Maru Pop","version":"v10","category_id":"4","family_slug":"hachimarupop","variant":{"id":1,"file":"~ChAKDkhhY2hpIE1hcnUgUG9wIAAqBAgBGAE=.ttf"}}} /--> Now you should be able to add this as “html” or with a template hook to your header. I didn’t tested it, so if you try it, it would be nice to get some feedback if it’s working… 🙂 Have a nice day Jürgen Hi Jürgen, I added an HTML file to my theme containing the widget code, which I’m calling with a php include statement in header.php. In testing, I discovered the quotes block is output to the header only when the widget is active on the same page – if the widget is deleted, moved to inactive, or present on another page, the quotes block fails to render. Another approach I tested was to replace the widget code in my HTML file with the rendered HTML copied from page source. The good news it this method doesn’t require an active widget to render the quotes block, however the downside is that it only loops once. If there was a way to infinitely repeat the loop using rendered HTML, this would be sufficient, however I don’t want to start manipulating core plugin files to achieve my objective. I’d certainly appreciate any thoughts or additional suggestions you can provide to make it work. Thanks! Nice, I think you are nearly there! 🙂 For me it works if I include the block-code like this in the header.php echo do_blocks('<!-- wp:layart/quotes-block {"viewMode":"rotation","fontFamily":{"family":"Shadows Into Light","version":"v10","category_id":"4","family_slug":"shadowsintolight","variant":{"id":1,"file":"UqyNK9UOIntux_czAvDQx_ZcHqZXBNQDcsr4xzSMYA.ttf"}}} /-->'); This reply was modified 2 years ago by Jürgen Müller . Yes, this works perfectly. Thank you Jürgen! Cool! 🙂 Glad it works!

Comments

5 shown
Jürgen Müller 2024-05-22T05:40:00+00:00

Hi gotequity, normaly not. But I think it could be possible, if you can access an easy-quotes gutenberg block on a page or a post to create your “shortode”/”block-shortcode”. Add an easy quotes gutenberg block configure all your settings switch to Code editor (On the screens upper right corner, right of the post/page “update” button, the 3 vertical dots. Switch from “Visual editor” to “Code editor” Then you should see somthing like that. <!-- wp:layart/quotes-block {"isShowStars":true,"isShowRating":true,"selectedFontsCategory":"4","fontFamily":{"family":"Hachi Maru Pop","version":"v10","category_id":"4","family_slug":"hachimarupop","variant":{"id":1,"file":"~ChAKDkhhY2hpIE1hcnUgUG9wIAAqBAgBGAE=.ttf"}}} /--> Now you should be able to add this as “html” or with a template hook to your header. I didn’t tested it, so if you try it, it would be nice to get some feedback if it’s working… 🙂 Have a nice day Jürgen

gotequity 2024-05-22T15:04:00+00:00

Hi Jürgen, I added an HTML file to my theme containing the widget code, which I’m calling with a php include statement in header.php. In testing, I discovered the quotes block is output to the header only when the widget is active on the same page – if the widget is deleted, moved to inactive, or present on another page, the quotes block fails to render. Another approach I tested was to replace the widget code in my HTML file with the rendered HTML copied from page source. The good news it this method doesn’t require an active widget to render the quotes block, however the downside is that it only loops once. If there was a way to infinitely repeat the loop using rendered HTML, this would be sufficient, however I don’t want to start manipulating core plugin files to achieve my objective. I’d certainly appreciate any thoughts or additional suggestions you can provide to make it work. Thanks!

Jürgen Müller 2024-05-22T16:41:00+00:00

Nice, I think you are nearly there! 🙂 For me it works if I include the block-code like this in the header.php echo do_blocks('<!-- wp:layart/quotes-block {"viewMode":"rotation","fontFamily":{"family":"Shadows Into Light","version":"v10","category_id":"4","family_slug":"shadowsintolight","variant":{"id":1,"file":"UqyNK9UOIntux_czAvDQx_ZcHqZXBNQDcsr4xzSMYA.ttf"}}} /-->'); This reply was modified 2 years ago by Jürgen Müller .

gotequity 2024-05-22T17:51:00+00:00

Yes, this works perfectly. Thank you Jürgen!

Jürgen Müller 2024-05-23T05:48:00+00:00

Cool! 🙂 Glad it works!