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
35 views

Some doubts about how the main query and the custom query works in this custom theme?

I am pretty new in WordPress theme development and I'm not so into PHP (I came from Java and C#) and have the following situation in this custom theme As you can see in the homepage I first show a ...
0
votes
1answer
133 views

using update_user_meta to rank users

I'm using a plugin that allows users to vote on posts, I'd like to add each vote that's cast to the authors user_meta so I can rank users the same way I rank posts. There's a couple of different ...
0
votes
1answer
584 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
0answers
10 views

Return only content in excerpt field in loop

I am sure this has been asked before, but I can't seem to find the answer, although it seems simple enough. I have built a custom theme based on another person's design. He uses both the excerpt and ...
1
vote
1answer
306 views

Enable infinite scroll on single.php

I have a problem similar to the author of this thread: Possible to paginate on single.php? I am trying to enable infinite scrolling on single.php. So far I successfully load an additional 1 post when ...
1
vote
1answer
80 views

Have different number of posts on first page

I need to have a different amount of posts per page on the first page that on the other pages. For example, this is what I need Total posts: 6 First page: showing 3 posts Following page: showing 2 ...
0
votes
2answers
49 views

How to show only the date, the title and a little “summary” of my WordPress post in my custom theme?

I am pretty new in WordPress theme development and I have the following doubt about how show posts into a page. I have this page belonging to an old custom legacy blog that I am build again using ...
3
votes
1answer
562 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
3answers
43 views

Display posts the match taxonomy term linked from wp_list_categoies?

This should be simple, but it escapes me. I have a custom post type and a custom taxonomy. The taxonomy is named "asset_type" and the slug is "type" I am using wp_list_categories to provide a ...
1
vote
2answers
560 views

Loop with slider (slider not loading)

In my slider.php I have a loop that calls for a custom post type. That custom post type has a meta box for a slide url (link/title/etc). I can see the loop and everything else is working because in ...
0
votes
1answer
25 views

What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?

I am pretty new in WordPress theme development and I have the following doubt. I am working on this custom theme: http://lnx.asper-eritrea.com/ Into this website upper horizontal main menu I have a ...
0
votes
1answer
21 views

Three Column Loop

