Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1318838
    Varnsen
    Participant

    X: 4.6.4
    CornerStone: 1.3.3

    Hey, I’m wondering if its possible to change the default headers and sub headings in category archives

    Right now the category archive looks like this:
    Example

    I’m looking to change the headers to something like:
    Example 2

    Any advice?

    #1318990
    Prasant Rai
    Moderator

    Hello There,

    Thanks for writing in!

    This can be done via custom jQuery script, Please add the following jQuery script via Appearance > Customize > Custom > Javascript:

    jQuery(document).ready(function($){
    	$('.h-landmark span').html("Category heading");
    	$('.p-landmark-sub span').html("Category sub heading");
    });

    Please change texts Category heading and Category sub heading with your own content.

    Thanks.

    #1319033
    Varnsen
    Participant

    Ah amazing! Thanks so much, I can work with this.

    I’m curious though, is there anything I can add to the custom Javascript which pulls the archive category name?

    Something like:

    jQuery(document).ready(function($){
    	$('.h-landmark span').html("Archive");
    	$('.p-landmark-sub span').html("Here are posts from the [Archive-Name] Archive ");
    });

    ?

    If not – don’t worry, the above code should be more than enough for our needs!

    Thanks for the help again.

    #1319312
    Darshana
    Moderator

    Hi there,

    Thanks for writing in! What’s the current stack that you’re in?

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Then for example if you’re using the integrity stack, copy the file _landmark-header.php which is located under “x/framework/views/integrity/” into your child theme’s respective location “x-child/framework/views/integrity/”.

    Then you can find the keyword “Category Archive” and then change accordingly. Make sure to activate your child theme, so that you can see the changes.

    Hope that helps.

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