Does the Enfold theme have anything equivalent to “Reusable Blocks” ? There is a “Template” mechanism and it does not allow propagating changes, unlike the “Reusable Blocks”. For example, if i save a collection of paragraphs as a Template and add it to a number of other pages, once i make changes to the paragraphs on the original page, these changes won’t appear on all pages as part of the template.
One workaround that i can think of is to
1: Create a Template component based on a collection of components using the Advanced Editor on a test page.
2: Switch to Gutenberg editor (default editor) and save the content of the page as a Reusable Block.
3: As all of the pages have already been built with the Advanced editor, it is not possible to add a the Gutenberg reusable block to them. So
PHP could be used to load the Reusable Block.
My question is: where can i place the block of php code to load the reusable block such that it appears as part of the page content ?
Code sample:
add_action(‘get_footer’, ‘load_reusable’);
function load_reusable() {
$gblock = get_post( $id_of_desired_post);
echo apply_filters( ‘the_content’, $gblock->post_content );
}
Thanks!!
Hey Courtney,
Normal content would work with the Page Content element for instance, I think that is what you are looking for. But PHP code is not supported, and I don’t think it’s supported in Gutenberg either?
Looking at your code, I think you are trying to get a different footer than the regular footer? If so then please refer to my reply in your other thread.
Best regards,
Rikard