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

Query a custom post type from a different WordPress install?

I have a client who would like to only create his items on one domain, but have a specific taxonomy of that custom post type display on a different domain (this is not multi-site...they are separate ...
0
votes
0answers
22 views

Use audio file like image featured

Attempt to get the url of an audio file in post content to display in the loop of the home page. I can only get it if the file is uploaded at the time of creating the post, but if I go to a post ...
0
votes
0answers
14 views

why is the value of one field different from another if they are filled with the same variable?

A form is submitted containing a users email address. When the form is submitted, the page that processes the form creates a new post, and it sets the value of the custom meta field called 'entryCode' ...
0
votes
1answer
65 views

2 Loops on one page - pagination of 2nd loop ignore array of excluded posts

I have 2 loop on one page. First one shows 11 recent posts in rand order and pushes each post ID into do_not_duplicatearray. $argsRandom = array( 'numberposts' => 11, 'fields' => 'ids' ...
0
votes
1answer
48 views

Show Posts By Custom Field

I’d like to add 2 custom fields to my posts: show_post_on_home_page home_page_posts_order_sequence I then want my home page to show only the posts where show_on_home_page == true, ordered by ...
0
votes
0answers
14 views

The Loop doesn't work when using RewriteRule

I am using .htaccess RewriteRule on my page. When user goes to /news RewriteRule actually loads /?nav=news On that page, I use The Wordpress Loop to show recent posts if (have_posts()) { ...
0
votes
0answers
23 views

Loop through custom post type taxonomies

I have created custom post type products and I want to show categories on products archive. I have this code <div class="container"> <div class="boxes"> <?php $cat_args = array( ...
0
votes
1answer
28 views

Create a hierarchical loop at predefined markup requirements

I try to achive this in wordpress based on my theme: fullpage.js demo So I have a predefined markup for vertical sections (parents) and one for horizontal slides (children). Parents only contain ...
0
votes
0answers
18 views

What is the best way to intercept posts/(topics) as soon as they are added by the user in a Forum in Wordpress?

I need to write a plug-ing for a Forum in Wordpress, that each time a user inserts a post/topic such plug-in is able to intercept the data in the post and then we make our analysis throught a ...
0
votes
0answers
28 views

Get first title post from an author

I want to display first title post from an author on my loop with this code: <?php $number = $count_post; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ...
0
votes
1answer
24 views

Display Page featured Image as well as Posts featured Image

Ok, I have hit a bit of a roadblock. I have a page that has been set to display the posts (which have their own featured images). I tried calling the posts featured image in the loop (which worked), ...
0
votes
0answers
28 views

Developing Wordpress Plugins with storing and exporting thousands / millions of data

I want to develop a plugin that will import and export WordPress users with csv file. But my concern is looping thousands or millions of data without exceeding php execution limit or Internal Server ...
0
votes
0answers
24 views

Set Popular Post by views weekly?

I've tried several times, but still didn't work. Anyone have an idea? EDIT: This actually works, but only get popular post all of time. I want popular post by week. what needs to be added? This my ...
0
votes
0answers
13 views

Pagination doesnt work for first 19 pages

I have this straightforward pagination form that used to work just perfect: function theme_pagination() { global $wp_query, $wp_rewrite; $wp_query -> query_vars['paged'] > 1 ? ...
0
votes
0answers
91 views

Wordpress slider with bootstrap carousel

I have create slider for front-page with bootstrap carousel, for slider content get from featured category, problem is the slider 1st, 2nd, 3rd displayed as list. normally layered with navigation ...
0
votes
1answer
50 views

Alternative layout the loop

i'm trying to make an alternative loop as found here on stackexchange, it has been a great help to what i've achieved so far, but i'm stuck now. The goal is to make the newspage look like this The ...
0
votes
1answer
92 views

Loop through Navbar, Output Icons

I'm trying to loop through my Navbar in WordPress so that I can output some Icons at the end of the last link. I have this working but I end up outputting a Navbar and a list. I think this is because ...
0
votes
1answer
20 views

Why loop renders only last metabox from array? [closed]

The auestion is, why my foreach loop renders metabox only with information from last array? The code of class: class CusomMetaBox { /** * Hook into the appropriate actions when the class is ...
0
votes
1answer
24 views

enumerating custom taxonomies?

I made this function that displays tags as an image grid function execute_taxography() { $wpbtags = get_tags(); $output.= '<div class="grid"><div ...
0
votes
0answers
39 views

Call/link wordpress category with jquery/isotope classes

I am working on the portfolio section of my web, and these codes i have in filter.js script (in wp-includes/js folder) jQuery(document).ready(function(){ ...
0
votes
0answers
38 views

Wordpress loop uses unmodified posts array, why?

I have this code in a Wordpress template: $prepost = $post; $normal_args = array( // here goes the args ); $normal_query = new WP_Query( $normal_args ); echo 'BEFORE: ' . ...
0
votes
0answers
45 views

Isotope filtering with wordpress by categories

I am using the isotope by metafizzy script, need to use it on projects page of my website, it's working fine but what i want to do is filtering by custom post categories (portfolio categories), here's ...
0
votes
1answer
33 views

Display the current post in browser as the first post in a loop (for a slideshow)

I have a custom post type - on a single page it displays all kinds of information for the post type. There are 10 posts altogether. Below the info I have a slideshow as part of a loop that displays ...
0
votes
0answers
67 views

Search by attributes or taxonomy

I'm trying to filter products by taxonomy or attributes, but I think the function has something wrong: global $woocommerce, $woocommerce_loop; $attribute = 'color-de-piel'; $values = 'Blanca'; ...
0
votes
2answers
61 views

Category page shows only 1 post when that post has more than 1 category?

The error I'm seeing is that the way I currently have my category page set up, if a post on that page has more than 1 category, the loop won't load the posts that follow the one with multiple ...
0
votes
0answers
11 views

Post formats in 2 columns display

I'm having a hard time trying to figure out what's wrong in my loop. Here is my loop for a 2 columns post display : <?php $i = 0; ?> <?php if (have_posts()) : while (have_posts()) : ...
0
votes
1answer
32 views

Loop doesn't work

I'm making a box in my sidebar that shows with a loop a list of articles of a single category: <?php // The Query query_posts('cat=31&posts_per_page=5'); // The Loop while ( have_posts() ) : ...
0
votes
1answer
79 views

Problems with WP_Query, Loop, a condition and Posts per Page

I am creating a website and I have Custom Types (Plugin: Types). These Custom Types are called 'Veranstaltungen' --> they are Events. All of these Events have a starting date ( start-datum ) and an ...
0
votes
0answers
33 views

get_template_part for each level of taxonomy term w\control if empty term

before we start, thank's for your time. Structure: cpt = corsi tax = argomenti tax_term = parent tax_term_child = child tax_term_child_granchild = grandchild Current code (on ...
0
votes
0answers
21 views

How to remove the most recent post from $the_query

Apologies for a very basic question: I've been searching for hours and can't find a solution. I have a Wordpress page that displays all posts of a particular custom type by using WP_Query to return ...
0
votes
1answer
120 views

Alternate row and columns every X posts

Does somebody know ho to accomplish the following structure with a Wordpress loop, and repeat it for all my posts? Would be really helpful. I tried to modify the code Joshua provided here: ...
0
votes
1answer
17 views

Querying multiple categories in the WP loop if one of the category IDs is dynamically obtained

I don't know exactly where this is going wrong, but what I figure is happening is that the category I am dynamically obtaining based not the BuddyPress Group slug (post categories have matching names) ...
0
votes
0answers
16 views

multiple_loop of filterable taxonomy_portfolio for CPT

first sorry for my "school-level" english and for possible mistakes (it's the first time on this forum) I have a CPT "corso", I have more taxonomy for this CPT (argomento1, argomento2, ...) and I've ...
0
votes
1answer
12 views

Cant pull in featured Image

I have 6 posts with a featured image set for each. I have created a template file called portfolio-template.php. I have set the portfolio page to use that template file. Inside portfolio-template.php ...
0
votes
1answer
33 views

How to execute custom loop before loop content?

How to execute custom loop before loop content? <?php remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); remove_action( 'genesis_entry_footer', ...
0
votes
0answers
24 views

Displaying no post message in rather complex query that shows only future events

I'm trying to do something rather simple, which is display a message if there are currently no posts available. However, the environment I want to do it in is rather complex, as I'm using the Types ...
0
votes
1answer
72 views

Run “the loop” in a random order

I'm using a transient to store a query that gets 60 posts and makes a mosaic of background images, because it improves performance greatly. The query has 'orderby' =>'rand' set, but obviously when ...
0
votes
0answers
34 views

Query and compare multiple meta values

The problem: I have a custom post type of 'events' which has two metaboxes: cf_eventdate and cf_eventend. The first contains the event date, in the format: 2015-11-05. The second contains the end ...
0
votes
0answers
27 views

Loop returns more items than exist?

Using the answer here: http://wordpress.stackexchange.com/a/207601/45709 exact works as it is intended. It returns 3 slides because only three slides exist. I had to slightly modify the code because ...
0
votes
0answers
62 views

Loop through posts by category in descending date order

I am using standard posts to display news. I have three categories to assign news posts to, and a post is only ever assigned to one of these. Let's say I have post data like this: 01-Jan-2015 - ...
0
votes
1answer
79 views

How To Loop Through <li> list with Custom Post Types

Please excuse me for being ignorant. I am currently trying to learn more about PHP and WordPress. This is my first time to post a question on StackExchange. I found a jQuery plugin for a simple ...
0
votes
1answer
24 views

Category ID returns as '0'?

I'm trying to populate the category id from the category name within the loop. <?php $cat_name = get_theme_mod( 'cat_1' ); ?> <?php $category_id = get_cat_ID($cat_name); ?> ...
0
votes
0answers
129 views

Isotope Grid - Parent Category Filters and Subcategory Items - How?

I'm trying to develop an Isotope-based grid, with a custom post type subcategories being filtered by their parents. So the grid has filters, which are the parent categories, upon choosing a filter, ...
0
votes
0answers
21 views

Custom query . How to restore parent in custom template

I have a custom query which looks if a page has subpages and if any exists loops over childs the codes <?php // get sub pages $subPages = get_pages( array( ...
0
votes
1answer
58 views

WP_Query | 'post_type' doesn't work

I'm new to WP theme development and I've an issue. I've created a custom post type 'portfolio' via CPT UI plug-in. Now I want to create a custom query to show all the posts with the post_type = ...
0
votes
0answers
29 views

How to : pagination in 3 different custom loops on the same page

I have this content in my index.php. 3 areas with 3 distinct custop wp_query loops to get different categories of articles in each one. I have set wordpress to show 12 articles by page, so it displays ...
0
votes
2answers
26 views

Post are not showing up

The site I am working on is skinnnybantonmusic.com The Lastest News page is suppost to show the blog posts but for some reason none are showing up. (http://www.skinnybantonmusic.com/latest-news/) ...
0
votes
2answers
20 views

Page gets displayed in post field

I'm making my first WordPress theme from scratch, and I currently have two pages: index, and events. The index is static and the events.php is dynamic (loaded with latest events displayed by the title ...
0
votes
0answers
74 views

How to put php code inside a tag loop?

I have something like this. The loop is from the woocommerce plugin in the cart.php. I want to put the php code inside the a tag <?php echo wp_kses_post( wpautop( $data['display'] ) ); ?> ...
0
votes
0answers
20 views

Trying to show some custom post types

I'm using WordPress 4.3.1, and using some custom post types for information (events, publication,...). Events should appear only at sidebar (eventON plugin) and post, and publication. I'd like to show ...