Custom Post Types extend the WordPress back-end to support additional, non-Post content.

learn more… | top users | synonyms (1)

1
vote
1answer
2k views

Add Standard Page Attributes Metabox for Page Parent

I have a custom post type 'product' supplied to me by a Wordpress eCommerce plugin that does not offer the option to change the Page Parent in the Page Attributes Metabox. I'd like to remedy that. I ...
0
votes
0answers
4 views

Create a wp_query where if the first value of the first row is ewual to the second compare other value

i want to create a query of a custom post type where the order is by a custom field and i want if the custom field are equals to compare a second custom field. $args = array ( 'post_type' ...
0
votes
0answers
7 views

Add an accordion - like the one on the Menus page

I want to add an accordion to a custom dashboard option page, like that in WordPress Dashboard -> Appearance -> Menus -> Pages: I've tried many ways to do this but failed. Is there any function ...
1
vote
2answers
620 views

Hide Meta Boxes for Non-Admins

I have a review based wordpress site where I have a page for each different company where there users can review them. The theme I use adds a custom post type called "review" and I have used Press ...
0
votes
1answer
985 views

save_post custom post type ? $_POST not working?

i have this code. <?php add_action('add_meta_boxes', 'ct_meta_add'); add_action('save_post','ct_meta_save'); add_action('save_post','ct_parent'); // add meta functions function ct_meta_add() { ...
3
votes
3answers
3k views

Getting Bootstrap accordion working in Wordpress loop with custom post type (collapsing issue)

First off I am well aware that there is a plugin but I am NOT talking about the BS Short code plugin. I am talking about the actual bootstrap accordion. So here is what I am trying to accomplish, I am ...
-2
votes
0answers
23 views

Siloing with wordpress - For professionals only?

want I want to do: I want to change the structure of my website. I have two custom post types(CPT) "car", "bike" and a blog. I am using CPT UI Plugin for the custom post types. But I don't get ...
-2
votes
0answers
7 views

How can I get just the title of a custom post type based on the date custom field?

I'm converting a closed CMS site into a WordPress site and they have a good "plugin" to show just the title of the Lunch of the Day on the front page (see http://sirkanleipomokahvila.fi) and the ...
0
votes
0answers
17 views

custom field shows also images of other posts in lightbox

function wp_list_mine_posts( $wp_query_obj ) { // Front end, do nothing if( !is_admin() ) return; global $current_user, $pagenow; wp_get_current_user(); // http://php.net/...
-1
votes
0answers
29 views

How to export CSV file for custom post type in WordPress without using plug-in?

I am new to Wordpress. I created the custom post types using Types plug-in and created some posts in that. Now I want to export the post as a CSV file without using Wordpress plug-in ?. Can anyone ...
0
votes
2answers
15 views

How to filter url on post submission?

I would like to swap out image URLs upon post submission on both content editor field and a custom field cover_image of a custom post type article. For example, the original content may contain image ...
1
vote
1answer
41 views

Made Custom Post Types, but single.php not working

I made some Custom Post Types, filled them up with some posts, added the template tags to the templates. The problem now is that whenever I click the 'Read More' button on a custom post type (...
0
votes
0answers
33 views

Form to custom post type and custom taxonomy 2

Following on successful addition of custom taxonomy with a great help here I've been banging my head on the following three things. How would I add another taxonomy "trademen-category"? How would I ...
0
votes
1answer
23 views

Change the url of a custom post type to include taxonomy

I'm trying to create a custom post type where there will be a lot of identical post names, but they will have different taxonomy values. Is it possible to define a slug mode where the taxonomy ...
0
votes
1answer
2k views

Let users upload image(s) to the post from front end

I want to enable logged in users (Wordpress) to submit posts from front end (among with other data). My form is working great, I add custom post meta data which I later display on custom post page. ...
0
votes
2answers
39 views

How do I disply an array inside a custom post type?

I tried to create a table output with the content of a custom post. I can echo my city properly: <span style="font-weight: bold;">city: </span> <?php echo get_post_meta($post->ID, '...
1
vote
1answer
1k views

Displaying custom-taxonomy-terms sorted by parent/child-hierarchy?

I have a custom post type with a custom taxonomy (to show some "best practice" examples on my website). On the single-post-page (single-bestpractice.php) I wanted to show all the terms (categories) ...
0
votes
1answer
463 views

Edit Permalink Structure For Custom Post Type or Modify .htaccess?

I've been trying to find a solution for days now and I am absolutely stumped. I am putting together a website to list my domain portfolio for sale and I'm using a plugin I purchased to lists the ...
0
votes
0answers
18 views

Adding a term to a listing inside of shortcode that otherwise contains permalinks to custom post items with custom field values

I have this shortcode to output all items of custom post type "song", on a page listing all the songs a musician released throughout his career. // Custom shortcode, to query tracklistings on the ...
1
vote
1answer
457 views

Custom post type “preview” not working

I'm having an issue with custom post type "draft" post previews redirecting to the site home page, if I have pretty permalinks enabled. For instance, I create a new "Project", save as draft, and ...
0
votes
3answers
503 views

Custom post type paging 404 error

I've an issue on custom post type, I've create a custom post type called "Agenda" and the rewrite url for http://example.com/agenda it works correctly, it points to the archive-agenda.php template ...
0
votes
2answers
566 views

Display and register custom categories for custom post types

Ok here we go. I have 2 different custom post types. The first is called 'portfolio', the second one 'games'. All the game reviews I write are 'games' posts. To have a better overview I created ...
2
votes
1answer
1k views

wp_dropdown_categories in custom post type with custom taxonomy

I have a custom post type with its own taxonomy, basically 'show venues' is the post type and venue-regions is the taxonomy. Seeing how a venue cant exsist in mutiple regions, I've removed the ...
1
vote
1answer
474 views

Update ACF fields on a frontend form?

I have the form below to update posts in a custom post type. In my custom post type I have some ACF fields which I also need to be able to update, but unsure how. I can update my default WordPress ...
1
vote
1answer
1k views

RSS feed for dynamic set of custom taxonomies terms

I've got a CPT called 'Job' and three different taxonomies associated with it: location, type (permanent/contract) and expertise. I've got a filter on the website that allows to search for jobs of ...
0
votes
0answers
13 views

WP_Query sorting by Taxonomy

I am trying to display the custom post type of accommodation that have a the location of wa under the Location taxonomy. Although i am not having any luck. Can anyone tell me what i'm doing wrong? $...
0
votes
1answer
16 views

Custom Post Type by user

I made a Custom Post Type for events that can be added in the admin by only certain groups of users, like a Secretary. This Secretary can add some new events, but I want to display each user his own ...
1
vote
1answer
26 views

Create a shortcode to display custom post types with a specific taxonomy

I created a page template to list all products of a specific product line. Now I want to list all posts from this custom post type (products) based on the taxonomy described in the shortcode for each ...
0
votes
1answer
511 views

Taxonomy Url with Custom post type prefix re-write rule

I have a taxonomy called Section and a Custom post type called Developments. What i need to achieve is a permalink on the taxonomy with custom post type prefixed: e.g: custom post type: development ...
0
votes
1answer
13 views

Custom columns doesn't appear in custom post type

Hi i have a 'tour' custom post types and when i add a custom column at this post type there is not any custom column at tour post type my code is here function tour_price_col( $column, $post_id){ ...
1
vote
2answers
323 views

Display custom post on home page based on a metabox selection

I am trying to display an post to my home page based on a selection. What I mean is in the backend I have a custom post that has a metabox labeled Assign to Home with a drop down that has a selection ...
0
votes
0answers
20 views

how to filter post only parent in admin list table

I make custome post type hierarchy and than i make some post consist of parent and child, on list table it showing like this : parent_1 child_1a child_1b parent_2 child_2a child_2b My ...
0
votes
1answer
410 views

How to set YouTube video as featured image?

I am trying to have all my posts with post_format set as video, have said video as the featured image. Here is what I am working with thus far but I need some help: if($post_format == 'video') { ...
0
votes
0answers
22 views

Add column to custom post type based on assigned taxonomy

I'm trying to add a new column to the Custom Post Type I've created. I've also created a custom taxonomy for this CPT, so what I'm wanting to do is display which taxonomy term each post has assigned (...
0
votes
1answer
20 views

Render the metabox input values as HTML

I'm new to PHP and WordPress. I've created a site on WordPress, where the user can add an HTML code snippet (the inputs are taken using a metabox and displayed). The problem is WordPress doesn't ...
0
votes
2answers
1k views

Paginate_links links not working accordingly to how I do query the page

Ok, I've a custom post type page to which I have attached the paginate_links function to navigate through the elements. If I don't do anything and let WP using whatever mechanism is attached to the ...
0
votes
1answer
15 views

Is there a way to group specific CPTs under a single dashboard menu item?

My next project may involve dozens of CPTs (it's a ad board and each category would be a CPT, for example CARS and associated special attributes like mileage, gas/petrol and such as custom fields). ...
1
vote
2answers
61 views

How to hide CPT files from media library programmatically

We have created a CPT which allows our customer to upload files from the admin page to a folder outside of the wp-content/uploads folder. Files are uploaded and manipulated using wp_handle_upload and ...
14
votes
9answers
13k views

Remove taxonomy slug from a custom hierarchical taxonomy permalink

I created a 'forum' taxonomy, using these rules: register_taxonomy( 'forum', array('topic'), array( 'public' => true, 'name' => _a('Forums'), 'singular_name' => _a('Forum'),...
0
votes
1answer
482 views

Display 1 Post per taxonomy with polylang

I am trying to make a loop where I display all my taxonomies with the first post of every taxonomy. It's the taxonomy "customers" and I want to display every first portfolio-CPT of the customer. I ...
0
votes
2answers
510 views

CMB select with data from CPT

I'm using the CMB framework for creating metaboxes (https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress) and I want to add a select box which prepopulates with titles from a custom ...
2
votes
2answers
1k views

wp_nav_menu() mark current item ancestor of custom post type

This solution does almost what I want it to. Only thing is, I have my menu set up as follows: Menu item 1 Menu item 2 Custom post type 1 Custom post type 2 Custom post type 3 Menu item 3 ...
1
vote
6answers
7k views

How do I require authorization / login to view a specific set of posts / pages?

I am working on a wordpress site for a client who wants an internal 'intranet' for his employees. The basic needs are: Communicate things in-house House important company documents Provide quick ...
0
votes
0answers
20 views

Rewrite rule with a custom post type and a custom field

I'm creating a website that will display, from a search by location, a list of singer. If we click on a singer I will have to display that singer with the city inside the url. Here are the two ...
0
votes
0answers
7 views

lock edit content on edit page

I'm on a multisite project, and I need some help. I have to duplicate some post (i use multisite duplicator post) and if they are not coming from this blog (blog_id origin stored already store in ...
0
votes
1answer
539 views

Using Custom Post Meta Values in Shortcode

I'm trying to display meta content from a custom post type in a shortcode. I'd like to simply provide a post_id and be able to display all the meta content. [my_shortcode post_id=""] I'm new to PHP ...
1
vote
2answers
15k views

How to add multiple images to custom post type?

I would like to create a simple plugin to add multiple images to a custom post type. I have created a plugin to add a single image to a custom post type, but I am unable to figure out how to add ...
0
votes
1answer
537 views

Give a unique ID while saving

I have in my theme custom post types (products) with some meta-boxes. My client asked me, to automaticly give a unique SKU (meta-box) while saving that product. My thought: Give a random ID => ...
1
vote
1answer
432 views

WP_Query wooCommerce category

What is the favored way for searching for a certain category in wooCommerce? Or maybe only checking if it is existent already? My approach for this was: $searchCat = new WP_Query(...
0
votes
1answer
418 views

Save Metabox Custom Field Value

I am using this code to show post type dropdown to select available post types but when i submit the post it restores the value back to post, how can i make sure it saves it? <select name='...