Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1198188

    Good day. I am trying to make an edit to the Magazine content item following the instructions from this support article:
    https://kriesi.at/support/topic/enfold-magazine-post-with-link-format-does-run/#post-435156

    Basically I want the link for Magazine items to go to the URL I placed in the post after setting the post to the “Link” format. Magazine does not work like this, but the instructions on the support article above does make it work the way I want.

    That support article provides instructions for modifying two files: functions.php and magazine.php (located here: config-templatebuilder/avia-shortcodes/magazine)

    I follow the instructions and edited the “functions.php” file in the CHILD theme, and the “magazine.php” I copied to the CHILD theme, but it will not work.

    However, when I edit the “functions.php” file in the CHILD theme, and the “magazine.php” I in the PARENT theme, it works perfect.

    Something is not working when I make the edit to the “magazine.php” file I copied to the CHILD theme. Does this make sense? Do I also have to create the same exact folder structure in the CHILD them as the PARENT theme and put the “magazine.php” file in that same exact folder structure in the CHILD theme (which is config-templatebuilder/avia-shortcodes/magazine/magazine.php)?

    Or am I doing something wrong? Is my CHILD theme not behaving correctly? Do I need to replicate the folder/directory structure when moving a PHP file into the CHILD theme to make edits? I’d rather not make the edit (it’s changing one line of code) directly on the “magazine.php” file in the PARENT theme because it will be overwritten on a theme upgrade. But for some reason, when I copy the “magazine.php” file to the CHILD theme and make the edit to the one line, it does not work.

    Thank you.

    #1199648

    Hey santanin,

    Thank you for the inquiry.

    You have to create a new shortcodes directory or path in the child theme folder. Please check this documentation for more info.

    // https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb

    After adding the snippet, create a folder called “shortcodes” inside the child theme directory and inside it, create a copy of the shortcode files that you want to override. You can also create custom shortcodes or builder elements inside that folder if you want.

    Best regards,
    Ismael

    #1200550

    Worked perfect! Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Trouble seeing PHP edits in Child Theme’ is closed to new replies.