Tagged: x
-
AuthorPosts
-
November 9, 2016 at 8:54 am #1250111
sandra.iParticipantHi
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!
November 9, 2016 at 11:12 am #1250342
RupokMemberHi 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!
November 9, 2016 at 11:48 am #1250399
sandra.iParticipantHi
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)’
November 9, 2016 at 3:13 pm #1250626
DarshanaModeratorHi 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.
November 10, 2016 at 12:37 am #1251226
sandra.iParticipantHi
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>
November 10, 2016 at 1:10 am #1251256
LelyModeratorHi 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.
November 10, 2016 at 1:24 am #1251268
sandra.iParticipantGreat, 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.
November 10, 2016 at 1:39 am #1251285
LelyModeratorHi 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.
November 10, 2016 at 1:48 am #1251302
sandra.iParticipantok I’ll do it by hand.
thanks for your help 🙂
November 10, 2016 at 1:53 am #1251312
sandra.iParticipantActutally…. 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?
November 10, 2016 at 2:20 am #1251348
Paul RModeratorHi,
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.
November 10, 2016 at 3:03 am #1251382
sandra.iParticipantThat almost works – when you click the link, it disappears from the page, instead of being on the ‘CLICKED’ state
November 10, 2016 at 4:10 am #1251449
Paul RModeratorHi,
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
November 10, 2016 at 4:34 am #1251472
sandra.iParticipantYes 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…
November 10, 2016 at 7:41 am #1251645
Paul RModeratorHi,
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.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1250111 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
