show category meta under page title after log out.
IÂ´d like to kindly ask you for help:
IÂ´d like to have under all page titles and search results those small links of all categories in which specific page is included. Im sorry I dont even know how to call it .. in CSS it is class meta_categories and its shown only on result pages whan Im logged in … but IÂ´d like to have it there after log out and not only in result pages but all pages.
thanx for reply
I hope you can understand – sorry for not knowing how to explain it better.
maybe if you see this picture you will understand me better
I want to have there arrow highlited part all the time (it dissapears when log off) and not only for category results but for all pages if possible.
thanks a lot
Im searching internet 6 hours already and did not find solution.
AnonymousFebruary 27, 2012 at 6:42 pm #25225
Go to your admin panel -> appearance -> graphene options -> display tab -> Posts Display Options
Make sure the “Hide Post Categories” is NOT checked.
Also, a post will not show any categories unless it has at least one category assigned to it.
thanks for your reply. really apreciate that.
but unfortunately the problem is somewhere else.
Hide Post Categories is not checked and categories are assigned.
it works on category or search results(as you can see on a picture) but only if Im logged in … When I log off the field disappers and I would like to have it on all pages as well (I use map categories to pages plugin so pages are also in categories )
any other ideas please ?
so I was playing with it and I changed condition below in loop.php
<?php /* Post meta */ ?>
<?php if ( $post_type->name != 'page' || is_user_logged_in() ) : ?>
<?php if ( $post_type->name = 'page' || is_user_logged_in() ) : ?>
and now it is working after log out as well (on result pages)
so just the change of != to = ‘page’ made the job, any ideas what can get wrong now? and if this solution is good ?
and what should I change to show this line even for single pages ?
I added <p class=”meta_categories”><?php the_category( “, ” ); ?></p> to my child loop-page.php .. so now I have it on all pages … but it is even on pages which are not assigned to any category (as uncategorized – and it is not link) … and that is not what I want.
can you help ?
and another progress:
in category-template.php I changed
if ( empty( $categories ) )
return apply_filters( 'the_category', __( 'Uncategorized' ), $separator, $parents );
if ( empty( $categories ) )
return apply_filters( 'the_category', __( '' ), $separator, $parents );
so now it visualy works as I want .. post meta_categories are shown on all pages assigned to category
but the question is: could some of you experieced php pros tell me if this solution is ok ? .. Im complete php and wordpress noob so I dont know what problems I could cause by these 🙂Admin
Firstly, it was intentional for Pages to not have categories.
Secondly, if you need categories for Pages, you’re probably doing it wrong. Would you care to explain why do you need categories for pages?
Thirdly, creating a template in the child theme that overrides the theme’s template is almost as bad as editing the theme’s files itself. See this wiki page for more info:
You must be logged in to reply to this topic.