Home Forums Pro Themes Graduate Pro Changing H2 Taxonomy Heading

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #79123
    Dan Surdyka
    Participant

    Environment: Desktop, Windows 7, Firefox 61.0.2
    URL: /site-title/category/category-title/

    1. Navigate to your posts page.
    2. Select a category. The selected category list appears.

    Notice the h2 tag below the main navigation reading “category: category-title”. Is their anyway I can customize this text? I would ideally want to be able to edit “category:”, but removal of “category:” would also resolve my issue. (see screenshot http://nimb.ws/xvhGSo)

    I would also like to be able to apply the same customization to the tags list page.

    I noticed within the custom-header.php file on line 94

    <h2 class=”page-title”><?php graduate_title_as_per_template();?></h2>

    This seems to control this text. However, I cannot figure out how to edit the text in the code or backend. If someone can point me in the right direction it would be greatly appreciated.

    Thank you

    #79129
    Dan Surdyka
    Participant
    #79261
    wensolutions
    Keymaster

    Hello @dsurdyka,

    First of all thank you very much for using the theme.

    Now to replace the text in the header as per your requirement in the category page you have to go through the child theme.

    To know how to create and activate the child theme please go through the link given below:

    http://wptravel.io/how-to-create-a-child-theme/

    After activating the child theme in your child theme functions.php file please add below given code.

    function graduate_pro_child_custom_cat_title_removal ($title) {
    
        if ( is_category() ) {
    
                $title = single_cat_title( '', false );
    
            } elseif ( is_tag() ) {
    
                $title = single_tag_title( '', false );
    
            } elseif ( is_author() ) {
    
                $title = '<span class="vcard">' . get_the_author() . '</span>' ;
    
            }
    
        return "Your desired text";
    
    }
    
    add_filter( 'get_the_archive_title', 'graduate_pro_child_custom_cat_title_removal');

    Hope this helps.

    Regards!!

    #79358
    Dan Surdyka
    Participant

    Yes, this is very helpful.

    Thank you!

    #79362
    wensolutions
    Keymaster

    Hello @dsurdyka,

    Glad we could help you.

    If you have any issues further then please let us know.

    Thank you.

    Regards!!

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