Answer the question
In order to leave comments, you need to log in
How to customize files from shortcodes in Wordpress?
I made a directory in the child theme, put the file there, changed it ... it doesn’t take it, it uses the old one.
Answer the question
In order to leave comments, you need to log in
WP only overwrites files when they are included in the parent theme via get_stylesheet_directory()
, and not via get_template_directory()
It might make more sense for shortcodes to unregister it and then re-register with your function.
remove_shortcode('shortcode');
add_shortcode('shortcode', 'child_theme_func');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question