Viewing 4 replies - 1 through 4 (of 4 total)
  • You should use a Child Theme, you can then make a copy of your single.php file (for example) and place it in your child theme folder.

    You can now modify this file to suit your needs, it won’t be overwritten either when you update the parent theme in the future.

    You can also use the child themes’ functions.php and style.css files to make custom modifications to your theme by overwriting code from the parent theme, which again, will be perfectly safe when you update the parent theme.

    Hope this helps.

    Thread Starter ariabav

    (@ariabav)

    Thank you very much. I am not too tech savvy, so I used a plugin to make a child theme. I was mainly trying to add the breadcrumb navigation based off of a list of items suggested for website optimization by onpage.org by Yoast.

    How does one find out if the breadcrumb navigation actually worked? Where do I look for that?

    Thanks again.

    Make a copy of the templates/header.php file from the Virtue theme into your child theme.

    This new header.php file must be within a newly-created templates folder within your child theme, so the path of the file still remains templates/header.php.

    From the guide you linked in this thread, copy and paste the code at the very bottom of this new header.php file, directly after the closing </header> tag.

    The breadcrumbs, if enabled, will now be visible in your header on every page of your site.

    And as a sidenote, you don’t need to use a plugin to create a child theme, I made one in a few seconds by creating a new folder called “virtue-child” and created 2 files inside it.

    functions.php containing this code:

    <?php
    function virtue_child_css() {
    	wp_enqueue_style('virtue-css', get_template_directory_uri() . '/style.css'); // load the parent theme css
    	wp_enqueue_style('virtue-child-css', get_stylesheet_directory_uri() . '/style.css', array('virtue-child')); // load the child theme css
    }
    add_action( 'wp_enqueue_scripts', 'virtue_child_css' ); ?>

    style.css containing this code:

    /*
    Theme Name: Virtue Child
    Template: virtue
    */

    Install the child theme like any other theme, make it the active theme and keep the parent theme installed so the child theme can use it for resources.

    Hope this helps.

    • This reply was modified 8 years, 4 months ago by ThemeSumo.
    Thread Starter ariabav

    (@ariabav)

    Thank you so much for taking the time to help out. I will try that.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Breadcrumb navigation’ is closed to new replies.