Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1285203
    Chgrim
    Participant

    Hi,

    I am trying to add the following code to the top of my single.php page

    <?php
    if ( function_exists('yoast_breadcrumb') ) {
    yoast_breadcrumb('
    <p id="breadcrumbs">','</p>
    ');
    }
    ?>

    I have duplicated my single.php and added it to /wp-content/themes/x-child/framework/views/global/single.php but I am not getting the breadcrumbs on my site. What am I doing wrong? I have attached the single.php file that I edited.

    Thanks
    Chris

    #1285220
    Chgrim
    Participant

    It says it couldnt upload the file so I will just include what is inside the single.php here.

    <?php
    
    // =============================================================================
    // VIEWS/ICON/WP-SINGLE.PHP
    // -----------------------------------------------------------------------------
    // Single post output for Icon.
    // =============================================================================
    
    $fullwidth = get_post_meta( get_the_ID(), '_x_post_layout', true );
    
    ?>
    
    <?php
    if ( function_exists('yoast_breadcrumb') ) {
    yoast_breadcrumb('
    <p id="breadcrumbs">','</p>
    ');
    }
    ?>
    
    <?php get_header(); ?>
      
      <div class="x-main full" role="main">
    
        <?php while ( have_posts() ) : the_post(); ?>
          <?php x_get_view( 'icon', 'content', get_post_format() ); ?>
          <?php x_get_view( 'global', '_comments-template' ); ?>
        <?php endwhile; ?>
    
      </div>
    
      <?php if ( $fullwidth != 'on' ) : ?>
        <?php get_sidebar(); ?>
      <?php endif; ?>
    <?php get_footer(); ?>
    #1285231
    Chgrim
    Participant

    Actually Nm! I figured it out. I needed to put it into the Icon folder not the global

    #1285611
    Prasant Rai
    Moderator

    Happy to hear that. Feel free to ask us again. Have a great day! 🙂

  • <script> jQuery(function($){ $("#no-reply-1285203 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>