• Hi, i want to change category name above post title in single page with yoast breadcrumbs (have instaled yoast plugin). What i need to do? thanks for help

Viewing 1 replies (of 1 total)
  • Hi. For that, you need to edit the theme files (copy them into your child theme). I will show you what I have done with my website for single posts. Locate the file page-title.php in hueman/parts/page-title.php and create the same path in your child theme. Then open the file page-title.php and replace the code inside with the following and save.

    <?php if ( ! hu_is_home_empty() ) : ?>
        <div class="page-title pad group">
          <?php //prints the relevant metas (cat, tag, author, date, ...) for a given context : home, single post, page, 404, search, archive...  ?>
        	<?php if ( is_home() && hu_is_checked('blog-heading-enabled') ) : ?>
        		<h2><?php echo hu_blog_title(); ?></h2>
        	<?php elseif ( is_single() ): ?>
        		<ul class="meta-single group">
        			<?php if ( function_exists('yoast_breadcrumb') ) {
    	yoast_breadcrumb('<p id="breadcrumbs">','</p>');
    } ?>
        			<?php if ( comments_open() && ( hu_is_checked( 'comment-count' ) ) ): ?>
        			<li class="comments"><a href="<?php comments_link(); ?>"><i class="fa fa-comments-o"></i><?php comments_number( '0', '1', '%' ); ?></a></li>
        			<?php endif; ?>
        		</ul>
    
        	<?php elseif ( is_page() ): ?>
        		<h2><?php echo hu_get_page_title(); ?></h2>
        	<?php elseif ( is_search() ): ?>
        		<h1><?php echo hu_get_search_title(); ?></h1>
        	<?php elseif ( is_404() ): ?>
        		<h1><?php echo hu_get_404_title(); ?></h1>
        	<?php elseif ( is_author() ): ?>
        		<h1><?php echo hu_get_author_title(); ?></h1>
        	<?php elseif ( is_category() || is_tag() ): ?>
        		<h1><?php echo hu_get_term_page_title(); ?></h1>
        	<?php elseif ( is_day() || is_month() || is_year() ) : ?>
        		<h1><?php echo hu_get_date_archive_title(); ?></h1>
        	<?php else: ?>
            <?php if ( ! is_home() && ! hu_is_checked('blog-heading-enabled') ) : ?>
        		  <h2><?php the_title(); ?></h2>
            <?php endif; ?>
    
        	<?php endif; ?>
    
        </div><!--/.page-title-->
    <?php endif; ?> 

    Go check your page and see if it worked. If the comment bubble looks out of place, you can opt to disable it by deleting the following code
    <li class="comments"><a href="<?php comments_link(); ?>"><i class="fa fa-comments-o"></i><?php comments_number( '0', '1', '%' ); ?></a></li>

Viewing 1 replies (of 1 total)
  • The topic ‘Category name above post title chenge with breadcrumbs’ is closed to new replies.