BuddyDev

Search

Categories and Tags on blog posts

  • Keymaster
    (BuddyDev Team)
    Posts: 22513
    Brajesh Singh on #40172

    Hi Daniel,
    I had a look the site again. The problem with categories is the issue with BuddyBoss theme. It works that way for custom post types. you can check the same by posting from WordPress dashboard instead of BuddyBlog Por(I will link to a url in my next private post).

    The solution is to copy and modify the template-parts/content.php from BuddyBoss theme to your child theme/template-parts/content.php.

    You will see a code section like this

    
    
    <?php if( is_single() && ( has_category() || has_tag() ) ) { ?>
    	<div class="post-meta-wrapper">
    		<?php if  ( has_category() ) : ?>
    			<div class="cat-links">
    				<i class="bb-icon-folder"></i>
    				<?php _e( 'Categories: ', 'buddyboss-theme' ); ?>
    				<span><?php the_category( __( ', ', 'buddyboss-theme' ) ); ?></span>
    			</div>
    		<?php endif; ?>
    
    		<?php if  ( has_tag() ) : ?>
    			<div class="tag-links">
    				<i class="bb-icon-tag"></i>
    				<?php _e( 'Tagged: ', 'buddyboss-theme' ); ?>
    				<?php the_tags( '<span>', __( ', ', 'buddyboss-theme' ),'</span>' ); ?>
    			</div>
    		<?php endif; ?>
    	</div>
    <?php } ?>
    
    

    You need to remove the condition

    
    
    	<div class="post-meta-wrapper">
    		<?php if  ( has_category() ) : ?>
    			<div class="cat-links">
    				<i class="bb-icon-folder"></i>
    				<?php _e( 'Categories: ', 'buddyboss-theme' ); ?>
    				<span><?php the_category( __( ', ', 'buddyboss-theme' ) ); ?></span>
    			</div>
    		<?php endif; ?>
    
    		<?php if  ( has_tag() ) : ?>
    			<div class="tag-links">
    				<i class="bb-icon-tag"></i>
    				<?php _e( 'Tagged: ', 'buddyboss-theme' ); ?>
    				<?php the_tags( '<span>', __( ', ', 'buddyboss-theme' ),'</span>' ); ?>
    			</div>
    		<?php endif; ?>
    	</div>
    

    Currently, the show it only on single posts page.

    Hope that helps.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 22513
    Brajesh Singh on #40177
    This reply has been marked as private.

You must be logged in to reply to this topic.

This topic is: not resolved