Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #989813

    Hello I don’t seem to get working.
    I have changed postslider.css and postslider.php and place them into the enfold child folder.
    what code must I place in the function.php

    tried a lot from this forum but it still load the enfold theme postslider.css and postslider.php instead of the one that are in the child theme directory

    Greeting Marc

    • This topic was modified 6 years, 4 months ago by MarcusEls.
    #990047

    Hey MarcusEls,
    Try adding this code to the end of your functions.php file in Appearance > Editor:

    //add shortcode to child theme
    function avia_include_shortcode_template($paths)
    {
    	$template_url = get_stylesheet_directory();
        	array_unshift($paths, $template_url.'/shortcodes/');
    
    	return $paths;
    }
    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);

    Then create the folders /shortcodes/postslider/ in your child theme folder and add the postslider.css and postslider.php files inside the /postslider/ folder.

    Best regards,
    Mike

    #990070

    Tried that already but doesn’t work still see the files in enfold directory postslider

    note: get the message communication is not possible to check on errors, reverse PHP.
    So I change function.php with ftp

    • This reply was modified 6 years, 4 months ago by MarcusEls.
    #990123

    Also my custom.css does not work from the child theme

    #990236

    Hi,
    Please include a admin login & FTP access in the Private Content area, so we can take a look.
    What change did you make to the postslider, what do you expect to see when the child theme version is loading correctly?

    Best regards,
    Mike

    #990239

    I think something is wrong with the install because it ask for a index inside the enfold-child theme. when toggle the theme I must go back 3 hours because my theme was corrupted. changes to the postslider can you see at the bottom of the page. it gives two blocks instead of one, like it shows now.

    #990671

    Hi,
    I corrected the directory structure for your post slider in your child theme
    /shortcodes/postslider/postslider.css and postslider.php
    but you have other files in the shortcodes directory that should be in their own directory plus you should remove the extra directory (config-templatebuilder) in your child theme.

    I also added the functions.php function into your child theme, but I don’t understand what your custom postslider is to do, so I’m unsure if it is working.
    Please check, and if you can add a screenshot of what you expect to see, it would help.

    Best regards,
    Mike

    #990687

    Super it’s is working ok, the postslider retrieve the first segment of the url so the can have there own blog color

    #990757

    I also made some changes inside:
    comments.php
    include/helper-main-menu.php
    css/layout.css
    css/shortcode.css

    can I place them also inside the shortcodes folder?

    #990867

    Hi,
    You will want to add the files to the child theme inside their folders like they are in the parent theme, so for the comments.php it will go in the shortcodes folder, like this:
    /enfold-child/comments/comments.php

    but the helper-main-menu.php needs to be like this:
    /enfold-child/includes/helper-main-menu.php

    for the css files, please add them like this:
    /enfold-child/css/shortcodes.css
    /enfold-child/css/layout.css

    and add following code to functions.php file of your child theme:

    add_action( 'wp_enqueue_scripts', 'wp_change_shortcodescss', 20 );
    function wp_change_shortcodescss() {
      wp_dequeue_style( 'avia-scs' );
      wp_enqueue_style( 'avia-scs-child', get_stylesheet_directory_uri().'/css/shortcodes.css' );
      wp_enqueue_style( 'avia-scs-child', get_stylesheet_directory_uri().'/css/layout.css' );
    }

    Best regards,
    Mike

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.