1
vote
1answer
33 views

How to show Y number of custom posts after every X normal posts?

I have a loop within a loop. I figured out how to show all or X number of custom posts after Y number of normal posts. I also figured out how to show 1 custom post after every Y normal posts. How do I ...
1
vote
1answer
38 views

Custom Post Types strange pagination problem

Have a strange problem with pagination, the query work fine when I'm in homepage, but if click for the next page I get a 404 error. Disabling permalinks settings, I saw that in the query string (when ...
0
votes
0answers
23 views

After rewriting post type's URL, the number of queries has increased dramatically

I rewrited the URL of post type, and the main loop ( example.com/post-type/ ) generates an expensive number of queries. So I have a post type "cd" and taxonomy "artist", and the url are: ...
0
votes
1answer
49 views

How to loop custom post type posts by author?

Maybe I'm not doing things the proper way, but it seems to be working very well. Also, this question title is so confusing. I don't know how to ask the question. Perhaps someone can help edit? Thanks. ...
0
votes
0answers
29 views

Display posts from category in page

I am trying to use a shortcode to display a loop of posts from a category. I have the shortcode working but it is only displaying the actually category names within the custom post type and not the ...
0
votes
1answer
20 views

How can I pull information from my loop and divide them seperately?

I've created a Custom Post Type that I'm trying to implement into a CSS slider. To do this I've created a custom template and added counters to get unique ID's for every new post that get's pulled. ...
0
votes
1answer
42 views

How to include custom post type posts on a page?

