Linked Questions

1
vote
2answers
40 views

All posts are still shown when adding category argument to query

I've got the following code in my team-type.php file which I'm using to create a custom taxonomy for a member information: function create_team_taxonomies() { $labels = array( 'name' ...
0
votes
0answers
31 views

Remove duplicates from foreach

I'm trying to loop through a custom post type and display all meta values for a meta key. I'm able to display all the values, however there are some duplicates. I want to remove those duplicates. I ...
0
votes
1answer
720 views

A two column loop with one lead post

I got a loop from internet (I forgot the site) for two column post view. It has a nice CSS for it too. But skipping that for the question now. <?php $counter = 1; ?> <?php ...
1
vote
2answers
8k views

How to get posts published between a date and today?

Is it a way to get posts published between a date and today with query_posts() ? Example : All posts published since 2012-04-01 Thanks EDIT : How to add the filter date on this Query Posts ? ...
-1
votes
2answers
1k views

Achieving pagination with `query_posts`

I'm using query_posts to build a list of posts from a single category, and I'm trying to add pagination to this setup. Here's my code: <ul> <h1><?php the_title(); ?></h1> ...
0
votes
1answer
45 views

infinite scroll not working when logged out

The problem: infinite loop works only when the user is logged and then it shows posts that were not published yet. Once I log out, the infinite scroll doesn't work anymore. The setup: I have the ...
0
votes
4answers
82 views

Permalink remain the same on each page

I have displayed the post title within the anchor tag after which I've set the permalink. The permalink, however, is not working with the same title that came from the post. It's like getting the ...
0
votes
0answers
11 views

query_posts, and filter with a meta_key that is an array [duplicate]

Inside one of my custom post types, I have a custom field that gets its values from another custom post type, and show them in a dropdown menu, something that's called a Relation Custom Field in PODS. ...
0
votes
3answers
72 views

How to select posts from one category but exclude posts in another category?

I am trying to select posts that have category id 4 but exclude posts that also have category id 2 Here's what i'm trying $query = new WP_Query(array( "cat__in" => array(4), ...
0
votes
2answers
49 views

Pagination custom query

I am trying to make a custom page template that shows the most viewed posts. I can return posts but I am having trouble figuring out how to paginate it. Here is what I have: $args = array('orderby' ...
0
votes
2answers
68 views

Using Masonry - How to make every Xth post thumbnail image span multiple columns?

To be specific: I'm using Masonry to show all posts within a certain category Thumbnail images for each post are shown on the category page in a 3-column format using CSS fluid width columns I need ...
0
votes
3answers
935 views

how to get a different html for odd/even posts?

query posts if posts exist then begin the loop if post is even: <h1>title</h1><p>content</p> if post is odd: <div>its ...
0
votes
1answer
55 views

How to show taxonomy image instead of taxonomy name on a list

I would like to show in a custom taxomony list icons instead of taxonomy name , but just for the ones with image asociated, where there is no image let show the taxonomy name . i have installed ...
1
vote
1answer
180 views

Create Pop-Up Box with Custom Field Content Inside the Loop

I tried this using ThickBox first, then tried using some code I had that worked on another website... Total failure. The Goal: I have a custom post type (product) with a ton of custom fields. I also ...
1
vote
1answer
2k views

Wordpress Pagination Not Working - Always Showing First Pages Content

I am working on a website where I have a blog but I also have a custom post type to allow me to drop in some videos. I would like to use pagination so that if there are more then 9 videos displayed, ...

15 30 50 per page