I have a theme that creates two columns of categories with child posts from that category. I've tried messing with the code that inserts the after two posts are listed, but it's not working (because ...
0
votes
1answer
41 views

Display page of custom posts?

I have a custom post type, "design_asset". I am displaying them on a page template, with the loop <?php rewind_posts(); $paged = ( get_query_var( 'paged' ) ) ? get_query_var('paged') : 1; $args = ...
0
votes
0answers
8 views

3 Column Loop with Pagination

I tried to run a loop and split post in 3 columns and then added pagination using Wp PageNavi wordpress plugin. It was working fine from where i copied this code but it seems to be not working for me. ...
0
votes
3answers
426 views

Remove comma from last item output from loop

(or add comma to all items but the last one...) Most of the information I have found relates to using a counter within a foreach loop. In this particular situation I am using Advanced Custom Fields ...
0
votes
1answer
20 views

Change position of entry title

I've been unable to move the post entry title to under the post's image. Whenever I do this, the title moves under the content and appears just above the footer. loop-single.php - <?php if ( ...
1
vote
2answers
840 views

Specific Loop For 2 <div> Within Each <li>

I need to create a loop that can logically be described as the following for a carousel: Requirements: 3 Loops 2 Posts Per Loop No Duplicates Order by Post Date Visual: < Start Loop #1 > ...
0
votes
1answer
800 views

Conditional two level dropdown filter for custom post type

I have set up a custom post type and taxonomy. The post type is called Local Services and the hierarchical taxonomy is called Regions. The Regions have child categories called Areas. I have set up a ...
0
votes
0answers
6 views

BuddyPress Members Loop does not filter members by meta_key usermeta and meta_value

I have this code: bp_has_members( 'meta_key=my_status&meta_value=activated' ) But it does not filter members who have usermeta key as "my_status" and value as "activated". Instead it shows all ...
0
votes
2answers
263 views

Display post thumbnail for specific category outside the loop

I'm building a theme that features a section wherein I'd like to have the single most recent post's thumbnail of a single category displayed between the header and blog sections. Something like ...
1
vote
1answer
2k 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 ...
0
votes
1answer
31 views

Keep post format class with isotope filter

When I add isotope filtering for displaying posts, I lose the format class. WITHOUT isotope filtering: <article id="post-22" class="post-22 post type-post status-publish format-image hentry ...
0
votes
3answers
38 views

Targeting custom post type

I have the following loop working as I want it but I need the 'activists' list item to include <?php the_post_thumbnail(); ?>. What would be the best way to write this? <?php ...
0
votes
1answer
47 views

IF have_posts contains posts from a certain category

This issue is still unresolved! Big request to the experts in short essence: How can i ask in my WP template, IF the whole array of have_posts contains any post from a certain category I programmed ...
0
votes
1answer
322 views

Create a custom taxonomy template that loops through child categories in term order?

We're building a site that sells Biking Gear We're using the Genesis Theme Framework, and developing a custom child theme. It has a Custom Post Type for Products, made with the "Custom Post Type UI ...
2
votes
4answers
2k views

Order posts by custom field and if custom field is empty return remaining posts

I have an archive page ordered by a numeric value in a custom field. This returns the ordered posts correctly, but does not display posts that don't have a custom field. $paged = ...
0
votes
1answer
32 views

Remove duplicated values from a loop

I have a loop that outputs <option> fields for a <select> group. It contains many cities' names for many travel packs that I am publishing. The trick is that I need avoid repeated values. ...
0
votes
0answers
22 views

Individual page data in one page template

So I am trying to create a one page template but still allow the user to add separate pages in the admin panel. What I did to output all the pages in one template file is as followed: <?php ...
0
votes
1answer
300 views

Video post format, extra content breaks video embed

I am using the content-video.php include to show the latest video post on my homepage. The include only shows the video from the post and not the rest of the content, which works well. My problem is, ...
0
votes
2answers
475 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
1answer
20 views

Infinite blog loop

I can't figure out why I'm getting an infinite blog post. When I comment out loop code in content.php, it no longer loops. I'm trying to post items based on post format and failing so far. Let me know ...
0
votes
1answer
21 views

do_shortcode close

I am using the jscrollpane plugin on WordPress along with the advanced custom fields plugin. The jscrollpane plugin uses the following shortcodes: [vr_jsp] [/vr_jsp] I have two different custom ...
0
votes
1answer
283 views

offset WP_Query by negative 1

I have an event loop and I was wondering if it's possible to somehow offset the loop by -1 so the prev and next posts of the current post are shown. --edit-- Okay thanks for your comments, my ...
0
votes
1answer
29 views

Sticky posts are not showing at the top of category posts

Can anyone tell me why sticky posts are not being displayed at the top of the following query: $wp_query = new WP_Query(array( 'post_type' => 'post', 'posts_per_page'=>10, ...
0
votes
1answer
25 views

Filtering posts by multiple taxonomies

I have a page on which I want to display all posts of a specific custom post type, let's call it "persons". I want to allow the user to filter all persons by multiple (!) taxonomies: age, city, ...
-1
votes
0answers
24 views

Organize posts by category with category title after while (have_posts()) : the_post();?

I want to loop through the posts already queried and only after (not before) organize by category title then list the posts in each category. This is what I have so far, it only grabs the category ...
0
votes
1answer
32 views

WP_query returns error when used for custom widget

I was working on creating my first plugin/widget that should display a really simple loop containing only a custom field (image) I've been testing the loop without any problems in my theme but when I ...
0
votes
2answers
403 views

WP Query - duplicated posts once including tags in search results

I running WordPress on IIS & SQL server. As some of the plugins do not work correctly with DB ABSTRACTION I am using a lot of functions.php filters as so on. To make my search results include ...
0
votes
0answers
19 views

Find relative post number in single post page

My problem: I need to find the relative post number (e.g 3rd of 10 posts) within a category. I can get the total amount of posts (10), like so: $category = get_the_category(); ...
0
votes
1answer
400 views

meta_query on a date range using an array of values

How can I do a query to return the post if the custom field array contains a date that is within the specified range? The query below is basically what I am after but it does not work... // the ...
0
votes
1answer
34 views

WP Knowledge Base Theme bug - Subcategories and Articles, Need to change WP_Query

I'm using the WP Knowledge Base theme, which is almost perfect for the project I'm on, but I discovered an unfortunate bug. On the home page, if you have both SubCategories and loose Articles under a ...
0
votes
2answers
383 views

How to use WP_Query() on single.php?

I'm using WP_Query() to pull out a few posts under a specific category "Featured" to display at the bottom of any post. So I added <?php if (function_exists('getEditorPicks')) ...
0
votes
1answer
26 views

Automatically create a loop for post ID

I am having trouble generating a loop for my post. The JS calls the slide_ID which then needs to display each slide-ID in numeric order for it to work. Example for slide-1 to scroll to its next slide ...
0
votes
1answer
240 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
0answers
24 views

How to open particular featured image clicking on desired post using javascript in wordpress?

I have created a custom post type "gallery" and created seven post in it. Since I am using dynamic featured image plugin of wordpress so I assigned two featured images to each post. Then I ...
0
votes
0answers
10 views

Why this Wordpress page.php file contain the posts loop? [duplicate]

I am pretty new in WordPress theme development and I have the following question about the page.php page contained into templates files (the file that describe the template for the static pages) I am ...
0
votes
3answers
330 views

How to show custom post type on homepage and in categories

Details Wordpress Version: 3.4 Theme Deadline Version 1.2 Site URL: littlenomads Plugin being used to create the Custom Posts Types 1.Types Plugin – Custom Post Types, Taxonomies and Custom Fields ...
0
votes
1answer
21 views

Split loop into columns

I'm trying to split my loop into 4 columns. My logic is very flawed here and my layout is breaking. Such a simple problem, but I'm struggling with it. I essentially need each group of four posts to ...
0
votes
2answers
24 views

Display Featured Image

I am having some issues trying to get featured image to appear on my front page. I am using Genesis, then genesis child theme. I only want the featured image to appear on my front-page.php. I know I ...
0
votes
1answer
265 views

Loop and add Specific Categories and Products Images

Thanks to Rafael Marques I have a list of Products and Categories organized based on different created categories. I also have 5 different Custom Page Templates. Now I would like to display the ...