Tagged: child theme, magazine
-
AuthorPosts
-
March 27, 2020 at 1:22 am #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-435156Basically 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.
April 1, 2020 at 8:23 am #1199648Hey 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,
IsmaelApril 3, 2020 at 3:58 pm #1200550Worked perfect! Thank you!
-
AuthorPosts
- The topic ‘Trouble seeing PHP edits in Child Theme’ is closed to new replies.