Tagged: x
-
AuthorPosts
-
May 27, 2016 at 2:52 pm #1013430
bperry420ParticipantI have 2 different category pages that I am using as custom links in my navbar. One is called Insights and one is called Case Examples.
My site URLs:
http://quantumstrat.com/category/case-examples/
http://quantumstrat.com/category/insights/If you go to the category page called “CASE EXAMPLES” and click on a post to go to the index page of that post, the page title says CASE EXAMPLES (as it should) but when you go to the category page called INSIGHTS and click on a post to go to the index page of that post, the page title also says “Case Examples”. (It should say Insights) How do I make the page title match the category name?
WordPress 4.5.2 running X – Child Theme theme.
X Version: 4.4.2
Cornerstone installed Version 1.2.4May 27, 2016 at 10:17 pm #1013915
Rue NelModeratorHello There,
Thanks for writing in! By default, it will display the blog title which you can set in the customizer, Appearance > Customize > Renew > Blog Options > Blog Title. I am guessing that you want to display the category of the post instead? If that’s the case, you need to edit your _landmark-header.php file in your child theme. Find these lines:
<?php elseif ( is_home() || is_single() ) : ?> <?php if ( x_is_portfolio_item() ) : ?> <h1 class="h-landmark"><span><?php echo x_get_parent_portfolio_title(); ?></span></h1> <?php else : ?> <h1 class="h-landmark"><span><?php echo x_get_option( 'x_renew_blog_title' ); ?></span></h1> <?php endif; ?>And replace it with this:
<?php elseif ( is_home() || is_single() ) : ?> <?php if ( x_is_portfolio_item() ) : ?> <h1 class="h-landmark"><span><?php echo x_get_parent_portfolio_title(); ?></span></h1> <?php else : ?> <?php $categories = get_the_category(); if ( ! empty( $categories ) ) { echo '<h1 class="h-landmark"><span>' . esc_html( $categories[0]->name ) . '</span></h1>'; } ?> <?php endif; ?>Since the categories were order in alphabetical order, only the first category will appear if you have assign the post to two or more category names.
Please let us know if this works out for you.
May 27, 2016 at 10:28 pm #1013928
bperry420ParticipantI don’t know what you did to my category pages, but now my category page that used to say CASE EXAMPLES now says “Category Archive”
http://quantumstrat.com/category/case-examples/and my other category page called INSIGHTS that used to say INSIGHTS at the top now says “Category Archive”
http://quantumstrat.com/category/insights/Can you please fix?
May 28, 2016 at 1:32 am #1014079
Rue NelModeratorHello Again,
All I did is restore the code back to its original code. I then added the code so that the single category title when you are viewing the single blog post. In your category archive page, it is displaying “Category Archive” because you did not add a category archive title. Simply edit all your categories in Post > Categories and insert the Archive Title. If you dod not want to edit it, it will display “Category Archive” because this is the default value.
http://prntscr.com/b9d1g2
http://prnt.sc/b9d170Hope this explains the changes I made.
May 28, 2016 at 8:05 am #1014341
bperry420Participantonce again you guys are awesome. I actually never used the “archive title” field in the edit category section. I never noticed it before. Thanks again. Your tech support team is top notch.
May 28, 2016 at 8:45 am #1014360
ChristopherModeratorYou’re most welcome.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1013430 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
