Title: Shortcode option?
Last modified: May 21, 2024

---

# Shortcode option?

 *  Resolved [gotequity](https://wordpress.org/support/users/gotequity/)
 * (@gotequity)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-option-10/)
 * 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!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Jürgen Müller](https://wordpress.org/support/users/juergen74/)
 * (@juergen74)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-option-10/#post-17772094)
 * 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-block-code
       <!-- 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
 *  Thread Starter [gotequity](https://wordpress.org/support/users/gotequity/)
 * (@gotequity)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-option-10/#post-17773655)
 * 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!
 *  Plugin Author [Jürgen Müller](https://wordpress.org/support/users/juergen74/)
 * (@juergen74)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-option-10/#post-17773915)
 * Nice, I think you are nearly there! 🙂
   For me it works if I include the block-
   code like this in the header.php
 *     ```wp-block-code
       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](https://wordpress.org/support/users/juergen74/).
 *  Thread Starter [gotequity](https://wordpress.org/support/users/gotequity/)
 * (@gotequity)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-option-10/#post-17774072)
 * Yes, this works perfectly. Thank you Jürgen!
 *  Plugin Author [Jürgen Müller](https://wordpress.org/support/users/juergen74/)
 * (@juergen74)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-option-10/#post-17774915)
 * Cool! 🙂 Glad it works!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Shortcode option?’ is closed to new replies.

 * ![](https://ps.w.org/easy-quotes/assets/icon.svg?rev=2609861)
 * [Easy Quotes](https://wordpress.org/plugins/easy-quotes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-quotes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-quotes/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-quotes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-quotes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-quotes/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Jürgen Müller](https://wordpress.org/support/users/juergen74/)
 * Last activity: [2 years ago](https://wordpress.org/support/topic/shortcode-option-10/#post-17774915)
 * Status: resolved