Tagged: Code block, page content
-
AuthorPosts
-
September 23, 2018 at 1:57 am #1013178
I have a page that has a table and a code block.
When I use the Page Content element on another page to nest page 1 into page 2… The code block doesn’t work. I just get: [avia_codeblock_placeholder uid=”0″]
September 23, 2018 at 8:51 am #1013244Hey ahouglum,
Please open up enfold/config-templatebuilder/avia-shortcodes/codeblock.php (you can use the wordpress code editor – Appearance > Editor) and delete the entire code in the file. Then copy the code from here: https://pastebin.com/raw/6UgNAdLx into the file and save it. This should fix the issue. The next theme update will contain the fix.
Best regards,
PeterSeptember 24, 2018 at 8:51 pm #1013839This didn’t work. On the page where the page is included we still don’t have the codeblock processed rather we see
[avia_codeblock_placeholder uid=”0″]
Again, to replicate this error:
1. Make a page with a codeblock that has some javascript or css in it – call it “Page 1”
2. Make a page (“Page 2”) that used the “Page Content Element” to include Page 1 into Page 2You will see the shortcode of the codeblock and the code block isn’t processed.
September 26, 2018 at 11:31 am #1014671Hi,
Thank you for reporting this. I will have a look into it asap and will come back when we have a solution.
Best regards,
GünterOctober 2, 2018 at 4:54 pm #1017146Hi,
In file enfold/config-templatebuilder/avia-shortcodes/codeblock.php line 258:
add_filter('avia_builder_precompile', array($this, 'code_block_extraction'), 1, 1);
Replace this line with:
add_filter('avia_builder_precompile', array($this, 'code_block_extraction'), 10, 1);
This should fix the problem. I added this fix for the next update.
Best regards,
GünterOctober 6, 2018 at 4:52 pm #1018523Great, this from Günter works! One question, how can i get his into the functions.php so that it doesn’t get overrided if the theme gets updated? What do i have to exactly put into there?
Thanks for helping me out!
- This reply was modified 6 years, 1 month ago by ronaldalexander.
October 8, 2018 at 1:09 pm #1018959Hi,
Glad we could help you.
The fix is already merged for the next update 4.5. So you need not do anything when you update to this version.
Adding that fix to the functions.php is not possible. If you have a child theme you can copy the modified file to the child theme shortcodes folder.
If you need further assistance feel free to open a new topic – I will close this one for now.
Enjoy the theme and have a nice day.
Best regards,
Günter -
AuthorPosts
- The topic ‘Code Block not working with Page Content’ is closed to new replies.