Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1250111
    sandra.i
    Participant

    Hi

    I would like to have the category and search pages to look like my blog page, 3 columns separated by dividers – could you help me with that?

    Blog page: http://www.rochesterclinic.co.uk/news/

    Category page:

    1- Instead of ‘Category Archive’ can it show the landmark header, and
    2 -Instead of the header title can it say ‘News: (Name of Category)’

    Search page:

    1 – Instead of ‘Search results’ can it show the landmark header, and
    2 -Instead of the header title can it say ‘News: (Search term)’

    Thanks!

    #1250342
    Rupok
    Member

    Hi there,

    This can be done with Child Theme as it requires template change. If you want to do that, we can point you the right files that need to be amended. Let us know.

    Cheers!

    #1250399
    sandra.i
    Participant

    Hi

    I’ve figured out how to insert the landmark header.

    Could you just let me know the code for changing:

    1 – ‘Category archive’ to ‘News: (Category name)

    2 – ‘Search results’ to ‘News: (Search term)’

    #1250626
    Darshana
    Moderator

    Hi there,

    Search those keywords (“Category archive”, “Search results”) in the _landmark-header.php file which is under your current stack (“x/framework/views/renew/”).

    Hope that helps.

    #1251226
    sandra.i
    Participant

    Hi

    Sorry, what I meant was can you help me write the code that changes this code:

    $title = ( $meta[‘archive-title’] != ” ) ? $meta[‘archive-title’] : __( ‘Category Archive’, ‘__x__’ );

    to:

    $title = ( $meta[‘archive-title’] != ” ) ? $meta[‘archive-title’] : __( ‘NEWS:’, ‘CATEGORY NAME’ );

    and for the Search results:

    from

    <h1 class=”h-landmark”><span><?php _e( ‘Search Results’, ‘__x__’ ); ?></span></h1>

    to:

    <h1 class=”h-landmark”><span><?php _e( ‘NEWS:’, ‘SEARCH TERM’ ); ?></span></h1>

    #1251256
    Lely
    Moderator

    Hi There,

    For category, please update this line:
    $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' );
    To this:
    $title = ( $meta['archive-title'] != '' ) ? 'News: '.$meta['archive-title'] : __( 'Category Archive', '__x__' );

    Then make sure that Archive Title is set. Edit the category and look for Archive Title Field. Just to explain the code above, when archive title is set, the title will be News: Archive Title/category name. If is blank, which is the default, it will just display Category Archive.

    For the search, please update this line:
    <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1>
    To this:
    <h1 class="h-landmark"><span>News: <?php echo $_GET['s']; ?></span></h1>

    Hope this helps.

    #1251268
    sandra.i
    Participant

    Great, thanks for that.

    Is there any way of updating the Archive Title with code? It’s just that I’ve got 48 categories that would need to be updated.

    #1251285
    Lely
    Moderator

    Hi Sandra,

    Updating each category Archive title is the most dynamic and easy way. Other option will be manual checking each category postid and then manually adding what title you want for that specific category. That would be a lot conditional statement that is hard to maintain. Unless you just want to add just one title for every category that is possible.

    #1251302
    sandra.i
    Participant

    ok I’ll do it by hand.

    thanks for your help 🙂

    #1251312
    sandra.i
    Participant

    Actutally…. underneath the Archive title I have a dynamic list of categories – would it be possible to change the style of the category link once it is clicked, and have it stick?

    So now the link is black text on a white background. Can it switch to white text on a black background, and stick like that once clicked?

    #1251348
    Paul R
    Moderator

    Hi,

    You can add this under Custom > Edit Global CSS in the Customizer.

    
    .x-header-landmark a:hover,
    .x-header-landmark a:visited {
        color:#fff;
        background:#000;    
    }
    .x-header-landmark a {
       padding: 5px;
    }
    

    Hope that helps.

    #1251382
    sandra.i
    Participant

    That almost works – when you click the link, it disappears from the page, instead of being on the ‘CLICKED’ state

    #1251449
    Paul R
    Moderator

    Hi,

    Please change the code to this.

    
    .x-header-landmark a:hover,
    .x-header-landmark a:visited,
    .x-header-landmark a:active {
        color:#fff;
        background-color:#000;    
    }
    .x-header-landmark a {
       display: inline-block;
       padding: 0 5px;
       background-color:#fff;  
       color: #000;
    }
    

    Hope that helps

    #1251472
    sandra.i
    Participant

    Yes that works, except if I click another category, the style of the previous link doesn’t revert back to its OFF state, so 2 links are highlighted…

    #1251645
    Paul R
    Moderator

    Hi,

    Sorry, what you are trying to achieve will require more code than just css.

    This particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

    Thank you for your understanding.

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