0
votes
1answer
99 views

Conditional for a Single Post That Belongs to a Category?

I have categories like gaming and movies on my website and when a user visits any of these categories the content in the sidebar is displayed depending on the category they are in. So gaming content ...
1
vote
1answer
68 views

Check to see if specific loop has less than certain amount of posts

I'm looking for a way to check how many posts are returned by a specific loop. So if I have a loop like this.. <?php $featured_post_id = get_the_ID(); global $post; $args = array('cat' => ...
0
votes
2answers
468 views

Conditionals if tags exist?

I have the following code to display tagged articles with the same name as the page title, but I only want the to appear if the tag exists, otherwise it just says 'Related Articles' with no content. ...
1
vote
1answer
567 views

how to know if the post has pagination (<!--nextpage-->) or not

i need a solid solution for checking if a post has pagination or not, regardless of the number of current page in the pagination, and even if the post is in the first page of the pagination. the check ...
0
votes
1answer
109 views

Checking for custom field in admin pages

I am loading some scripts conditionally for the admin section with : if (is_admin()) { wp_register_style('admin_js', get_bloginfo('template_directory') . '/admin.js'); ...
1
vote
2answers
125 views

can't use the page_test method to check pagination

I've tried to follow the example for Testing for paginated Pages but i don't know why it isn't working. i put it in the single.php file for post detection. i don't know why the page_test is broken. ...