0
votes
0answers
8 views

all in one event calendar recurring event display event start time and duration [on hold]

I have been stuck on this for a while, I have written a custom query for using this example All-in-One Event Calendar: Custom Query - Getting each event Instance I am however having a problem with ...
0
votes
1answer
18 views

Custom wp_query - I'm getting 'all' post, not the specific post in the query

Get all post from today, that are of post type 'product' and are in the taxonomy of 'productType' as 'Indica' and in the taxonomy of 'locationCity' as 'Los Angeles' -- However, I get 'all' the post ...
0
votes
2answers
130 views

Pagination not working on Custom Page Template

I searched a lot on this but I can't figure out why my code is not working. I published a page with slug "blog" that uses a custom built template "page-blog.php" that I build from editing the ...
0
votes
1answer
45 views

Limit the number of posts from a specific category on index.php

I've had multiple requests from different clients to figure out a way to modify their blog (index.php) or Custom Post Type Archive page in order to show less posts from a certain category. A good ...
1
vote
1answer
68 views

Hiding taxonomies with no children WP_Query & tax_query

I have this code which has taken over 7 hours to put together through research but the last hours or so I have hit a brick wall! I require the taxonomy title to be hidden if there are no posts ...
0
votes
1answer
57 views

Custom Taxonomy with Custom Post Type Finds No Posts

I've created a custom post type named mfg_ppn and a custom taxonomy called mfg_pp, and they are referenced as $this->cpt_promotion_newsand $this->cpt_promotionin case you were wondering about ...
1
vote
1answer
49 views

echo a specific meta_key queried through a custom post

I'm new to coding but love tinkering around (on Virtual Server) with bits to upgrade my current website when I have the time. What would be really useful to me would be to post an individual ...
0
votes
2answers
704 views

Prevent pre_get_posts filter on specific post type

I am running into one issue with pre_get_post filter. Actually I have 4 post types. Post, Pages, Events, and Venue. I created one custom field called city for event and venue post type. When ...
2
votes
1answer
123 views

Impossible to get Attachments Outside Wordpress?

