Tag Info

New answers tagged

0

I do agree with mrwweb about duplicate content, I'm not quite sure why you'd want to do that, but, for the sake of argument... You could possibly grab the URL and then enqueue the correct style sheet from your functions.php Something like this (untested): <?php function mytheme_stylesheet_enqueue(){ global $post; $my_url = ...


1

I'd encourage you to take one step further back and avoid using URLs to determine theme at all. (And FYI, what you're describing are subfolders, not subdomains which would be red.example.com.) The reason not to do this is to avoid duplicate content issues with search engines. Technically, you could work around them, but it can also be confusing to visitors ...


0

It would be better if you have posted your code, It helps in understanding what you are doing wrong & where you are stuck. You can use WP_Query to get the posts created by user in a specific category as well as a post type. To find posts of a specific category you can use the following snippet: $query = new WP_Query( 'category_name=staff' ); Where ...


0

The following line is wrong <?php echo get_post_meta($partner->ID, $a_description, true); ?> If you look closely, you are actually passing get_post_meta($partner->ID, "a_description") to the $key parameter of get_post_meta as this is the value assigned to $a_description You should most probably change $a_description to just a_description ...


1

The reason why your check didn’t work is because is_singular() checks for post types, not for post IDs. is_singular( 'product' ) checks if the current post is of the type product, nothing else. The comparison 2295 === get_the_ID() does exactly what you need.


0

@toscho was correct. I replaced this: <?php if ( is_singular( '2295' ) ) : ?> With this: <?php if ( 2295 === get_the_ID() ) : ?>



Top 50 recent answers are included