I need help adding a Portfolio page to one of my main Pages. I don't know what information is needed, so I'll just throw in some of the important stuff. Basically I have my main menu, (Welcome, ...
4
votes
1answer
89 views

How do you get the count of posts in an archive page?

I have a custom posts archive page of the type archive-my_custom_post_type.php and I am using the "standard" loop which consists of the ever-so famous <?php if(have_posts()) : ?> <?php ...
4
votes
1answer
91 views

Category as Class for Custom Post Type

I've only just realised that custom post types don't appear to output the category as a class in the loop, via post_class and I wonder if anyone can suggest a work around. Is this something that ...
1
vote
1answer
47 views

Query custom post type in the loop

I have a custom post type running called services: // Services function services_cpt() { $labels = array( 'name' => _x( 'Services', 'post type general name' ), ...
0
votes
1answer
118 views

Creating Multiple Loops in Genesis, One Post then 20, each with custom fields

I need to create a custom loop for a custom post type archive template, that is as similar to this page as possible (www.manta.com/totd) using the Genesis framework. Here is a paste of what I have, ...
1
vote
1answer
91 views

Alphabetical sorting of custom post type - one letter per page

Basically what I am looking for is a way to sort custom post type in alphabetical order and separate each letter, so you have one letter per page. See illustration. Hopefully there is a plugin or ...
1
vote
2answers
123 views

Loop custom taxonomy to get lists of cutom post types?

I have a custom post type 'products' and custom taxonomy of 'maker' that i have connected to that cpt 'products'. I have written this code : <?php $myproducts = new WP_Query(array('post_type' ...
0
votes
1answer
35 views

Multiple Queries and Loops within CPT Archive

I have a Custom Post Type called 'properties', and have set up an Archive page to display posts within that category. Essentially, the Archive page needs to contain 3 different query types; the first ...
0
votes
1answer
33 views

Custom loop to query posts with no featured image and/or no post editor content

I am looking to query and pull a list of all custom posts 'foo' that have no featured image set and/or have no text copy (from the WP editor). The list will be used to determine which posts need ...
0
votes
1answer
52 views

Compare Two Custom Post Types Using The Same Custom Taxonomy

I have two post types, courses and testimonials, sharing the same taxonomies. What I am looking to accomplish is to check whether a course is in the same category as a testimonial. Then display if it ...
2
votes
1answer
103 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
45 views

Posts without featured image using other post's featured image

I am using the following code (see bottom) to display a custom post called 'artists'. I am also using <?php if (has_post_thumbnail( $post->ID ) ) so I can set the background of a div using the ...
0
votes
0answers
99 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 ...
-3
votes
1answer
44 views

Newer/Older posts links display same posts on every page

I am using a plugin called "Types" to generate custom post types for drink/food recipes. I want to show booth drink and food recipes on the same page. The posts are displaying fine, but for some ...
0
votes
1answer
427 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 ...
0
votes
1answer
57 views

WordPress nested loop not working

Why is this code not retrieving the posts of custom post type "graphic-design"? <?php $args = array( 'pagename' => 'graphic-design' ); $query = new WP_Query($args); while ( ...
-1
votes
1answer
291 views

Move Genesis Single Page/Single Post Title

Im not sure on how to do this .. But what i want to do is . Move the Page/Single Post Page title. Remove the title for Homepage only. Keep the titles of my posts. (Loop page) or (Blog Page) ...
0
votes
1answer
62 views

Looping through custom taxonomy and display custom post types (Custom Post Type UI)

I am using Custom Post Type UI and Custom Fields plugins for the WordPress theme I am creating. I have created a custom post type of price and I have created a custom taxonomy called price_types ...
0
votes
2answers
39 views

Order by custom field attribute

I'm try to get the output of this post type to order by the staff name alphabetically and I can't seem to figure out if needs to be within the beginning array() or if I been do something within the ...
0
votes
1answer
1k views

How to get current post id of a custom post type in a loop using template singel-{custom type}.php?

I have a custom post type template where am looping through all post. what i am trying is when i go to my custom post page i want to get the current post id in the loop. So i tried to check if the ...
0
votes
1answer
112 views

4 column-loop ordered alphabetically with entries grouped (and labeled) by their first letter

I found some code for creating multi-column WordPress loops and I found some code for entries grouped by letter of the alphabet. But I can't quite get the code to work together...the order is a bit ...
0
votes
1answer
92 views

Tag page only display 10 posts

I've had a problem with this for quite some time now and cannot for the life of me figure it out. I am using Multi-site and not sure if that has anything to do with it or not, so keep that in mind. ...
0
votes
2answers
45 views

Get result from Custom Field in Custom Post type

If trying to filter out some return results from a custom post type that has a custom field appended to it for location. I'm not too sure where I need to apply the case statement in my query. Or if I ...
0
votes
2answers
297 views

get parent content inside child posts

I have a custom post type where I've created 3 pages in a parent-child relationship. The pages are created like this : PARENT-CHILD-GRANDCHILD I want the child and the grandchild pages to get the ...
0
votes
1answer
186 views

3 random images from custom post type, each in a div with a diffrent class

I'm trying to build a loop using query posts to display 3 featured images from the custom post type 'portfolio'. My problem is that each picture has to be in a div with a diffrent class, so i was ...
0
votes
1answer
80 views

How to retrive Custom Post Type Meta Fields in Custom WP_Query

Can some one let me know How I can render the Custom Post Type Meta Fields (Meta-boxes). I have a Custom Post Type Called "News" and I successfully added a Metabox to my Custom Post Type called "News ...
0
votes
1answer
40 views

Randomly placed sticky custom posts complemented by blog posts

On my index.php file I am showing the most recent posts using the standard index.php file. However, I'd like to include a custom post type (named products) in this standard loop. Have about 6 products ...
1
vote
1answer
79 views

Normal pages as children of my Custom Post Type

This one is tricky, I've got Custom Post Type called "dictionary", users add "definitions" there which are automagically put into right categories (so for example if user adds "Apple" it's under "A"). ...
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
1answer
52 views

Display Custom Taxonomy of custom post type

I am stuck on trying to create a template page that displays a list of the names in a specific custom taxonomy of a custom post type I created. The custom taxonomy is locations and clicking on a ...
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
2answers
109 views

display all posts in current category

I am trying to display all the content/posts assigned to a certain category. I have a custom post type set up called 'Videos' and within this I have created categories called music, commercial, promo ...
0
votes
0answers
20 views

Turn Custom Post Title into external link [duplicate]

I created a Custom Post Type called News, which supports Title, Editor, Thumbnail and Custom Fields. One of the Custom Fields is URL. What I need now is to turn the Title in a external link in the ...
0
votes
1answer
109 views

Displaying information from custom field on custom post type

I have videos set up as a custom post type and music, commercial, promo set up as categories within this post type: I have a function that displays a custom meta box on the videos post type pages in ...
0
votes
1answer
30 views

Fallback if statement based on the number filtered from it

I'm trying to add three ads on a page. I have a custom post type called 'ads' and I'm using advanced custom fields to add a start date an end date and an option to select which pages to associate them ...
0
votes
1answer
631 views

exclude custom post type by meta key in wp_query

I'm trying to display a custom post type (properties) and exclude posts that have a certain meta value (sold). Is there a way that I can do this? I have this for my code so far: ...
0
votes
2answers
50 views

If i have custom post type with 5 custom fields do i have to create a new loop to reference each one?

One custom post type that i've created has 5 custom fields that display specific content for a template that displays them in different areas on the page. My question is if i would have to create ...
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
2answers
144 views

Two column layout with alphabetical ordering

I am trying to output a list of stockists in two columns from left to right, sorted alphabetically: A | B C | D E | F G | H Currently, the code below is sorting half the posts alphabeticly and ...
0
votes
1answer
147 views

'category__and' for custom taxonomy?

I've a custom post type 'post-type-x' and three custom taxonomies attached with it 'taxonomy-1', 'taxonomy-2' and 'taxonomy-3'. I want to retrieve all the posts that have custom taxonomies ...
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
2answers
107 views

Custom Post Loop pulling all custom posts, not just one

I'm having an issue with a loop pulling every custom post in my template and not the one that has been requested. This can be seen here: http://i.imgur.com/1YKeLtV.png Here is the code I'm using to ...
0
votes
1answer
156 views

pre_get_posts works in post type archive but not in single post

I have a custom post type "Scholars" that has an archive. I want to sort by a custom meta field called "year", I'm doing this with pre_get_posts: add_action('pre_get_posts', 'my_queries'); function ...
1
vote
1answer
292 views

How do i calculate the total of values of custom fields in custom post types?

So the title is a bit unclear, but here is what i have: Custom post type: Projects Custom post type: Investments        + Custom field: Amount And i have one page ...