• Resolved Nokaa

    (@nokaa)


    Hi,

    I created a new template and a new widget for KC by following your tutorial : https://blog.kingcomposer.com/how-to-create-an-element-for-kingcomposer-page-builder/
    BTW it’s really simple and suitable ! Thank you for it.

    All is working fine, but the plugin want to search my template in the parent theme (I’m using Etro) so I needed to put it here. I presume that the function that calls KC is written somewhere in the parent theme but didn’t find where.

    Is there a way to say to KC that I want it to search the template specifically for my element in the current theme (the child theme) ? May be in the functions.php ?

    Thank you in advance,
    Sincerely yours,

    N.C.

    • This topic was modified 7 years, 5 months ago by Nokaa.
Viewing 1 replies (of 1 total)
  • Thread Starter Nokaa

    (@nokaa)

    Sorry for the thread… I finally found the answer in the docs : https://docs.kingcomposer.com/set-template-path/
    I had not looked for the good terms.

    For those who are wondering how to make it work, just add this to your child theme function.php :

    	add_action('init', 'kc_init', 99 );
    	function kc_init(){
    		global $kc;
    		$kc->set_template_path( get_stylesheet_directory().'/kingcomposer/' );
            }

    Now it will take the templates of the plugin, those of the parent theme, and also those which are located in the kingcomposer/ folder of your child theme.

    Sincerely yours,

    N.C.

    • This reply was modified 7 years, 5 months ago by Nokaa.
    • This reply was modified 7 years, 5 months ago by Nokaa.
    • This reply was modified 7 years, 5 months ago by Nokaa.
Viewing 1 replies (of 1 total)
  • The topic ‘Search KC template in child theme ?’ is closed to new replies.