The core of the WordPress query, the loop offers an easy way to access post information and display it on your website.

learn more… | top users | synonyms (3)

0
votes
1answer
273 views

Displaying posts limit: can't get pagination to display [duplicate]

Possible Duplicate: Pagination not working with custom loop I'm creating a custom page for logged in current users to view their posts. I would like to limit the number of displayed post to ...
0
votes
1answer
336 views

WP_Query post at custom position

Lets say I have a custom query which based on two custom post types: $wp_query = new WP_Query(array( 'post_type' => array('post-type-1', 'post-type-2'), 'post_status' => ...
0
votes
1answer
749 views

issue displaying variations in custom template using WPeC 3.8.9.2

I’m having trouble displaying variations in a custom built template, each time i call the wpsc function have_variation_groups() within my loop i get the following php error ...
0
votes
1answer
811 views

Adding vkontakte social “like” button to posts results in multiple buttons on first post only

I'm trying to add a VKontakte (pretty much the russian version of Facebook) "like" button to wordpress posts by placing it within the loop along with Twitter/Facebook "like/share" buttons. While this ...
0
votes
2answers
2k views

Custom single.php files for different post formats

I have 3 custom post formats. One is for image, one for video, and, one for gallery besides the default post and they each have a view comments link on the bottom right corner at the end of the post. ...
0
votes
1answer
107 views

Exclude Authors based off date of last post

I have several writers that range from frequent to one-time writers for my blog. On my Author page, I would like to separate out writers that have not posted an article in 6 months. It would be nice ...
0
votes
1answer
135 views

Custom Post Types and 404 Pages

I have tried refreshing my permalinks but I still cant get this to work correctly. I have the categories movies, gaming, blu-ray, and tv already created, so my URLs are site.com/movies/ for example. ...
0
votes
1answer
77 views

stuck with template hierarchy

I modified my category.php file to pull posts from all the categories that are posted to a main category parent. It's working perfectly. Now I need to get it so that when you click on the child ...
0
votes
1answer
195 views

Using pagination with multiple loops causes it to break

I'm have two loops on my index page. One fetches the latest posts from the 'work' category and the other fetches the latest from the 'blog' category. (see below) I am also using a plugin called ...
0
votes
2answers
979 views

Custom template for password protected page

I have a password-protected page, for whom I'd like to use a custom template to query posts from a specific category. How can I achieve that query_posts should work only after users submit the ...
0
votes
1answer
679 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 ...
0
votes
1answer
436 views

Show last post from multiple categories using wp_list_categories

I have the following code that lists out the children categories on a separate page when you click on its parent category. The code renders a list like so: Home › Archive for IQ Issue 7 Journal ...
0
votes
1answer
239 views

Converting multiple loops into one single loop with pagination

I am using Isotope jquery plugin to filter/sort posts in Wordpress but to correctly filter the posts into the right order I have needed to output each category one after the other. To do this I've ...
0
votes
1answer
46 views

Adding if statement to content for homepage

I have an if statement already in my loop to display content based on post type. I was wondering if there was a way that I could say to ignore that section if it is the front page/homepage. Here's a ...
0
votes
1answer
238 views

wpdb inside foreach loop only returns first result - 2 other similar cases found

@Milo Problem solved, found spaces in the array $arrname. I was trying to get post id using post_name. First of all I stored all post_name in an array an then loop through the array to use the key ...
0
votes
2answers
764 views

Show default content if custom WP_Query has no posts

I have a custom loop to show posts that meet a certain set of $args like this: <?php $recent = new WP_Query( $orderargs ); while($recent->have_posts()) : ...
0
votes
1answer
122 views

Displaying posts on Homepage

I am wondering how to add a column to my homepage that shows the five most recent posts from the blog page located under the "Latest News" heading. Here is the link to my development site. ...
0
votes
1answer
46 views

Tables not showing divs and loop/php items

I know this is an absurd questions, as who uses tables anymore? I got handed this and just need to make it work really. I don't know anything about tables so it's been a learning experience. I ...
0
votes
1answer
61 views

How 'secure' are loops?

I am using loops as means of displaying personal meta and customer information on the frontend. For example, I have a page which displays a user's 'profile' information to edit. Their profile is ...
0
votes
2answers
214 views

How to create an identical second loop for attachments?

I have one loop for big images, and I need the same loop with small images (thumbnails). This is where I am stuck. Use case: I am trying to implement the elastic image slideshow jQuery plugin with ...
0
votes
1answer
187 views

Pass WP post content to a jQuery plugin (Fancybox)

I'm building a portfolio WordPress. It only displays image thumbnails, with a video element that call the fancybox. In the <a> tags, the attributes have the information for the fancybox to load ...
0
votes
1answer
174 views

Pagination in custom query not working [duplicate]

hi im trying to output pagination without any success. below is my code in a page-products.php template <?php $products_query = new WP_Query(array( 'post_type' => 'product', ...
0
votes
0answers
31 views

Duplicate post issue on multiple category loops on one page (1 post) [duplicate]

Possible Duplicate: Duplicate posts I am building a homepage template and it has an area with 4 separate category loops in a grid layout. Each loop will only show one post. The posts that I ...
0
votes
2answers
135 views

Pagination stops at page 6

The loop below works fine, apart from the fact that the pagination will always stop on page 6. No matter what arguments i specify, it will never show more than 6 pages. Does anyone know why? ...
0
votes
1answer
109 views

Change loop to display items in order

I am trying to customise a search query so that items returned are ordered in descending order. I have managed to find the loop that generates the results.... global $wp_query; $args = array( ...
0
votes
1answer
55 views

Load featured article once in a loop

I'm working on a WP-Touch theme and I have a template file that looks like this: <?php get_header(); ?> <?php locate_template( 'featured-post.php', true, false ); ?> <?php ...
0
votes
1answer
107 views

Query Custom Post Type by Tag

Kinda confused on this.. hoping someone can help. I have custom post type named "Providers" that I want to pull entries from that are tagged "highlighted". I enabled tag support on the custom post ...
0
votes
1answer
170 views

Where are my posts linked to? I keep getting a Not Found Error, and I have no single.php page

Recently I had someone customize a WP blog for me. This person didn't do a very will job so I decided to do it myself. I customized my own blog page and it all works, except for when I click on the ...
0
votes
2answers
113 views

need help looping add_action in wp

i would like to know the proper way to do this $dynValue=5;//loop this many times //start of my loop for ($num=1; $num <= $dynValue; $num++){ //note the incremented number ($num) in the call back ...
0
votes
1answer
95 views

Filtering posts by WORD in custom field

I need to filter my posts in categories pages, by showing only posts that have specific WORD in custom field value. I need php code that i should add in loop for this category. Details: I need loop ...
0
votes
1answer
34 views

Loops running into each other

I have 3 loops on one page, each pulling a different CPT into a portfolio like layout. Live: http://iassc.baltimoredrew.com/providers/ Gist: https://gist.github.com/3503334 However the tags for the ...
0
votes
2answers
1k views

Display all authors and their only one latest post

I have a website with many authors and posts. I need to create a list of all authors and for each one display his latest post (not posts, only one post). This better explains what I need: <ul> ...
0
votes
1answer
375 views

How to call the_author_meta and make it work?

I am developing an author badge for my Wordpress site and I am learning how to call meta functions (needs to be within The Loop). The meta functions that I am calling are author bio related, like ...
0
votes
1answer
127 views

Showposts doesn't show the number of posts indicated

on my homepage, I'm using several loops to display posts from different categories in various sections of the page. The code I'm adding before the loop is : <?php ...
0
votes
1answer
130 views

Display by tag from different post types

I'm trying to display posts within the WP loop and am able to successfully do so with <?php query_posts('tag_id=10'); ?> Here the loop will display all posts with the tag ID of 10, but I'd also ...
0
votes
2answers
473 views

sticky post in custom loop

I have a problem with showing sticky posts in a custom loop. This is the code I'm using to for the custom loop: <?php $post_from_cat_a = new WP_Query(array( 'category_name' => ...
0
votes
2answers
74 views

Paged homepage - requirements?

I've got the following loop in index.php file: $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $post_per_page = 30; $do_not_show_stickies = 1; $args=array( 'post_type' => ...
0
votes
1answer
47 views

Fourth page of custom post type archive page does not exist

I recently developed a custom post type for my company's blog, so that we could have a separate press area. In the archive-presse.php page I make a query, thus : $paged = (get_query_var('paged')) ? ...
0
votes
1answer
151 views

Home page loop with pagination problem

I used a loop to display posts from specific categories, then add the code for WP_Paginate plugin under that loop ... below my posts I see pagination links from 1 --> 5 , however when I press page 2 ...
0
votes
1answer
488 views

the_category() doesn't working in wp_query loop

I'm using custom post type. I want to show every post's the most child category on archive page in wp_query loop. But the_category(''); doesn't work. What should I do? I need your help. Sorry for my ...
0
votes
2answers
69 views

Way of getting queried loop before the query with a filter hook?

Is there a way to get the results of a loop with a filter before the code for the loop is performed in the structure of your code? My markup is something like this: <body> <div> /* ...
0
votes
1answer
374 views

Custom Post Type Single Loop Outputting Wrong Post

I have been unable to get my single-portfolio.php template to behave properly. So I have a custom post type called portfolio. I am displaying all of those posts in the front-page.php and it works ...
0
votes
1answer
147 views

Randomly Display One Image From a 10-Image For Loop

I have a Wordpress function that loops thru 10 input fields & saves the data from those input fields. The data entered is either an absolute or relative link to an image. The loop looks like this. ...
0
votes
1answer
148 views

Sort by category and then date?

I'll try to be as clear as possible. My Wordpress site has multiple custom categories and posts types all which need to be displayed on the home page blogroll. But I need the first post on the ...
0
votes
2answers
94 views

Least Number of Loops to Create Custom Homepage?

I am trying to create a custom homepage where the site content is shown as follows... See image... http://i.stack.imgur.com/ykrdf.png With separate loops this is simple... 3 individual query_posts ...
0
votes
1answer
580 views

Listing Specific Categories from Current Post with Depth

I've been on this for sometime and been having a ton of issues to find a proper way to do what I'm trying to achieve. An Example would be as follows: I have a featured Image with a rollover and I ...
0
votes
1answer
101 views

Why would a completely normal loop give offset errors and maximum execution time errors?

I'm too angry about this problem to see it straight anymore, so I'm guaranteed to be overlooking something simple. Please help. Here's all my code has been stripped down to: <?php $home_gallery ...
0
votes
1answer
54 views

Custom loop by url

So currently I have this working for 'search' ie: if I do www.domain.com/search/query, it returns everything it finds on the word 'query'. I would like to utilize that loop/template I created within ...
0
votes
1answer
139 views

How to looping taxonomy terms?

is there any way to loop terms in a way they display in menu? Eg: Let say I have 2 taxonomies in a post type - tax1 and tax2. They are not hierarchical to each other. If I have posts that have ...
0
votes
2answers
2k views

Exclude current post ID from loop in sidepbar.php

Currently all the below bit of code is doing is showing 3 random posts from the same category that the current page resides in. So if the current page falls in the artists category, for example, show ...