Find Answers and Get Support › Forums › Cera – Intranet & Community Theme › Website Setup › Posts › H1 title on rubric detail page
- This topic has 8 replies, 2 voices, and was last updated 4 years, 11 months ago by
Themosaurusrex.
-
AuthorPosts
-
Ondrej HastíkParticipant@ondrejhastik
- 4 Topics
- 13 Posts
Situation – page News has H1 “News”. If I add a new item to menu – Posts rubric there is also H1 “News”.
My client want that if I’m on specific Rubric page like Tips and Tricks or Signals, that the name of rubric will be in H1.
What is your recommendation
March 23, 2020 at 17:35 #10874@themosaurusrex- 0 Topics
- 2048 Posts
Hi @ondrejhastik,
Could you tell me what’s the name of the page associated with posts please? I think that Cera will display its name at the top of the page and inside the menu item. (Please see attached.)
Changing it to “Tips and tricks” or “Signals” should solve this.
Cheers,
March 24, 2020 at 16:05 #10914Ondrej HastíkParticipant@ondrejhastik- 4 Topics
- 13 Posts
I try to explain better.
I have several Post Categories. On default /news there is a News page, where are post from several categories. What I want is to have solo page for each category.
How to how to achieve it?
Thanks for you help.
March 26, 2020 at 19:00 #11019@themosaurusrex- 0 Topics
- 2048 Posts
Hi @ondrejhastik,
Could you try to add your categories to your navigation menus please? (Please see attached.)
This will add the URL to your news page by the selected category.Maybe, that’s what you’re looking for.
Best,
March 27, 2020 at 10:42 #11029Ondrej HastíkParticipant@ondrejhastik- 4 Topics
- 13 Posts
I did that week ago. But if I click on this page the H1 title is still News not name of the category.
For example if I go to News, there are posts from all categories and h1 of this page is News – that is right.
But if I click in the menu od link to category Signals on the page are posts from category Signals – that is ok, but h1 is styl News.March 28, 2020 at 10:38 #11054Ondrej HastíkParticipant@ondrejhastik- 4 Topics
- 13 Posts
Same situation on Cera demo. If client wants a page with only one category, he want H1 to be name of category. Hot to achive that?
March 28, 2020 at 10:58 #11056@themosaurusrex- 0 Topics
- 2048 Posts
Hi @ondrejhastik,
To change this, simply add the following code snippet to your website:
/** * Change the title from the posts page name to the archive title. * * @param array $args The array arguments to set the custom header. * * @return array The udpated array arguments to set the custom header. */ function cera_custom_add_custom_header_args( $args = array() ) { if ( is_category() ) { $args['title'] = get_the_archive_title(); $args['subtitle'] = '<span class="excerpt">' . get_the_archive_description() . '</span>'; } return $args; } add_filter( 'grimlock_custom_header_args', 'cera_custom_add_custom_header_args' , 1000, 1 );
This will display the category title and description in your Header for all category pages. (Please see attached.)
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:
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,
March 30, 2020 at 16:20 #11086Ondrej HastíkParticipant@ondrejhastik- 4 Topics
- 13 Posts
That is perfect. I have just tested it. Thank you so much!
A know that this customization is not part of your technical support. I appreciate it and will recommend your templates for my clients.
Wish you the best in these weird days!
March 31, 2020 at 11:49 #11103@themosaurusrex- 0 Topics
- 2048 Posts
Thank you very much @ondrejhastik! We always like to see our work appreciated! ?
Stay safe too. Let’s hope this crisis doesn’t continue for too long.
Best,
March 31, 2020 at 17:13 #11108 -
AuthorPosts
The topic ‘H1 title on rubric detail page’ is closed to new replies.