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)

3
votes
1answer
56 views

How can I create a loop to build slides based on multiple categories using Coda Slider

I'm using a loop to generate the slides I need for a Coda Slider slideshow. The slides should be pulling the most recent post from 5 different categories. The problem I'm having is that it's pulling ...
3
votes
1answer
181 views

How to show list of posts by author and category?

Let three categories and their IDs: cat1 = 1 (parent) cat2 = 2 (child of cat1, parent of cat3) cat3 = 3 (child of cat2) Let each category has 3 posts, they are: post1, post2, post3. And each posts ...
3
votes
1answer
255 views

Creating nested forum loops in bbPress

I'm creating a customised forums front page for bbPress, by listing forums in a different way to the bbPress default. Essentially what I'm trying to do is replace the use of bbp_list_forums() with a ...
2
votes
1answer
57 views

Exclude category from loop not working

I have this code in my index.php file. I have a different template for a static home page, this is the blog page. I'm trying to exclude all posts with the category "new" which is tag_id "13" <?php ...
2
votes
1answer
306 views

Generating dynamic Tabs with multiple query post loop

I am trying to generate a dynamic tab based navigating with query post my code is like this <div class="tabbable"> <ul class="nav nav-tabs"> <?php ...
1
vote
1answer
452 views

ajax for filtering posts by category in wordpress loops

I've been looking around for a way to filter my posts on http://www.waziproject.com/wazimagazine/ without reloading the page. So my question is if anyone can help me out to turn the following into a ...
1
vote
1answer
145 views

Listing all term items alphabetically / sorting loop

I have my own custom post type and it has its own taxonomy and terms. Whenever user visits http://example.com/mytaxonomy/myterm I want the page to display all items within this term alphabetically. ...
1
vote
0answers
38 views

get_template_part from plugin

