Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #919013

    Hi,

    I’m trying to add a Code Block to a page that has its own page template. The template is actually a literal copy of the original page.php file, except it has an extra <?php /* Template Name: Alternate */ ?> just to declare its name, and the filename is different, of course (it’s page-alternate.php).

    The result on the front end is the following, instead of whatever I write in the Code Block:
    [avia_codeblock_placeholder uid=”0″]

    I’ve read other topics where the answer was “ALB doesn’t play well with templates”, but that doesn’t help!
    My question is: Is there a fix to this?
    How can I have the Code Block work in my template exactly as expected? (i.e. work the same as the default template)

    Thanks

    • This topic was modified 6 years, 9 months ago by kidcabide. Reason: Clarification of the question
    #919415

    Hey kidcabide,

    Please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply. Also please point out where we can see the problem you are referring to.

    Best regards,
    Rikard

    #921508
    This reply has been marked as private.
    #922058

    Hi,

    Thank you for the info. You have to duplicate the template-builder.php instead of the page.php file. This template renders the shortcodes inside the advance layout builder. The current template should work fine if you switch to the default editor.

    Best regards,
    Ismael

    #922931

    Hi Ismael,

    I’m not sure I understand, sorry.
    So if I want to create a custom template called “Example”, that I can apply to a page, I can/should do it through the template-builder.php instead of creating a page-example.php file, is that it?

    Thanks

    #922985

    Hi kidcabide,

    If that template is to be used with Advanced Layout Builder – yes, correct. The Default editor uses page.php and the Advanced Layout Builder uses template-builder.php.

    If you need further assistance please let us know.
    Best regards,
    Victoria

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.