June 3rd, 2021 at 11:45 #118539
Hi, the pages linked to my Featured Icon Blocks contain a single image gallery which shows up perfectly in the FIB when I choose the option ‘blocks content/full content’ and produces the effect that I want. I would like to add text to the linked pages underneath the image gallery without this text showing in the FIB. Is there any way to achieve this objective? Many thanks for your help past and present.June 6th, 2021 at 21:38 #118643ZedCryout Creations mastermind
The Featured Icon Blocks are capable of displaying either an excerpt (either automatically generated or entered manually) or the full content. WordPress itself doesn’t provide a third field beside the excerpt/content that the theme could use there.
For most cases, entering a manual excerpt resolves the situation where the excerpt displayed in the block needs to be different from the page content, however I’m not sure it would be possible to make the excerpt display a gallery – entering the gallery markup manually is overly complicated, and the default WP galleries don’t have shortcodes to include them by.June 9th, 2021 at 14:48 #118745
Your reply put me on the right track. My gallery plugin does create shortcode. By enabling manual excerpts on the pages: add_post_type_support( ‘page’, ‘excerpt’ ); and by enabling the use of shortcode in the excerpt: add_filter(‘get_the_excerpt’, ‘do_shortcode’);
and by inserting the gallery shortcode in the manual excerpt field the gallery is displayed in the featured icon box. I have not extensively tested this yet but on the face of it this seems to work without any problems. Thanks for your thoughts.
You need to log in to reply to this topic.