Display Category title instead of Archives

Home Forums Gorgo – Minimal Content Focused Blog and Magazine Theme Customizer Display Category title instead of Archives

This topic contains 7 replies, has 2 voices, and was last updated by  Olivier Cardoen 1 month ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #7189

    Madalin
    Participant
    • 20 Posts
    @electricspeed

    Hello,

    When I choose “Display header image” on “Posts Page” customizer instead showing the name of the category, it writes only “Archives”.

    If is not checked the category title it’s properly displayed.

    Thank you!

    #7215

    Olivier Cardoen
    Participant
    • 281 Posts
    @themosaurusrex

    Hi @electricspeed,

    Thank you for your very documented topics! Your screenshots are very helpful! 🙂

    The title displayed in the header should be the name of your Posts Page. For instance, on our demos, it’s called “Blog” and it can be edited in the WP admin. This title will be shown across your all your post archives (tags, categories, date, etc.) with the exception of the author post archive, in which the display should be slightly different.

    However, you should be able to also display the category or tag name under the header. It’s a limitation on our side that we’ll remove in future versions. To change this immediately, simply add the following code snippet to your website:

    /**
    * Display the category and tag name.
    */
    .archive.grimlock--custom_header-displayed.grimlock-wordpress-seo--breadcrumb_custom_header_displayed .site-main > .page-header, .archive.grimlock--custom_header-displayed .site-main > header .page-title, .archive.grimlock--custom_header-displayed .site-main > header .archive-description {
    	display: block !important;
    }
    
    .author.archive.grimlock--custom_header-displayed .grimlock-section__title {
    	width: 100% !important;
    }
    

    To add this code snippet to your site, we recommend that you paste it to the Custom CSS panel of your WordPress Customizer. Just go to your dashboard and navigate to “Appearance > Customize > Additional CSS”.
    Pasting your code snippet there should do the trick for you.

    Regards,

    #7217

    Madalin
    Participant
    • 20 Posts
    @electricspeed

    I think you did not understand my issue.
    I have a category and I choose to display the header. In my header, I expect to see the category title. Instead of category title I see “Archives”. I do not want to have the title under the header, I just want to display the category title in header, instead of “Archives”.

    For example, I have set this category in back-end with title “Trotinete electrice”.

    As you can see in this other picture, the title does not appear on header, how it suppose to, instead just shows “Archives”. And using the css code you provided me, the title appears under the header, but that’s not what I want. I want instead of “Archives” to show “Trotinete electrice”.

    Regards,
    Madalin

    #7238

    Olivier Cardoen
    Participant
    • 281 Posts
    @themosaurusrex

    Hi @electricspeed,

    Unfortunately, this feature is not yet supported by our theme. Not being able to display the Category or Tag name in the Header is a limitation on our side that we’ll remove in future versions.

    To change this, simply add the following code snippet to your website:

    /**
     * Display the archive title for the Category and Tag pages.
     *
     * @param array $args The array of arguments for the Custom Header.
     */
    function gorgo_custom_add_custom_header_args( $args ) {
    	if ( is_category() || is_tag() ) {
    		$args['title']    = get_the_archive_title();
    		$args['subtitle'] = get_the_archive_description();
    	}
    	return $args;
    }
    add_filter( 'grimlock_custom_header_args', 'gorgo_custom_add_custom_header_args', 1000, 1 );

    To add this code snippet to your site, we recommend that you use a the Code Snippets plugin (https://wordpress.org/plugins/code-snippets/). If you have never activated this plugin, please read the following post:

    Adding Custom PHP Without Changing Your Child Theme

    You might also need to improve the display of the subtitle a bit. So please also replace the previously given CSS lines by those. You can proceed like you did before:

    /**
    * Display the category and tag name.
    */
    .archive.grimlock--custom_header-displayed .grimlock-section__title {
    	width: 100% !important;
    }

    Please also note that we don’t provide any theme customization. So, you shouldn’t expect other snippets from us unless it’s to fix an issue stemming from our own codebase. We always try our best to help theme users whenever we can and only provide code snippets out of courtesy to prevent them from waiting for the next update.

    Regards,

    #7240

    Madalin
    Participant
    • 20 Posts
    @electricspeed

    Thank you for your help! Please notice that I did not request a theme customization, I consider that having the category title instead of just “Archives” is a normal thing in a WordPress theme, as you also mentioned that is a limitation on your side.

    Regards,
    Madalin

    #7242

    Olivier Cardoen
    Participant
    • 281 Posts
    @themosaurusrex

    Hi @electricspeed,

    Of course! That’s a limitation on our side and that’s the reason why I’ve shared this snippet with you. 🙂
    However, I have to be clear about our customization work policy because in the past, we’ve received quite a few requests mixed with bug fixing issues. And it use to be difficult for some -even some discovering topics later- to understand the difference because we weren’t clear enough.

    So, like I said, as long as we can fix issue or remove framework limitation, we’ll be glad to share snippets with you when it can help. 😉

    Best,

    #7260

    Madalin
    Participant
    • 20 Posts
    @electricspeed

    Hello,

    I come back with a related issue. Using a header on the search page it results in a duplicate title. Please have a look at the attachment.

    Regards,
    Madalin

    #7267

    Olivier Cardoen
    Participant
    • 281 Posts
    @themosaurusrex

    Hi @electricspeed,

    Thank you for your precious feedback. 🙌

    There is definitely an issue in our theme which will be fixed in the next update. In the meantime, you can solve this by add the following code snippet to the previously shared CSS code:

    /**
    * Hidding the page title when the header is displayed on the search results page.
    */
    .search.grimlock--custom_header-title-displayed .page-title {
        display: none;
    }

    Best,

Hi there,

This topic has been inactive for a while now so we will be closing it to keep the forum tidy. Don't hesitate to create a new topic if you still need help and we'll be glad to help you!

Best regards,
The Themosaurus team.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Display Category title instead of Archives’ is closed to new replies.