0
votes
0answers
20 views

Conditional loop based on current page

I'm trying to get the loop below to display only the post with the category that reflects the given condition but it doesn't seem to work. Any Ideas on how this can be achieved? <?php if ...
0
votes
1answer
174 views

How to hide <pre> and <table> content from auto-generated excerpts?

Auto-generated excerpts just take the first x characters from the post content and cut that off at a certain point. When there is a table or pre element in that part, the excerpt looks rather useless ...
0
votes
2answers
33 views

Checking conditionals

We all know about the default WordPress post types, these being aside, gallery, status, chat and so on. any good theme should support all of them. In the case where a theme does support all of them, ...
0
votes
1answer
119 views

Why is the `if else` not working?

I have this on my header.php. It checks whether the page is on homepage/frontpage, is on category/children of/has the category of "gamenews", or is on category/children of/has the category of ...
0
votes
2answers
136 views

Where do you add code in custom fuctions so it works on a specific page?

Thanks for replying but I still can't get it to work. Is anything wrong with this code? <?php class custom_loop extends thesis_custom_loop { function page() { if(is_page( ...
5
votes
2answers
4k views

how to create a conditional content_width for a wordpress theme?

I'm trying to create a conditional statement for the content width in the functions.php of my theme. So some categories will have a content_width of 580, some will have 900. This will make the oEmbed ...
1
vote
1answer
158 views

How can I detect hierarchal relationships beyond children (grandchild, great-grandchild, etc)?

Often times, a custom theme for Wordpress will require a dynamic content that reflects a relationship to a top level page of a site. Is there a Conditional Tag that will check if the current page is ...
1
vote
2answers
2k views

How to tell if the user is an admin?

I need to show some info only to admins visiting a page, so I need a conditional tag to identify them. So far I have found: <?php if ( current_user_can('manage_options') ): ?> is this the ...