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

    Hi all,

    I am working on the enfold-child and need to do some customization to masonry_entries.php. I tried creating wp-content/themes/enfold-child/config-templatebuilder/avia-shortcodes/masonry_entries.php but without success.

    What would be the best way to customize enfold core files and not loose the modifications on theme update?

    Kind regards,
    Thomas Borkent


    Hi borkent!

    If you want to overwrite an existing shortcode create a “shortcodes” folder within the child theme directory, then copy the /wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/masonry_entries.php into the child theme “shortcodes” folder and modify the php code. At least add following code into the child theme functions.php file

    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths)
    	$template_url = get_stylesheet_directory();
        	array_unshift($paths, $template_url.'/shortcodes/');
    	return $paths;

    This code will make sure the the shortcode file of the child theme is loaded first and you can overwrite the parent theme slideshow shortcode file with the child theme.



    Hi Dude,

    Went and did this right away, however when I add this shortcode to the child-theme functions.php strangely the media library when accessed from the post edit screen is empty. For instance, change featured image -> library popup returns no images, when adding a new image it then does show but all the others have disappeared… When I go to the media library main window in admin it is not empty and I can see all previous uploaded files, any idea on what could be causing this?

    Thx for helping out!

    Thomas Borkent


    ok I think I found something here :)

    When adding above code allot of things go wrong, I can see in the backend that the <head> content is being loaded inside the <body> tag.. I think above code is triggering something it shouldnt. Things like <meta, <title, <link are not in the <head> but inside the <body>……

    Any idea?




    That function alone should not cause anything like that. All it does is tell the theme where it can find shortcodes before checking the main theme file.

    So no changes are made to the loading of the header or anything like that. Try checking or removing anything else from your child theme to including any active plugins. Anything I’ve added to the documentation I’ve personally tested on my live site so I know this one should be working :)



    Well, I dont know what it is then, I just switched to an empty childtheme, downloaded the starting folder from this forum and since then didnt do anything to it except add this function into the enfold-child/functions.php

    What I was saying above is that as soons as I add the above function, a strange gap appears at the top of the website and the top of wp-admin. When I checkout the source I see that the whole structure of front and backend is messedup. With that I mean a big chunk of the header codes are now displayed inside the body. When I remove this code all is back to normal.

    For now I will stick to modifying core files and not add the code.

    Thx for checking it out,


Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Is it possible to modify files in enfold-child?’ is closed to new replies.