Tagged Questions
-2
votes
2answers
49 views
How to set up a echo? [closed]
My problem is that i don't know how to set up a echo I think. I need it to just wrap a if statement correctly around the code below Please Help...Thanks SO much
<?php
global $post;
...
0
votes
2answers
68 views
Check IF single OR multiple custom data has been entered
I'm building a single template right now for a custom post type. I'm wondering if there is a way to check if either at least one or multiple of the custom values has been entered so I can display the ...
0
votes
1answer
67 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 ...
0
votes
1answer
96 views
Exclude custom function content from certain pages
I have added a small custom function to display a little author bio blurb at the bottom of each blog entry in my functions.php file inside the current theme that I am using. So far so good, it is ...
0
votes
2answers
222 views
Loop to pull content from parent element in custom post type [duplicate]
I created a hierarchical custom post type called "films." It is hierarchical so it can have children elements.
I am using a conditional statement in my single-films.php to show different content for ...
0
votes
3answers
2k views
If Post Type equals, then display X content
I just need to say in single.php if post type = x then display y. Else, don't display it.
0
votes
2answers
300 views
Dynamically output a class to an anchor tag depending on what tag is chosen
Not sure if this is possible, but what Id like to do is have the ability to output/add a class to an anchor tag depending on what tag I choose when creating the post.
My reasoning behind this is to ...
0
votes
1answer
97 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
649 views
Function like in_category for custom taxonomies
I'm trying to display different content depending on the taxonomy that was been selected. For example I have a taxonomy named Type. Inside that taxonomy I have several different children, one is ...
12
votes
5answers
23k views
If is custom post type
I am looking for a way to test if a post is a custom post type. For example, in say the sidebar I can put code like this:
if( is_single()) {
//code here
}
I want code were I could do ...
1
vote
1answer
551 views
Can I create a loop with multiple post types and specify different $args for each post type?
I'd like to create a custom loop that includes all Post types: Post and Video. Then I'd like to specify to show all posts of the post type Video, but only show posts that are in the category ...
1
vote
1answer
439 views
Conditional PNG Overlay in Custom Post Type Loop Depending on Post Type
I have a loop pulling in two different custom post types. I have that loop showing the thumbnails of posts. Each post type used to have its own seperate loop and I had set up some png overlays to ...