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)

1
vote
3answers
125 views

Previous and Next Post link doesn't work

In single.php I tried to add inside the loop the previous_post_link and next_post_link. But nothing is rendered when a view the source of the site. I added the previous_post_link inside an h4 tag to ...
-2
votes
0answers
12 views

idea about managing cashback site on wordpress

i want to know how can i manage a cash back site on WordPress. i am already doing user tracking , so i know which user purchase. i do get CSV from my Affiliate network. So i just want to know how ...
2
votes
1answer
356 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 ...
0
votes
1answer
606 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
25 views

How to get rid of extra Untitled Article in html5 document outline when using new WP_Query?

Here is a simplified version of the code I'm using on a static homepage template made for a child theme of TwentyTwelve. I simplified some of the divs used for styling and just focused on the problem ...
0
votes
1answer
22 views

An archive page without post format (just standard post)

I'm trying to get posts with not marked with any type of post types (aside, audio etc). But I didn't find any solution to do this. I thought doing this with custom fields but site has a lot of ...
0
votes
1answer
19 views

WP_Query on custom post type not displaying, multiple loops & get_template_part

I'm having problems getting my testimonials to display. On page.php I have a testimonials section. So I have a loop that grabs the content for page.php, and then a get_template_part('content', ...
0
votes
1answer
30 views

Redirection loop error after login from a custom post type post

I have created a custom post type called portfolio so such posts have an url like this: mydomain.com/portfolio/post-name/ This is fine so far, however i just found I am having a problem with my ...
0
votes
0answers
24 views

Sub-menu on child pages as well as parent page

So here's what I'm trying to do: I'm trying to develop a theme that shows any sub-pages on the parent page. I've gotten this running successfully with a WP_query and a simple loop: <!--show sub ...
1
vote
2answers
580 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
2answers
32 views

ACF PHP foreach loop, different queries returning the same result for $term->name

Using Advanced Custom Fields, I have created a repeater that contains sub_fields 'name', 'image', 'description', 'file' and 'category' ('category' being a custom taxonomy) Using a basic php foreach ...
2
votes
1answer
25 views

Show posts without term

I am working on a product page where I show reviews from my post type 'reviews', if the product page title matches with my term from the taxonomy 'review-product'. Example. Product page title: ...
2
votes
2answers
950 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 > ...
3
votes
1answer
273 views

Endless loop with wp_insert_post and wp_update_post

I have an array $unqiues which contains URL's, I loop over the array with the code below to get the URL titles, insert a new post, update the post meta. Then I change the the posts title and name to ...
0
votes
0answers
19 views

Display all posts in a four-row, three-column page [on hold]

Every WordPress theme that I have ever worked with always displays these category pages in a one-column vertical layout. Seeking Help to Achieve What I am seeking and struggling to achieve is a ...
0
votes
1answer
31 views

Structure and Display Content from Multiple Pages on Single Page

I am trying to display the content from multiple pages on a single page. However, for each page I need the title, excerpt, content and featured image. The display of each page's content has a ...
0
votes
1answer
946 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 ...
1
vote
2answers
484 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' => ...
1
vote
2answers
31 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
2answers
33 views

How do I style the first two posts of a loop

I'm trying to style a single loop to look like so --------------------------------------------- || | || || || | ||--------------|| || ...
0
votes
0answers
44 views

Advanced wp_query - custom date and postname

I'm trying to write a query and sort by: custom date postname (in reverse order) because my postnames have a version string at the end and the latest entry should stay on the top of each other. ...
0
votes
1answer
27 views

Creating a archive for taxonomy terms, not the term results

So I am attempting to build the first page in my navigation hierarchy to choose product categories. I have a custom taxonomy called collections. I would like to create a page that loops through all ...
0
votes
1answer
339 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 ...
1
vote
2answers
60 views

Single Page Wordpress Theme - Using page templates

Well I am lost, its late and I have been searching google all night. Heres the problem I am running into. I am trying to create a singe page website using wordpress "pages". How I have initially setup ...
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
0answers
37 views

