Tagged Questions
0
votes
3answers
55 views
2 wordpress loops showing 1 post from same post type - how to avoid showing the same post?
I got to two loops in my template files. Both querying the same thing essentially.
This loop in my header:
$testimonial_head = new WP_Query(array(
'posts_per_page' => 1,
'post_type' ...
0
votes
1answer
41 views
Exclude all sticky posts front page twenty twelve
I am attempting to exclude all sticky posts from my front page in twenty twelve theme. I have attempted the following. I am making all changes to the child theme.
To remove the following code from ...
0
votes
1answer
48 views
pre_get_posts : 'post__not_in' doesn't work with global variable
I'm trying to set a post__not_in which use a global $popular variable, defined in the index.php.
-index.php-
$popular[] = 1 //post id=1
$popular[] = 2 //post id=2
$popular[] = 3 //post id=3
...
0
votes
1answer
108 views
Exclude posts by post meta value
I have constructed this query to sort posts on the home page by a set position number in a custom field. However, I need to be able to exclude posts with the position set to '0'. Below is the code ...
1
vote
0answers
188 views
Exclude posts with taxonomy term from appearing on home page query
I am really confused about this one, I am usually pretty good at working out basic queries but I can't seem to work this one out.
Please see below my index.php query. Now it is not your basic query ...
0
votes
2answers
751 views
Exclude category from query
PROBLEM
Hey everyone I have the wp loop to display posts, but I need to exclude category 81.
I tried: query_posts('cat=-81'); ?> before the loop but the pagenavi is broken and it doesn't work ...
1
vote
1answer
289 views
Exclude featured image and custom field from this get_attachment query
Is there a way I can exclude the post thumbnail AND a custom field with the value "_lm_comm_logo" from this query that pulls all of the images associated with a particular post?
<?php $args = ...