0
votes
1answer
41 views

Exclude category from get_the_category

I want to exclude a specific category from the loop, here's what I tried: Original code: // auto posts by cat if( $bawmrp_options['auto_posts'] == 'cat' || $bawmrp_options['auto_posts'] == ...
0
votes
1answer
139 views

Display post category in foreach loop with category link

I have the following code to show current author post lists with post thumbnail, post title, post date and post category. function my_get_display_author_posts() { global $authordata, $post; ...
0
votes
1answer
36 views

Show post if in category

I've searched a lot for options like has_category, in_category, get_the_category, but I couldn't make them work Here's my pastebin http://pastebin.com/Zi7auvtv I want this code to run only if the ...
0
votes
2answers
723 views

How to exclude specific category from the get_the_category(); array

In my loop I've added: <?php $categories = get_the_category(); $separator = ' '; $output = ''; if($categories){ foreach($categories as $category) { $output .= '<span ...
0
votes
1answer
92 views

My custom query not detecting the correct category

For category.php my custom query code isn't displaying the posts from the correct category. I have a parent category called 'Blog' and it can have any number of unknown children. With that in mind ...
0
votes
1answer
1k views

get_the_category listing in hierarchial order

Hello at the moment I'm wondering how I would be able to make this work to post in Hierarchical order within the post loop. <?php foreach ((get_the_category()) as $childcat) { ...
0
votes
2answers
187 views

loop inside a loop : search for posts in the same category

Could someone tell me how i could make this work? i have a loop, and i would like to create another loop to find the other posts from the same category : but this does not work : <?php while ( ...