Okay
  Public Ticket #306483
Testimonials php changes on child theme
Closed

Comments

  • Colleen started the conversation

    I want to change the quotation marks to smart quotes however I am using a child theme. I saw your note on editing the testimonial.php file but how do I add this edit to the function.php file in the child theme document? 

    I tried copying and pasting the new code after "wp_enqueue_script(\'custom_script\');" but it didn\'t work.

    "The mod would only take place in the shortcode-processing.php file if you were using the shortcode and not the page builder to place the testimonial slider. Assuming you\'re using Visual Composer, edit nectar/nectar-vc-addons/vc_templates/testimonial.php :)"

  •  992
    ThemeNectar replied

    Hey Colleen, you'd need to add this into your functions.php file:

    
    		function add_nectar_to_vc(){
    			require_once locate_template('/nectar/nectar-vc-addons/nectar-addons.php');
    		}
    
    		add_action('init','add_nectar_to_vc', 5);
    		add_action('admin_enqueue_scripts', 'nectar_vc_styles');
    		
    		function nectar_vc_styles() {
    			wp_enqueue_style('nectar_vc', get_template_directory_uri() .'/nectar/nectar-vc-addons/nectar-addons.css', array(), time(), 'all');
    		}
    	
    
    and change the require_once locate_template('/nectar/nectar-vc-addons/nectar-addons.php'); to reflect your child theme location - then if you copy the nectar/nectar-vc-addons folder into your child theme you should be able to modify the files inside from there
  • Colleen replied

    Thank you for your response!

    When I plug in the code into the functions.php file, upon refreshing my site I get a "Fatal error" warning. Am I placing the script in the wrong place? I copied the entire "nectar" folder into my site directory. I also tried with and without the first "/" to identify the location but neither worked. 

  •  8,453
    Tahir replied

    Hey, could you allow us to log in so we can check on this for you more?

    Thanks


    ThemeNectar Support Team