Linked Questions

5
votes
2answers
942 views

Differences Between WP_Query() and get_posts() for Querying Posts?

What are the differences between using WP_Query() and get_posts()? Which is better to use in what case and why?
0
votes
1answer
114 views

Co-authors plus problems with query_post

I had a query_post that worked, aimed lists only posts by author own, but now that I updated wordpress stopped working. The query_post only works when you have only one author. I updated WordPress ...
0
votes
2answers
61 views

Custom Field Multiple Clauses

I am having a weird situation, I have two meta keys in my custom posts. Start Date and End Date, In simple SQL, I want to execute following query where startDate > '2013-12-10' and (startDate ...
0
votes
3answers
349 views

How to show a popular post in wordpress in last 24 hours?

I have the query_post on my codes. This will display the popular post of all time. But I want to dispaly the popular post in past 24 hours. How do I do that? <?php ...
11
votes
1answer
9k views

How to fix pagination for custom loops?

I have added a custom/secondary query to a template file/custom page template; how can I make WordPress use my custom query for pagination, instead of using the main query loop's pagination? Addendum ...
0
votes
1answer
127 views

how to show posts on different pages if number of post per page is one

i have a category named "services". when "our services" is clicked control go to category.php file. in that i need to show all the posts in that service category. i can show all of them in a single ...
0
votes
3answers
81 views

content and excerpt not displaying

I am using get_the_title(453) and while the title displays, i am unable to display the content and the excerpt for the page with the id of 453. The following is my code get_the_title(453); ...
0
votes
1answer
244 views

3 random images from custom post type, each in a div with a diffrent class

I'm trying to build a loop using query posts to display 3 featured images from the custom post type 'portfolio'. My problem is that each picture has to be in a div with a diffrent class, so i was ...
0
votes
1answer
93 views

Custom Blog Loop on Home Page

I wanted to see if it was possible to display the "newest" post from all top level post categories on the home page using args in the loop? See http://blog.reneerouleau.com/dev/ for example of what I ...
0
votes
3answers
38 views

Include one page/post into query which is already returning posts

I have my news query which is on my index file. I want to include a post into this query which is infact a page. Is there anyway to do this? <?php query_posts(array( 'posts_per_page' => ...
0
votes
1answer
220 views

Order by ASC, DESC, Title, Date from URL on custom page template post

I have a Page with Custom template. In this template I have index all posts of a category with many more modification. I know i can do this by creating Category specific template but this is different ...
0
votes
2answers
217 views

wp_query within function within wp_query

I have a query which looks like this: $args = arguments for the query $query = new WP_Query($args); while ($query->have_posts()): $query->the_post(); $post_id = get_the_ID(); echo ...
0
votes
2answers
2k views

Check if meta key value already exists

Let's say that I have few posts with meta key "videoid". Value of that meta key is different for every post (and has to be different). When adding new post, how can I check if videoid with that exact ...
1
vote
1answer
119 views

PHP Code to Display Term URL & Name of a Post Under a Custom Post Type

I am featuring a post in my footer(outside the loop) from a custom post type and am using Advanced Custom Fields plugin to do so. This is the code I am using: <h5>Featured Movie</h5> ...
-2
votes
2answers
457 views

Show post titles only on the homepage

Is there any way to show a list of all posts without any preview of the content on the homepage?

15 30 50 per page