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
0answers
71 views

This webpage has a redirect loop issue with SSL page

I'm having an issue with the code below. As of right now, my domain is http://www.mydomain.com. When I try to click on the register link, I get an error saying: --This webpage has a redirect loop-- ...
0
votes
0answers
26 views

How to setup the landing and entry pages for a custom post type

I have created a custom post type called services but am not sure if they way the setup pages is most optimal. For the landing page, I have created a normal 'static pages' called services and am ...
0
votes
0answers
43 views

need a wordpress loop to put in the sidebar

I need WordPress loop to do the following : check if there is no sidebar widgets active then get 5 recent posts with only titles and thumbnails But here is the thing : I don't want the loop to get ...
0
votes
0answers
61 views

Problem with the loop?

I'm customizing my Twenty Twelve theme to show a single posts from two separate categories on my home page using a custom template. Here's my code : <div> <?php $catquery = new ...
0
votes
0answers
55 views

Buddypress registration page redirection loop errors after adding if(!is_user_logged_in)

I'm running WordPress Multisite install with BuddyPress (WP 3.9, BP 1.9). I'm using the code below to make the main website protected from not-logged-in users, and let them to visit only the ...
0
votes
0answers
30 views

Wordpress Next & Previous post outside the loop

As a (front) designer I'm looking for the following: How can I get the following code working for next/previous posts OUTSIDE the loop? <img src="<?php get_featured_image ?>" /> ...
0
votes
0answers
21 views

Load Index on “Earlier” Post, Prev and Next Links

how would i load the index of my blog at a later point in the reverse chronological feed while maintaining the chronology of the feed overall? i found this explanation of how to load the feed at a ...
0
votes
0answers
44 views

How to get multiple loop in category.php, my scripts becomes madness

I am trying to develop a category.php page for my new theme and the loop which I’ve developed shows all posts of my blog and really bad too. I'm not an expert in WordPress theme development and ...
0
votes
0answers
40 views

Suppress the_content filter in a nested loop

I have some layout changes that are being applied to the_content. I need to do one of two things, but neither is working as expected... either: Pass data to the filter so that it knows if it is a ...
0
votes
0answers
65 views

Custom query, static page pagination and canonical

We have a custom query used in a template file, which is a page builder, with pagination that query latest posts. The problem is with Yoast SEO plugin and it's canonical URLs. When we navigate to any ...
0
votes
0answers
98 views

CPT Main Loop Pagination in single.php

