The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
23 views

Custom post type and shared custom taxonomy ..permalink structure

hope someone can help me since I'm fighting with this issue since weeks without a solution. Scenario: ~ 15 different post types (hotel, bed-and-breakfast, etc) -> reason to use the post_type ...
0
votes
0answers
14 views

Prevent from duplicating post/pages

I want to import posts and pages but not to duplicate them. $post_types = array('post', 'page', 'wck-meta-box'); foreach ($post_types as $post_type ) { foreach ($posts[$post_type] as $post ) { ...
0
votes
0answers
19 views

Custom post types accessible from 3 urls

I have created a custom post type named library and it has a post named irrlicht.when you visit example.com/irrlicht or example.com/library/irrlicht or example.com/libraries/irrlicht you still access ...
0
votes
0answers
42 views

Some questions regarding post-types and pagination

I've built my own theme from scratch using the HTML5 Blank Framework My problems started when I added 3 differen post-types; Work, 50mm and Findings. I've hided the standard 'Posts' type, so that I ...
0
votes
1answer
43 views

Custom Post Type causes Page Not Found

I found a basic tutorial online which gave the rundown on how to create a plugin from scratch and sets up a new custom post type. I could not find any basic coupon plugins that accomplished what I ...
0
votes
1answer
24 views

Taxonomy template by post type

I have 2 custom post types that share a taxonomy. The taxonomy template of my taxonomy ( taxonomy-my_tax.php ) will query both custom post types. Is there a way to have a taxonomy template for each ...
0
votes
1answer
29 views

How to define which register_post_status goes to which register_post_type?

New to registering post types but looking at samples, and the codex not helpful here. I am not understanding how the two of these relate? This is just bare bones so someone can explain (the parameter ...
0
votes
0answers
17 views

How to edit plugin to only display on specific post types, instead of all posts and pages

I've installed a plugin (allows users to save favourite posts to a list: http://goo.gl/9LEvjy ) but by default it displays on all posts and pages. I want it to only display only on posts, NOT pages - ...
0
votes
1answer
49 views

How to Set Taxonomy Object Description?

I noticed when dealing with Post Type Objects (Using get_post_type_object();) and Taxonomy Objects (Using get_taxonomy();) there's a property called "description". How do you set this description ...
0
votes
0answers
31 views

Custom post_type 404 error

I created my custom post_type for "trip": $rewrite = array( 'slug' => 'vylet', 'with_front' => true, 'pages' => true, 'feeds' ...
4
votes
2answers
98 views

How do I create a link that will always show the latest post?

If I want to create a link that will always show the latest post how can i do that? Lets say I have three post types and there are three links with posts names (like a nav list) to those post types. ...
2
votes
1answer
96 views

Adding a term name from a custom taxonomy assigned to a post link displayed by a wp_query loop based on another taxonomy

I have registered a custom post type "Animals" and also two custom taxonomies ("Vertebrate" and "Type") assigned to it, which have their own specific terms, for "Vertebrate" it will be "Mammals" and ...
0
votes
0answers
40 views

How do I get is_single() to return true when called internally from the_content()?

I have a custom page, e.g. blog.php?post=42 that shows a GET-specified post like so: <?php require('wordpress/wp-blog-header.php'); ?> <!-- my non-wordpress site's html goes here --> ...
0
votes
1answer
39 views

Sort Posts By Custom Field Date?

I have the following code displaying posts from a custom post type. However, I need them displayed in date order from information put in a custom field, can this be done? I try this code :- $course ...
0
votes
1answer
25 views

Post types translation

I try to translate post types names (Post, Page and Attachment). I have the following code: function create_skip_post_types_box () { $post_types = get_post_types(array('public'=>true), ...
3
votes
2answers
110 views

Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?

I am building a theme in which I have a post type, which will have an archive in a grid layout. You're probably thinking, "Just use the CPT archive!" Well, there are some cons to that method that I'd ...
0
votes
0answers
82 views

Custom Permalinks for CPT causing 404 errors for 'normal' single post pages

I'm having a problem with the permalink structure of a Custom Post Type which is conflicting against the normal single posts (in the 'posts' post type which comes as standard with WordPress). Heres ...
0
votes
2answers
65 views

Show only public custom posts in home page

I am working on custom post types. Presently we are using below code to display all custom posts in home page <?php $args = array( 'public' => true, '_builtin' => false ); ...
1
vote
1answer
65 views

How do i know the current post type when on post.php in admin?

Im trying to do something with an admin_init hook if - and only if - the user is editing a post (post.php) with post type "event". My problem is that, even though wordpress points to a global variable ...
0
votes
1answer
31 views

wp_dropdown_pages() returns empty string for post type anything other then page

wp_dropdown_pages() while using for any post type other then page returns empty string. Codex says post type can be passed as key also the function uses get_pages() which takes the post_type key. So, ...
0
votes
1answer
42 views

Post type no single page

I have created a post type and I am trying to create a single page for that post type, I am creating a php file called single-job.php and it is using the index.php as a template. Below is my function ...
0
votes
2answers
138 views

Replace Post-Title with variable

I want to set a custom post-title with a custom-field meta in my Wordpress Theme. The user will add a new post to the post-type. When they do they will only see the "Title", "URL", and "Publish" ...
0
votes
1answer
65 views

How to Display Child Taxonomy Posts

I am trying to show items on a page grouped by child taxonomies in something that looks like this... Child Taxonomy 1 (h2) Item 1 Item 2 Child Taxonomy 2 (h2) Item 3 Item 4 I did manage to get ...
0
votes
1answer
17 views

Adding in support thumbnail removes editor

I have created a custom post type. And on the custom post type I would like to have a featured image. I have added the featured image to my custom posts however when I do this it removes the main text ...
0
votes
1answer
152 views

Wordpress register_post_type Invalid post type

I am creating my own posts in wordpress however I have hit a little problem and im not sure how to fix it. The below register_post_type creates an Invalid post type error. add_action( 'init', ...
0
votes
0answers
20 views

Determine mime type, wordpress mechanism

I need to tell file mime type. I'm really don't want to deal with PECL finfo extension. I don't know what php version client server has. Since I'm using wordpress, and it does have file upload ...
0
votes
1answer
192 views

Custom Filter using meta_value in wordpress admin list not working

Hello I was trying to filter the pages using a custom filter in admin post listing of wordpress, but after selecting in the dropdown it returns nothing like its just showing all the posts and the ...
1
vote
2answers
71 views

wp_list_filter() and supports

I'm testing the function wp_list_filter(), basically I want to know if post_type has some specific feature before making stuffs. So I end up with this: public static function ...
0
votes
0answers
29 views

How to remove slug from more than one custom post type

I followed this tutorial from WordPress (http://vip.wordpress.com/documentation/remove-the-slug-from-your-custom-post-type-permalinks/) to remove slug from custom post type. Now my question is how to ...
0
votes
1answer
421 views

wp_query for displaying attachments with a tag

So I am running the following query: <?php $args = new WP_Query(array( 'post_type' => 'attachment', 'posts_per_page' => -1, 'oderby' => 'title', ...
0
votes
0answers
57 views

How to show metabox key to custom post?

is it possible to show all custom metabox key name and show it as dropdown list on my custom post with my custom metabox dropwdown list ? this is custom metabox from another plugin/theme and how ...
0
votes
1answer
214 views

Custom wp_query differs on index page and category page

I've been banging my hand against the wall for a little while now trying to figure this out. Can anyone explain to me why this custom wp_query prduces two different sql statements, one for the index ...
0
votes
1answer
69 views

Custom filter for main search: how to exclude specific post_type from search results

Is there a way to use WP_Query's method, set(), in order to exclude a specific post_type from a global search. Here was my unsuccessful attempt: function _search_all($query) { ...
0
votes
1answer
73 views

Why is the post type on the search result page random?

So I think I might be doing something fundamentally wrong in my Wordpress themes since this issue seems to crop up every once in a while and I don't know why. So basically I created search.php and I ...
0
votes
2answers
845 views

Overwrite rewrite-slug of built in post-type 'post'

I need to change the rewrite-slug of the built in post-type 'post' to 'example.com/magazine/news/any-nice-news-item'. When I re-register the post-type 'post' and set the rewrite-slug to ...
4
votes
1answer
104 views

Exclude top-level pages from search results

With the following code I can exclude all posts and pages that are top-level, but I would like to apply this only to pages, not to posts (but I still want all posts in the results): function ...
0
votes
1answer
208 views

Taxonomy Category category.php not working

I have created custom post type, taxonomy and categorys. When viewing the category it seems to be using index.php and ignoring the WordPress template hierarchy. Any ideas why category.php, ...
0
votes
1answer
254 views

save_post not working with attachments

I've made a Meta Box for Posts and Pages, and while testing added Attachments too. But, curiously, the hook save_post does not fire. $cpts = apply_filters( 'my_filter', array( 'post', 'page' ) ); // ...
0
votes
0answers
77 views

get specific post_type from blog1 in multiste

okay this is the situation I have a coupon site with more than 2000 coupons already, now i want to display them on a second domain within my multisite setup. Therefore i need the second domain to ...
0
votes
1answer
19 views

Add a tag like a post

For days I'm looking at different threads Stackexchange, but I can not find the solution. I hope you can help me out. I created a post_type called "bands". I'm trying to, from another post_type (eg ...
0
votes
1answer
729 views

Add filter to Admin list for all custom post types by their custom taxonomies

I want to add filter on every Custom post type that have taxonomy associated with it. I have googled but found code for only for single post type or for single taxonomy.
0
votes
3answers
297 views

Target Post Type from array Query

I have the following query to extract posts from two different types. However, how can I then target them in the actual content display conditional code? The if ($my_query->post_type == 'featured' ) ...
0
votes
1answer
24 views

How would I get a list of posts from a custom post type

I know the query method that you would use, that's not what I want. I could query the post type, then do the if statement with the while statement and go from there, but I am trying to populate a drop ...
0
votes
1answer
112 views

What does get_current_screen() do?

Codex says ' This function returns an object that includes the screen’s ID, base, post type, and taxonomy, among other data points' . What does it mean by 'screen'? Coding example: function ...
1
vote
1answer
354 views

Custom dashboard menu does not stay open for the custom Taxonomy within it

Short Version: Custom menu with a custom post type that supports a custom taxonomy. The custom post type works, the menu for it works and stays open. The custom taxonomy works, but the sidebar menu ...
0
votes
2answers
596 views

Post Type => Any conundrum

I have a number of regular posts and pages in a regular category called "Featured". I have also installed a plugin called "Event Organizer" that creates its own custom post type called "Event" and has ...
1
vote
1answer
41 views

child of post type (custom)

I registered a custom post type (foo) with register_post_type, setting 'hierarchical' => true,so now when I want to use it I have post_type=foo. How can I query child of foo? any ideas? thanks!
0
votes
1answer
331 views

Sort query output on taxonomy term archive by post type using pre_get_posts

I'm using pre_get_posts to adjust the main query of the taxonomy term archive. What I would like to accomplish is that the output is listed by post_type. I have a total of 4 post types and I want to ...
1
vote
2answers
174 views

Query reset problem or flawed code to enable custom post type query

After reading through here and trying various options, I am finally able to get my custom post types 'testimonial' (created with product 'Toolset') to show along with my standard cat/tag queries ...
0
votes
2answers
188 views

Is it possible to filter the display name for post formats for display in the Formats meta box?

I've got a few special needs in terms of post formatting, but do not want (and cannot) break out of the standard Post Format paradigm per best practices. I've come up with a mapping of WordPress ...