Wrong title showing on category view

January 2012 WordPress Theme
GK User
Sat Feb 27, 2016 11:38 pm
Hello,

When I look a category on my website it shows the title of a subcategory:

http://kayakbrasil.com.br/wordpress/blog/

Is it possible to help me solve this issue?

Thanks in advance,
Bruno
User avatar
Expert Boarder

Joshua M
Sun Feb 28, 2016 5:28 pm
Could you please provide me with FTP and back-end access to your website via PM (click the “Private Message” text underneath my avatar) so that I may analyze it?
User avatar
Moderator

Joshua M
Thu Mar 03, 2016 10:53 am
I'm not sure why WP returns your child category name, but I've added additional condition form this specific category (layouts/before.php file);
Code: Select all
if (is_category('235')) {
            echo '<h2 class="gk-page">' . __('Blog', 'gk-game') . '</h2>';
         } else {
            echo '<h2 class="gk-page">' . get_the_category_list(' ') . '</h2>';
         }
User avatar
Moderator

GK User
Mon Apr 04, 2016 2:08 pm
Hello Joshua,

Thank you for your help. Your changes worked very well but I have another category with the same problem, id 247, category name "Guia de Rios".
Can you help fix the problem with this category as well?

Kind regards,
Bruno
User avatar
Expert Boarder

Joshua M
Tue Apr 05, 2016 10:28 pm
Please change your condition into:
Code: Select all
if (is_category(array(235,247)))

you can add more category ids - separated by comma
User avatar
Moderator

GK User
Wed Apr 06, 2016 1:12 pm
Hello Joshua,

Thanks for your reply. I applied your changes, but I think I didn't explain well. I want the this category to show the title "Guia de Rios", before it was showing a subcategory. Now with your changes it is showing "Blog".

Kind regards,
Bruno
User avatar
Expert Boarder

Joshua M
Thu Apr 07, 2016 9:58 am
Try to add this condition:
Code: Select all
if (is_category('247')) {
            echo '<h2 class="gk-page">' . __('Guia de Rios', 'gk-game') . '</h2>';
}
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.