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
19 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
0answers
14 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
3answers
32 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
42 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
0answers
20 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
19 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
23 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
1answer
20 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
26 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
22 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
23 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
29 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
0answers
18 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
23 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
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
1answer
35 views

WooCommerce custom category page [closed]

I'm using plugin Woocommerce and i wanna custom the loop from category page, i create woocommerce.php at theme dir, the code <?php /** * The template for displaying WC loop */ get_header(); ...
0
votes
1answer
20 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
20 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
2answers
17 views

Pages inside a page (with thumbnails)

I´m building a actors/movies sites and I got stuck with one thing. I have several pages with actors biography (featured image, name, about, date of birth, etc) and I have a menu with the option ...
0
votes
1answer
27 views

Create Div Wrapper On 3rd Iteration Or When Query Loop Items Run Out

I'm running into an issue.. I've written a code inside a loop so that it creates a new box every 3rd iteration in the loop. It does this nicely, however for example if I have 4 items in a full query ...
0
votes
1answer
30 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
32 views

Custom WP_Query not working correctly

OK, So I have created a custom WP_Query that gets the post_type post and outputs it as a styled list. It works well and outputs the styled list but then underneath it displays all the posts again but ...
0
votes
0answers
7 views

Jetpack infinite scroll on widget

I would like to add the jetpack infinite scroll (other options would be good as well), to a sidebar widget that shows "additional posts". So instead of paginating (ajax) the whole page, i only want to ...
0
votes
0answers
24 views

Multiple post types on a grid (every nth post must be a specific post type)

I have a grid where I display multiple posts types. I need to lay out the grid making sure that I have 2 posts from one post type, followed by 4 posts from another, flowing continously thereafter. ...
0
votes
1answer
44 views

Different number of posts per row in grid layout

Is there a way to return different number of posts per row in grid layout based on the post size retrieved from a custom field? For example: | Large post | | Medium ...
0
votes
0answers
26 views

Ajax category pagination problem

I want to make a pagination or load more button for my ajax category display. Here is my attempt, I have no idea how it can work out. Any ideas? add_action( 'wp_ajax_nopriv_load-filter', ...
0
votes
0answers
28 views

Get Page content to displayin Bootstrap Modal

Ok I'm a relative novice here, and after looking around I still haven't found the answer to my problem. I'm basically trying to link a Bootstrap Modal to some text in a footer (widget), the content of ...
0
votes
1answer
21 views

How do I aproach this?(for sale, for lease, sold->move something from a category to another)

First of all, I really apologize for the title of this question. I'm currently working on a real estate wordpress theme for that will feature ads from the town that I live in. I basically want to ...
1
vote
1answer
65 views

Loop starts from the beginning with second while loop on author.php

I am using the same template for author.php and home/blog.php. I have a loop split into 3 parts. <?php if(have_posts()): the_post; //do a thing endif: $i = 0; while(have_posts()): the_post(); ...
1
vote
0answers
17 views

How to get rid of the strange sizing of links around posts? [closed]

I am currently running into a bit of a problem on my Wordpress site. I am designing a theme using the Bones framework, and after working for a while I have discovered a weird bug with links. Any time ...
0
votes
0answers
23 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
1answer
64 views

How to Fix an Archive.php That Displays All Posts?

I am currently working on developing my first large-scale WordPress powered site, and I have run into a major problem in my archive.php file. It loads all posts, rather than the categories/tags that I ...
0
votes
1answer
32 views

How to create content automatically when a post is published?

Goal: Ability to automatically create content in WordPress posts/pages. Goal Details: When a post is created/published, it will automatically create or configure content based on the base data inputs ...
1
vote
3answers
58 views

The Loop in Static Page

I have some questions about the loop. I'm using "twentyfourteen" theme as an example. I'm creating 2 php files with basic loop. One is home.php, and one is a template page called sample-page.php . ...
0
votes
1answer
22 views

Add Class according to the order of appearance

My loop returns five posts and the HTML should look like this.. <ul> <li class="topfive"> ... </li> <li class="topfive"> ... </li> <li class="topfive"> ...
0
votes
0answers
16 views

Unable to login + Redirect loop on mobile

When I try to login to my wordpress page, I'm stuck in the loginpage without any CSS. Filling in the correct logins doesn't get me logged in. I just get redirected to that same page: ...
0
votes
2answers
31 views

Get List of all the Authors

How could i get List of all the Authors? author.php file shows the Information about Individual Author. for example: http://domain.com/author/bj that returns the Bj's Profile. if i enter ...
0
votes
1answer
17 views

Custom Sidebar in Editor (not Widget) for Custom Post Type in Genesis

I've created a custom post type for employee Profiles. The one thing I can't (yet) figure out is how to make custom sidebars for each of the employee's profiles. I have figured out 2 ways to get ...
2
votes
0answers
66 views

Chopping up a large ajax request of around 200 posts

I've put myself into an uneasy situation, where I have roughly 200 posts I need to load in with jQuery .load(). Nothing shows up until the whole .load() has executed, of course. Takes roughly 3 to 4 ...
0
votes
0answers
8 views

Connections plugin pagination

I am currently using the Connections plugin for WP. It supports no pagination for the directory results though. I've tried putting efforts on the code to make pagination work but I found no success ...
3
votes
1answer
42 views

Add Incrementing ID to each paragraph in the_content

I need to loop through each paragraph in the_content and add an ID to each paragraph with an incremental value. function incrementparagraphs( $content ) { for ($i = 0; $i <count($content); ...
0
votes
0answers
20 views

Conditional loop based on current page

I'm trying to get the loop below to display only the post with the category that reflects the given condition but it doesn't seem to work. Any Ideas on how this can be achieved? <?php if ...
0
votes
0answers
27 views

Posts are being displayed from old to new, in ascending order

I developed a site for a client using a premade theme called "Adapt". When I was developing on my own server, the blog posts were posting as they should in descending order (i.e. new to old with new ...
0
votes
2answers
27 views

Foreach displays from last to first

I created the foreach loop to display post images, but It displays them from last to first, how can I make It to displays from first to last ;) ? <?php $args = array( 'post_type' => ...
0
votes
1answer
13 views

Grab next post title in archive page

I am using a custom query on a page to display single posts from a specific category, one post per page. Here is my current query: $results = new WP_Query( array( 'post_type' => 'post', ...
0
votes
0answers
47 views

How to show related posts by category or custom post type?

I'm looking for the best way to go about creating, probably, custom post type where you can filter in the categories related to that custom post type in the sidebar. Here is the website I'm working ...
0
votes
1answer
46 views

Can't grab author info outside of the loop

I have an author box outside of the loop that is supposed to grab the name of the author, but the correct author isn't being displayed most likely because these tags only work inside the loop. What ...
1
vote
2answers
50 views

Guidance with The Loop for CMS

Maybe I'm going about this the wrong way but this is my scenario... I would like to use WordPress as a CMS rather than a blogging platform. I have a website that will have somewhere between 25-50 ...
0
votes
0answers
32 views

Wordpress Custom Post Type and sort by Tags

I am currently making a custom Wordpress theme, but so far I am stuck at this little problem. I have created this custom post type. And in that page (media.php) I want to be able to click on the tags, ...
1
vote
0answers
31 views

WordPress Rewriting the DOM?

WordPress 3.9.1, Bones Theme. I'm setting up an archive page for regular 'ol blog posts. The theory is to wrap each post's information in a permalink. Such as: <?php if (have_posts()) : while ...