This is default get_template_part function inside WordPress: function get_template_part( $slug, $name = null ) { do_action( "get_template_part_{$slug}", $slug, $name ); $templates = array(); ...
1
vote
0answers
75 views

Custom post type conditional in loop

I need multiple loops on a page and have created them as such global $post; $args = array( 'numberposts' => 3, 'category' => 10 ); $myposts = get_posts( $args ); foreach( $myposts as $post ) : ...
1
vote
0answers
167 views

Loop that displays PARENT PAGE & CHILD PAGE & outputs GRANDCHILD PAGE title and content

I've never posted here, but I'm tired of slapping code together. That said, I would be most appreciative if someone could help me with this. I need a page template that: outputs the PARENT PAGEs, ...
1
vote
0answers
219 views

Display one post from each term in a custom taxonomy

I am trying to display a list which shows one post (and information about the person posting) from each custom taxonomy term. The code I am using is as follows, but it is instead printing out EVERY ...
1
vote
0answers
55 views

Display posts with comments closed, with pagination?

i'm using a custom query, which needs to display all posts with closed comments. I have this <?php $the_query = new WP_Query('showposts=-1'); ?> <?php while ($the_query -> have_posts()) ...
1
vote
0answers
68 views

Problem getting current post tags to show in a widget

I have tried tons of examples and suggestion on this topic but I can not get them to work. What I am trying to do is display the tags associated with the current post in a widget. I have built the ...
1
vote
0answers
520 views

Display products for a category, sorted by post_excerpt

I'd like to display a list of products for a certain category, sorted by the post_excerpt. The original code I used was this: $args = array( 'tax_query' => array( array( ...
1
vote
0answers
59 views

Modified loop-single-forum.php to work inside of a sidebar Widget, not working on some site pages

So I took loop-single-forum.php, copied it and renamed it, fixed it so the site is calling the copy and then removed what I did not need from it to place it in a sidebar widget. It works beautifully ...
1
vote
0answers
116 views

List authors with the last post title and order by last post date

I want to list authors with last post data and order them by last post date. Now i have this codes but i don`t know how to edit them. // Selects from tables wp_users and wp_posts, selecting published ...
1
vote
0answers
82 views

Order by category titles

I have a category page called 'features' this is all fine, but the posts in the features category also belong to a certain genre of film, and it's this what I want to order the posts by on the actual ...
1
vote
0answers
55 views

Access to Media Library

Im trying to find a way to pull random images from either a post or wordpress's built in image library. Im not sure how to query image uris from a post or the media library - is there a tag or method ...
1
vote
0answers
79 views

Replace default Wordpress search behavior with Sphinx

I want to implement Sphinx Search in my Wordpress site but I'm not exactly sure how to change Wordpress search behavior to use Sphinx. How do I get Sphinx Search engine to replace whatever Wordpress ...
0
votes
0answers
23 views

I have a complicated loop query, that I want to output into grids

The code below loops taxonomies, then loops posts within each taxonomy. I would like each taxonomy group put into a CSS grid column. How do I get this into grid rows correctly? <?php ...
0
votes
0answers
30 views

Advise on Templates for Custom Queries

I'm trying to figure out the best way to solve this problem. I have a couple of archive type pages that display content from multiple post types at once. For example, I've overridden the default ...
0
votes
0answers
20 views

Run a query when in last category

Can anyone help? ive searched google but with no luck. currently Accounts has sub categories but no posts /accounts/ = /billing1/ + /finance/ Billing and finance have posts but don't want ...
0
votes
0answers
20 views

Get posts by subcategory 'name' not the slug?

For each category I have 2 sub categories with same name. For example, Category1 has two subcategories: Sub1, Sub2. On the category archive page, I want to display the posts from Sub1 and Sub2. So ...
0
votes
0answers
19 views

Listing custom post type items from a couple of custom taxonomies

I know I have asked a similar question in the recent past (Listing all custom post types using a specific term on the said term's template page, in groups), but in this case, the template is more ...
0
votes
0answers
50 views

How to exclude child terms from tax query foreach loop

I have this query which is working fine but I can not get it to exclude child terms and include only parent terms. This is what I have so far -- <?php $custom_terms = get_terms('videoscategory'); ...
0
votes
0answers
37 views

Limit categories appearing in latest feed

I am using ColorLabsProject's 'Reportage' theme ( http://demo.colorlabsproject.com/reportage/ ) as a mobile site and the six categories listed at the bottom of the front page are pulled in ...
0
votes
0answers
65 views

Dynamic Dropdown populated with Categories from current page?

I have a page where it lists the category name with it's posts under. On this page it only lists the posts that are also in another custom taxonomy. To do so I am using this code which works fine -- ...
0
votes
0answers
37 views

Avoid duplicate posts from sidebar widget on homepage?

In a normal dynamic sidebar of a theme's homepage template the sidebar widgets display lots of duplicate posts on the front page. It shows "recent posts" and posts from certain categories in main ...
0
votes
0answers
22 views

Same Loop on Multiple Pages

I have my main loop (loop-entry.php) pulling to my index page which is my homepage on this site: http://snippetmagazine.com/ when I tried to copy that loop and create (loop-blog.php) and included it ...
0
votes
0answers
33 views

For loop logic for combinations

I have WP E-Commerce installed and I'm moving whole it's dashboard to frontend. I have everything ready and am on the last part. In fact I thought this part was ready, until I added two variations, ...
0
votes
0answers
48 views

Posts 2 Posts, losing connection in template parts

I am using the Post 2 Posts plugin to connect different post types. My code works perfectly when it's all in one file (archive.php). The problem I have is taht I want to split out the part that does ...
0
votes
0answers
29 views

Archive Listing Page Theme

I am working on a wordpress template that needs a 'special' category listing page. First of all, the page kinda needs to look like this: http://quicksnaildesign.com/example-closed.jpg When you ...
0
votes
0answers
30 views

display comments in a lightbox like overlay window

I want to display the comments in a lightbox style window when the user clicks on the number of comments in index.php (instead of going to the single.php) without any page refresh. I tried searching ...
0
votes
0answers
39 views

Showing sticky posts with get_posts()

I'm using this to retrieve posts on my index page: <?php $posts = get_posts( "category=13&numberposts=2" ); ?> <?php if( $posts ) : ?> <?php foreach( $posts as $post ) : ...
0
votes
0answers
64 views

Multiple Wp-Query Loops inside index.php

The site url is: http://aachurch.org/reborn I'm trying to achieve multiple wp-query loops inside my index.php, showing different categories of posts. The first loop works but nothing shows up for the ...
0
votes
0answers
33 views

confused on the_loop

I have been messing around with my loops trying to figure out the best way to accomplish my task. I have changed the index.php file to this <?php if ( have_posts() ) : ?> <?php /* ...
0
votes
0answers
19 views

On single.php, fetch 2 posts created after and 2 posts created before in relation to the actual post (using menu_order)

Looking for a way to on single.php fetch and show the actual post, and then by looking on the menu_order value of that specific post (lets say the post have menu_order value 3 in this case) go and ...
0
votes
0answers
20 views

Looping through textfield submission and saving each element to the corresponding element

The following code loops through posts, and than displays some information about them. Next to this displayed information is a text field in which the user can enter text for each element. When the ...
0
votes
0answers
86 views

Foreach displaying all posts and not the value set in WP back end

Pagination just isn't working correctly with my foreach code. I have to manually set the post per page count for it to work but I'd like it to use the WP back end value (Set in settings > reading) ...
0
votes
0answers
16 views

How to sort through and display several CPTs on a single page

I built this site http://sparkfitnessbootcamp.com/ However, everything has been hard coded and is very difficult for the users to manage. So I want to create CPTs to make everybody's life easier. ...
0
votes
0answers
70 views

How to display custom post types by custom taxonomy in while loop?

I am using Posts 2 Posts to display a custom post type on a page. Document status, document author and feedback due date are custom fields. Package is a custom taxonomy. I want to display my custom ...
0
votes
0answers
26 views

Including author posts and custom post types in the same loop

I have an author page with a special template I built for my purposes it's of course called: author.php it basically display some details about the author and his (or hers) latest posts. the problem ...
0
votes
0answers
52 views

Archive page - display specific post first

This is something I haven't heard of before but must be fairly easy to do? In the archive.php file, Given the id of a certain post (probably passed as a variable through the url) I want to know how I ...
0
votes
0answers
39 views

WP_Query returns 100 results on homepage

Bit of a strange one this... I've recently migrated a site from wordpress.com to my own server. In the new location, however, wp_query always returns 100 posts on the homepage, regardless of which ...
0
votes
0answers
33 views

Price list, query/loop within query/loop

Price list, query/loop within query/loop. Hi all I'm developing a theme for a cafe. The page structure is something similar to Home | Menu | Starters - starter_1 - ...
0
votes
0answers
34 views

Retrieving Categories of posts which have a custom Taxonomy

I am working on an event management WordPress site which has multiple taxonomies (Photographer, Event Manager, Decor, etc). I want to create Taxonomy pages for each of these taxonomy (this is the ...
0
votes
0answers
377 views

How do i paginate a get_posts() request inside another page loop (Paginating childpages)

The heading says allot, so ill repeat it here "How do i paginate a get_posts() request inside another page loop?" I'm using a page to display child-pages and i need to paginate them. Edit: Should i ...
0
votes
0answers
232 views

Sorting loop by 'orderby' 'modified' not working?

I'm trying to build a photostream that sorts the loop by the modified date of a post type. The goal being that as a post is updated with new attachments, it gets pushed to the front of the loop. My ...
-1
votes
0answers
25 views

get_terms wordpress

I created one PHP class that has a method which is using get_terms() function of word press. Then I am creating the object of that class in other PHP file and calling that method, the method is called ...
-1
votes
0answers
32 views

Display Child Pages, title and excerpt on to homepage

I would like to do something like shown below, but don't know the proper code. I basically want to pull the title and excerpt of child pages and display it on the homepage. I want to be able to list ...

1 2 3