My page (outside the wordpress install) begins something like this: global $wpdb, $wp_query; define('WP_USE_THEMES', false); include_once 'word/wp-blog-header.php'; $args = array( ...
0
votes
1answer
708 views

meta_query with array as value with multiple arrays

Already got some clues on how to do this, see here: meta_query with array as value but i am confused over multiple meta_queries like this: for ($i=0; $i< count($amenities); $i++) { ...
0
votes
1answer
168 views

Blogroll - Different layout for first post

I would like to have my main blogroll show 10 posts per page, but the first post of each page to be setup on a different div above the rest and have a featured image. This is what I sued for the ...
0
votes
0answers
104 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' => ...
2
votes
0answers
42 views

How to show in search results posts with a particular tag in a particular category?

As the home page of my blog I've a static page. There I want to show the navigation of the site. Category1 Sub-Category1 tag1, tag2, tag3 Category1 Sub-Category2 tag1, tag2, tag3 ...
-1
votes
1answer
54 views

Highlighting Sub topic in a post?

Have seen this sub topics highlighter in many blogs. It gives a special attraction to a sub topics used in the post. Is this a plugin or part of code? How can I add this? http://imgur.com/UbGpz7j
0
votes
0answers
82 views

Order custom fields by string length

I am trying to reorder a custom field from one of my Custom Post Types. I'd like to get the custom field string which is called 'first name' and order all of the first names by their string length. ...
0
votes
1answer
385 views

Delete data from custom table when deleting a post

I want to delete post id form my custom table, when deleting a post. I have tried this way, nothing happened. Please help. add_action('delete_post', 'delete_data'); function delete_data($post_id) { ...
4
votes
1answer
306 views

How can I save an array from a random post sequence for later use?

I'm building a random workout generator on Wordpress to help with my fitness, and am stuck at saving random post arrays for later reference. I'll explain. The generator should work in two main ...
1
vote
1answer
3k views

All-in-One Event Calendar: Custom Query - Getting each event Instance

I am using the All-in-One Event Calendar by Timely, and I would like to display upcoming events from the events calendar in a carousel on a separate page, and I need to get the event information. I ...
3
votes
1answer
3k views

Nested meta_query with multiple relation keys

I am curious whether Wordpress is able to run nested meta_query, with each having different relation keys? As of Wordpress 3.0, tax_query is able to perform this function; I'm wondering whether this ...
0
votes
1answer
217 views

WP_Query breaks pagination

I've been on this problem for a week now. I've searched through countless posts that just aren't answering the question. It seems that my wp_query breaks pagination. I've looked through a lot of the ...
0
votes
2answers
765 views

Show default content if custom WP_Query has no posts

I have a custom loop to show posts that meet a certain set of $args like this: <?php $recent = new WP_Query( $orderargs ); while($recent->have_posts()) : ...
0
votes
1answer
375 views

Multiple keyword search

I have a custom search where I want to enter a keyword or phrase into the search box, and then by pressing enter it adds it to a 'search storage' (already coded, see below). Asume I have 3 posts, one ...
0
votes
1answer
217 views

Select posts that match multiple category names, must match all categories listed

I need to search for posts that belong to multiple categories, but they must match all categories listed, as in if I list category names 'japanese' and 'dessert' the matching posts need to be in both ...
3
votes
1answer
520 views

Limit search results to exact match

I have a problem showing results in Wordpress with WP_Query. Problem is simple but as far I'm not programer I wound it difficult. So, I have custom field with values like 1-1-1-1 and 2-1-1-1-1 for ...
0
votes
1answer
136 views

Adding pagination to sub-wp_query within a singular post page

So my custom wordpress theme/site has a number of venues, e.g. "foo" which has a number of events and reviews. So a venue ends up with a URL like, http://www.example.local/places/my-place-name/ ...
1
vote
1answer
162 views

Use post object from first query in second query

I have a post ID stored in a variable from my first query and I'd like to use that to highlight the post with the same ID in my second query, but it's not working. First loop: <?php if ...
2
votes
1answer
399 views

Multiple Queries and Excluding Repeating Posts?

I'm trying to work out how to exclude posts used in the first four custom queries in the last typical query.. haven't been able to find anything that will explain how to do this clearly. My First ...
-1
votes
1answer
526 views

Getting Custom Field value in WP_Query

i am trying to display first post of 3 categs on my index page. so for that i wrote a little function as follows: function excateg($categ) { $recent = new WP_Query("cat=$categ&showposts=1"); ...
0
votes
1answer
603 views

Magazine style frontpage with multiple categories/loops and no duplicate posts

I am migrating a static magazine site to wordpress. I would like to have a frontpage displaying multiple categories with a few posts in each, e.g "politics", "environment", "health" and "technology". ...
0
votes
1answer
463 views

Pagination problem with multiple loops on the same page

I'm using 4 custom loops to display 3 posts on each one and every loop has its own pagination which works fine once the page loads up, the problem is that when I click on the 2nd page of the first ...
0
votes
1answer
526 views

Related “custom post type” using “custom taxonomy”

on my "Work" template used for the custom post type with the same name, I have the following code showing a list of titles for every "work". What I want to do is to display just on that list the ...
1
vote
1answer
181 views

How does order=asc effect a wp_query (its acting pretty weird in a loop)

I have a wp_query for a custom post type: events. I have a seven day calendar that is showing featured events on a page. Here is the wp_query and supporting code: https://gist.github.com/1030760 ...
0
votes
1answer
643 views

How to make a query returning pages from multiple parents

I'd like to make a query that returns the children pages of various parent pages. Unfortunately the post_parent attribute of WP_Query accepts only one value. What do you suggest ?
0
votes
1answer
369 views

How Can I Always Display A Particular Post First Using WP_Query?

My apologies if this question has already been asked somewhere else, I searched but couldn't find anything. I am working on a tours website, there will be individual package pages that show some text, ...
4
votes
1answer
3k views

Search multiple custom fields by using meta_query

I'm trying to create a search results listing for a custom post type and the problem I'm running in to is with the way the 'meta_query' parameter is stringing the passed values together. It appears ...
0
votes
1answer
319 views

Prioritising and Ordering Posts By Category Name Using A Custom Loop

I have a custom loop pulling out videos all assigned to various categories. However there is a category called "new-video" and I need to pull out all videos using my custom loop, but I would like the ...
0
votes
1answer
32 views

Is there a (preferable built-in) way to check what custom queries are used in a theme?

I've build a theme using custom post-types with queries like $my_custom_post_type_query = new WP_Query( array( 'my_arg' => 'value' )); Now I'm writing a plugin where I need to do something like ...
6
votes
3answers
4k views

Getting Post Comments for post ID using WP_Query() and a Custom Loop?

(Moderator's note: The original title was "Is there a way to get post comments by post ID on a custom loop using WP-Query()?") Hi! I'm running a custom loop using WP_Query, that only displays one ...