How to show subcategories using loop?

i am using wp_list_categories('child_of=54&title_li=') method to display all the subcategories, but it is showing only one, how can i use it with loop to show all the subcategories properly.
4
votes
1answer
50 views

How to place a loop within another loop?

I have two loops setup using WP_Query: $latest and $popular that I'm working to setup in this example layout: Latest                        ...
0
votes
2answers
292 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
0answers
34 views

Multiple Loops Meta Data

I am now trying to figure out how to create the functions/ loops to pull my data from custom post types. I have two post types(keys): And I need to pull the data from both to run my functions. ...
3
votes
1answer
24 views

Query Custom Meta Value with Increment

I have a Query searching for a meta value I have added to my posts (meta-select). I have it feeding out in a loop with 4 results. Let's say I want this loop to start with the meta value "2" and work ...
0
votes
1answer
309 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
11 views

If Specific Post, Link Elsewhere

I would like to create a conditional statement that checks the loop for a specific post ID, then if true, it outputs a link elsewhere. This is what I have so far: <?php ...
0
votes
1answer
16 views

How do I get my custom query to work with search results after the first page?

I am using a custom query in order to ajax load/append additional posts instead of paginating them out like WP defaults. However, when I click the button I've made to load more posts, it loads all ...
0
votes
1answer
19 views

Problem with Front-Page.php loading recent posts

Hi I this weird problem where i have my custom front-page.php with set page (in Reading Settings) static page. What I want to have is a static page with welcoming message and later 1 recent posts ...
0
votes
1answer
19 views

I want my wordpress loop to only display posts of the standard format

I currently have the following php code for the content loop on my homepage. <?php if ( have_posts() ) : // Start the Loop. while ( have_posts() ) : the_post(); ...
1
vote
1answer
94 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
0answers
21 views

How do I get is_single() to return true when called internally from the_content()?

I have a custom page, e.g. blog.php?post=42 that shows a GET-specified post like so: <?php require('wordpress/wp-blog-header.php'); ?> <!-- my non-wordpress site's html goes here --> ...
4
votes
1answer
91 views

Inject post (from specific category) between posts in Loop

I would like to add a post (from specific category) between posts in the WordPress Loop (such as 'Sponsors'). Example: P P P S P P S P P S P P How can I achieve this? I am a beginner with coding, so ...
0
votes
1answer
30 views

Custom post type archive organized by category

I'm trying to display a custom post type archive page which displays all the articles of a a custom post type in columns. The columns organize them in their assigned category. On the main page, I do ...
0
votes
1answer
323 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
2answers
433 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
1answer
242 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 ...
1
vote
2answers
41 views

Ways to have multiple front-page.php templates that can be swapped out?

I essentially want to create several different front-page.php templates with different loops and layouts and then present an option in the admin panel to select one template on one day and a different ...
0
votes
1answer
561 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
20 views

foreach loop inside the loop creating duplicates in output

I have a foreach loop inside the loop that is getting info from a separate table. The table has a column that has an id that reflects the id of the post type so it should always be unique. When I ...
0
votes
2answers
20 views

Syntax error when I try to insert my loop into an unordered list? [closed]

I am very new in PHP and WordPress development and I have the following problem trying to insert some HTML code into the posts loop. I tried something like it: <?php if (have_posts()) : ...
0
votes
1answer
581 views

How do I get my loop.php to properly paginate?

I am using the Starkers theme as a foundation to build my theme and I am having difficulty getting my loop.php to paginate posts properly. When I click the "Next" or "Previous" post pagination button, ...
0
votes
1answer
289 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 ...
0
votes
1answer
18 views

Why isn't my multiple loops working?

I would like a multiple look to display the_content from the current page, & from another page. My multiple loo doesn't seem to be working. Can anyone advise, please? while( have_posts() ): ...
0
votes
1answer
15 views

How to show the posts list into a static page? Problems to use the loop into a static page

I have the following problem: I have to create a posts archive into a static page. So I have created this page template containing the loop to interate on my posts: <?php /** * Template Name: ...