I have a CPT single template (single-work.php) where I need to repeat the loop of posts found in the main loop (archive-work.php). I am using the same loop code in both templates (as well as ...
0
votes
0answers
30 views

Is including the loop necessary for page.php?

QUESTION: Is it necessary to include the wordpress loop in page.php? If it is not necessary, why do many themes (including the wordpress 2013 default theme) include it? I noticed this discussion on ...
0
votes
0answers
24 views

modify default HAVE_POSTS() Loop without inserting new variable (i.e. $loop->HAVE_POSTS)

i want to modify while ( have_posts() ) : the_post(); the default way is: $loop = new WP_Query($args); while ( $loop->have_posts() ) : $loop->the_post(); but i dont want to insert a new ...
0
votes
0answers
55 views

WP Infinite loop

It is not working. add_action( 'save_post', 'jdev_save_custom_meta_box', 13, 2 ); function jdev_save_custom_meta_box(){ global $post; // Get our form field if( $_POST ) : if ( ...
0
votes
0answers
132 views

Get gallery and product gallery images full size

I'm trying to get all gallery images in a while loop of posts (for example a blog page). With the code I'm using right now, I only get the small thumbnail images (150px : 150px). Also I want to get ...
0
votes
0answers
1k views

AJAX with loop filtering categories

I've been researching on how to make my loop with AJAX. I found some codes online and modified some parts but I can't seem to get it to work. This is my code for the loop: <article id="main" ...
0
votes
0answers
24 views

how to get post shortlink outside loop in wp

i need to show post shortlink outside loop in wordpress i use that code but didn't work the Code : $id=get_the_ID(); echo wp_get_shortlink($id); thanks
0
votes
0answers
43 views

Display all posts in a custom post type, grouped by a custom taxonomy term then paginate

I'm helping someone out that wants to sort their custom post type of "property" alphabetically by the value assigned in the custom taxonomy of "city" The below code works great for that: <?php ...
0
votes
0answers
48 views

Detect Page Template inside Loop possible?

I'm a bit stuck with my actual theme development. I'm using different Blog Templates to choose from. Now each of those Blog Page Templates has a custom loop to pull the posts. Inside that loop I use ...
0
votes
0answers
27 views

Display Post by menu order

I want to display posts on my homepage. But I like to manage the posts using Wordpress Menu, so I can easily add, delete, and re-arrange the ordering of posts displayed in the homepage. For Example: ...
0
votes
0answers
11 views

Adding comment template on a loop into a page

I've created a loop in a page, with a single post per page. The type of post is the default "post". Now, I've resolved the problem of pagination on this page, but I cannot show the comment template on ...
0
votes
0answers
115 views

Contact form 7 inside a colorbox which is inside the loop

I have a download button on my website. On click on the download button a colorbox will open and a download form will be there in that colorbox. The link to download will appear only after ...
0
votes
0answers
38 views

Custom list of categories that is sortable by count

So I am attempting to use bootstrap with wordpress. Inside my left column my design called for a large box and then 4 smaller ones below. Those boxes would hold information about a category. There ...
0
votes
0answers
89 views

How to Display Custom Post Type's Gallery (images ) in Through WP_Query

I am trying to load an Image Slider images from a Custom Post Type image Gallery Feature. For example let say I have an Custom Post Type called banner which I can load images to it's Gallery and I ...
0
votes
0answers
28 views

Customized custom content type archive

I'm on the archive for a custom content type which currently has four instances of said type. On the main page of the archive I'd like to show some intro text, a search form, etc, and then include a ...
0
votes
0answers
97 views

is_page() is not executed

I am making infinite scroll page. I created a page template where posts of certain category are loaded. Everything works fine with a single page and single category. But I have three pages with this ...
0
votes
0answers
145 views

WP blog posts index URL

I want to use WP for a site that blog is just one aspect of it, and I don't want requests to home_url list blog posts (post_type=post), I want them be to fetched using another URL. This topic ...
0
votes
0answers
20 views

How can I create a loop with specified category include pages with custom field

I created a loop for list all post with specified category $args = array( 'cat' => "category", 'showposts' => "5" ); // The Query $narga_query = new WP_Query( $args ); // ...
0
votes
0answers
20 views

How to retrieve parent pages

I have this pages and all are parent of Media: Behind-The-Scenes: Commercial "I KNEW YOU" BEHIND-THE-SCENES RED Album Art 2012 - Rio de Janeiro, Brazil SPEAK NOW EXHIBIT 2012 Australia/New Zealand ...
0
votes
0answers
39 views

custom post type with group

I am using Advanced Custom Fields. Now I want to group with matching title for example I am getting this output in my code: Red 03:39 I Knew You Were Trouble Lyrics Coming Soon… The Hunger Games ...
0
votes
0answers
37 views

Return only posts in a primary menu within loop in the order in which they appear in the menu post__in

I'm working on a single scroll site. I want to include ONLY pages which appear in the primary menu of the site. If a page is not in the primary menu, it should NOT be included in the loop. I also ...
0
votes
0answers
29 views

Sort posts by each day in the loop

I want to sort the posts in the loop by each day's posts. Since I have added filter to get posts from only last week, therefore there will not be repeating days (eg. There will be wednesday only ...
0
votes
0answers
178 views

Converting an existing query_posts to WP_Query

I am having trouble trying to convert my query_posts loop that is bugging out to a WP_Query, was hoping someone may have some luck looking at it: This is my old loop: <article ...
0
votes
0answers
166 views

loop through custom post types with meta data

I'm really curious as to how might be the quickest way to loop through a custom post type with meta data. I have some code that works but it's slow. I'm using wp_query and it works. I have also a ...
0
votes
0answers
48 views

Show post when both categories are present but not one of them

I'm having issue filtering posts by category. There is the A category for posts (which is the default and also applies when no category has been set explicitly) and B category with subcategories for ...
0
votes
0answers
90 views

How to order query by numeric meta value?

I cannot order my query by meta value by numbers, and ordering by post order does not work too. This is my code: <?php $args = array( 'posts_per_page' => '-1', 'post_type' => ...
0
votes
0answers
80 views

SQL Statement to sort custom query over multiple meta fields with duplicates?

i'm normally doing more Design/CSS stuff, so please be patient if this question is a nobrainer... My question is as follows: I have a custom post type, that has multiple custom fields. Now i need a ...
0
votes
0answers
54 views

How to make featured listings show first on my homepage?

I am new in to wordpress so excuse me if I sound stupid. I don't know exactly in which .php file to look and what to change. From what I searched until now I found a solution to add: <?php ...
0
votes
0answers
13 views

Adding blog loop to home page

I want content to be on the homepage of my Wordpress site, but I also want a loop to the first 10 blog posts displayed at the bottom of the homepage. I am not all that familiar with coding so please ...
0
votes
0answers
45 views

Adding a Blog Loop to Static Home Page

I am new to WordPress and not that familiar with coding. Could someone explain how to add a loop to my blog to the static front page? I'd like for the first 10 blog posts to be displayed under my ...
0
votes
0answers
787 views

pagination broken - clicking next displays “page not found”

I'm a newb at Wordpress, but my HTML/CSS is ok. My site is: http://www.modernfuture.net/wordpress been working on it this for quite some time & I'm done with the headaches, need to get some ...
0
votes
0answers
82 views

Get last 5 days with posts

I am trying to get a solution to this question of mine http://stackoverflow.com/questions/18487639/date-base-archive-on-wordpress-homepage I am trying with multiple loops, if thats possible. But I ...
0
votes
0answers
23 views

Style oldest post

I've managed to find a loop that targets both the latest post, as well as the rest of the content. However, I need to find a loop that can style the last post. Would anyone know how this is done?
0
votes
0answers
15 views

Customising a permalink page

Can I customise a permalink page in WordPress? I've got HTML in the loop in that is fine for index.php. However, I need to tweak what is actually seen on the permalink page. Is this possible in ...
0
votes
0answers
30 views

the_content() function in loop-single.php

i need to show to different layout based on featured_image size for that how on can the_content() as per that. if featured_image .size =={ the layout would A } else{ the layout would B } how does on ...
0
votes
0answers
33 views

Turn post into simple slideshow

I'm new to WordPress development, but I've coded a template page for a friend. I'm trying to convert the following html into a single post: <div class="container"> <div ...
0
votes
0answers
103 views

Editing the Loop to show a sticky post and then order the post randomly

I have edited the loop in my archive.php to show my posts in random order. I am trying to have a sticky post showing before the random posts. Can you please help me with the sticky post code in my ...
0
votes
0answers
57 views

Changes in a home, two columns

I'm working with this template (this is a demo), I need the post shown on the home to appear in two columns rather smaller in width. Enclosed is my index.php code, I've tried everything by various ...
0
votes
0answers
50 views

How to loop two arrays from custom post types

Not sure if I'm going about this the right way but I've been stuck on this for a couple of days and it's killing me. Got a custom post type called 'featured-work' and custom fields in it. These two ...
0
votes
0answers
259 views

wp_query orderby random do not repeat infinite scroll - one loop

I have found a lot of documentation on solving this issue with multiple loops, I'm finding it hard to see a solution for one custom loop. Problem: I'm using infinite scroll to load in the next page ...