Questions tagged [custom-post-types]

Custom Post Types extend WordPress to support additional content.

Filter by
Sorted by
Tagged with
-1
votes
1answer
164 views

How to string lines from the_content() hook in WordPress?

Inside my content-video.php template, I have the following codes: <iframe src="<?php echo get_the_content(); ?>" width="960" height="540" frameborder="0" allowfullscreen="allowfullscreen">...
-1
votes
1answer
872 views

Set a Custom Post Type as a Homepage

I'm trying to set up a custom post type single post as a homepage. I have custom plugin, it registers CPT called STACKS, I'm using it to build various one page scrolling pages. It has its own custom ...
-1
votes
1answer
92 views

Display div based on Group metabox selection [closed]

I am having an issue with the below code when it comes to displaying a div based on a specific metabox is filled in. I am using the Group metabox selection from CMB2 to handle my metaboxes. As of ...
-1
votes
1answer
54 views

how insert how many post type in this function?

I have two type post and i want display both in tag. this function i can insert one post type, how insert two post type in this function function post_type_tags_fix($request) { if ( isset($...
-1
votes
1answer
356 views

Get all terms assigned to a post from different taxonomies

There are different taxonomies. I have assigned different tags from these taxonomies to different posts. Can anyone help me to get all the terms which are assigned to a post. (Different terms from ...
-1
votes
1answer
44 views

Taxonomy listing issue - does not display how I would like

What I have is a: Taxonomy: menu_type Term: drink (parent term) Sub term: drink 1, drink 2 (child terms) Term: appetizer (parent term) Sub term: appetizer 1, appetizer 2 (child terms) I want to ...
-1
votes
1answer
746 views

How to show all posts of specific custom post type with their custom fields values?

I am trying to get the list of all posts with post_type "staff" along with custom fields assigned to this post_type. Custom fields were create with help of ACF. I've tried both: $query = new ...
-1
votes
1answer
948 views

ACF Field to set Publish Date - Post Duplication upon Update

So I am attempting to have a ACF set the date published of a Custom Post Type... and it sort of works. It will set the date of the post correctly the first time, but upon updates it will update the ...
-1
votes
1answer
61 views

Get custom post fields and display them

I am using the wpfacet plugin. I have two custom fields: I am trying to display these by the following code: <?php while ( have_posts() ) : the_post(); ?> <span class="main">&...
-1
votes
1answer
118 views

PHP Button Custom link [closed]

At this part of code of a wp template I want to change the permalink url of the "Book Now" button to custom link example: "www.mywebsite.com" byt_render_field("description clearfix", "", "", $...
-1
votes
1answer
236 views

add_filter > posts_where works partially

I started to work with this code: Used with meta_query in query_posts works slowly and i changed the code and started to work with add_filter function filter_where($where = ''){ global $wpdb; ...
-1
votes
1answer
1k views

Simple Share Buttons Add Plugin and Custom Post Type

First of all Simple Share Buttons Add is a great plugin to share WordPress contents to social media. Nonetheless, I encountered an issue with it. It is not possible to disable these button on custom ...
-1
votes
1answer
1k views

get content from json api to post

i am trying to get post from json api from a non wordpress site and i want to post the content to my wordpress site. currently trying with https://wordpress.org/plugins/json-api/ above plugin ...
-1
votes
1answer
99 views

Automatically add custom taxonomy when meta value gets to a set number or beyond

Is it possible to add a custom taxonomy to a post when a meta value gets to a set number? Im trying to get it so once my post_views_count gets to 150+ it then gets the custom taxonomy trending added ...
-1
votes
1answer
4k views

Getting ACF relationship field information

I am trying to use ACF Relationships to associate members to different committees. On the front end, I want to have the committee name and the board members that are associated with them. I have ...
-1
votes
1answer
509 views

How to create custom page templates with default page layout framework?

I'm writing a custom theme. Most of the content will use the regular index.php, header.php and footer.php. The index.php looks like <?php get_header(); get_sidebar(); ?> <div id="content"&...
-1
votes
1answer
504 views

Different layouts for different post types in wordpress?

What is the reason behind allowing developers to create page templates so easily and not allowing the same for posts? I have 2 custom post type named Mathematics and Mechanical I made it using the ...
-1
votes
1answer
857 views

How do I assign the post parent?

I am trying to connect two custom post types. Through lots of googling, I found the following code that adds a meta box to the admin screen to select a post from another post type as the parent, but ...
-1
votes
3answers
405 views

WordPress Loop trouble with ACF [closed]

I'm working on looping through some books for a custom post type with advanced custom fields. One of the ACF's is a checkbox, and I'm wanting to only show the values with this one checked. The current ...
-1
votes
1answer
759 views

Function not working on live server but every thing is fine on localhost

I am using a class to add featured images to the taxonomy terms , followed the tutorial on http://en.bainternet.info/wordpress-taxonomies-extra-fields-the-easy-way/ this is the code i used inside my ...
-1
votes
1answer
434 views

Create page using same slug as custom post type

I am working on a site for a client who has custom post type called "practitioners" and several posts within this displaying info related to different practitioners. I want to create a page with a ...
-1
votes
1answer
114 views

Issue On Listing Woocommerce Parent Tag List

I am having some issue on getting top level terms of product_cat Taxonomy of WooCommerce First of all I have a code which list all Terms in product_cat as: $terms = get_terms("product_cat"); if ( !...
-1
votes
1answer
954 views

Display Custom Post Type and Custom Taxonomy Data on Front End Using Only a Plugin

Can anyone suggest a good plugin-based, as opposed to template or theme-based, solution for the following that doesn't rely on shortcodes? I have a plugin that creates a custom post type and four ...
-1
votes
1answer
262 views

Looking for a plugins for organization portal (Staff, Units, Departments)? [closed]

I am looking for a plugin for internal organization portal that will display all the member of the organization also the hierarchy between the differents units and departments. Also I will be able ...
-1
votes
1answer
137 views

Issues on saving data from CPT select metabox

I can't save data from a select metabox. My code is http://pastebin.com/BMmKzti2 Where I'm going wrong? Edit: Here is my code function fichasvtmbasicas_meta_box_callback( $post ) { ...
-1
votes
1answer
816 views

custom post type breadcrumb error when has_archive = false

I have a custom post type (team) and I do not use archive page (has_archive => false), when I visit single team post the breadcrumb contains inactive text "TeamSingleTitle". I would like to know how I ...
-1
votes
1answer
704 views

show custom post's post in two different divs [duplicate]

I have created a custom post type. For that I have used this code add_action( 'init', 'broker_post_type' ); function broker_post_type() { register_post_type( 'new_broker', array( 'labels' ...
-1
votes
4answers
3k views

How can I get user URL by id

I am using custom post types, and I have a problem getting the author URL to his profile. I can get the author ID using: $authers_interviewdoctor = get_post_meta( $post->ID , '...
-1
votes
1answer
1k views

Emailing Authors only when a CUSTOM POST TYPE post is published- not when edited later [duplicate]

I have the following function that emails authors of a custom post type when the post is published which is great, but I would like it so that it does not email them on any future edits after that to ...
-1
votes
1answer
922 views

How to display custom message for (Genesis) featured posts if no posts

I'm using the Genesis Framework, and the custom post types featured post widget (code below). I need to display a custom error message for a particular post type if there are no post present for that ...
-1
votes
1answer
81 views

A call to list all Custom Post Types?

My theme currently uses this code to call all Categories into a list to pull posts from (in the backend) for a thumbnail widget. $mx_categories_obj = get_categories('hide_empty=0'); $mx_categories = ...
-1
votes
1answer
456 views

Determine category in taxonomy of current custom post type

Using a php statement - how can I determine the name of the category in a taxonomy of the current custom post type that a user is browsing?
-1
votes
1answer
31 views

One set of categories for multiple custom posts

Hi I have a site which has 3 different custom post types. At the moment each post type has it own custom taxonomy which is linked to the post type like a native category. What I would like is one ...
-1
votes
2answers
180 views

changing default comment form arguments [duplicate]

I want to change the default comment form title_reply, label_submit ... just on my CPT without affecting the default comment form but I can't get it to work without affecting the default ones. First ...
-1
votes
1answer
398 views

sidebar hierarchical menu category & custom post type

I'm working on a site with courses. I've created a custom post type "Course" and need to create a sidebar menu with the list of courses under the active category and then with anchor links to the ...
-1
votes
2answers
2k 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 ...
-1
votes
1answer
999 views

Wordpress custom post type odd and even styling [duplicate]

I've got a custom post type that I would like to be able to show in the following: is this possible using the following code: <?php query_posts(array('post_type' => 'story', 'orderby' => '...
-1
votes
2answers
7k views

Custom post type: can't enable comments by default

I want to enable comments for custom post types just like they are for standard posts, but can't seem to get it to work. In functions.php, as part of registering my custom post type, I have this: '...
-1
votes
1answer
31 views

Add categories to custom post type

I am using this plugin called Rotating Testimonials by wpbeginner and I have customised to suit my needs, however I need to add the option to add each testimonial to a category and then show the ...
-1
votes
1answer
165 views

Custom taxonomy meta fields

I'm trying to make an anime site like myanimelist.net but in spanish with links of the episodes at the bottom. I created a post type called anime, and some custom taxonomies associated with it: series,...
-1
votes
1answer
297 views

How to sort custom post type by multiple custom fields?

How to display posts with 'agenda' custom type ordered by custom fields 'agenda_date' and then by 'agenda_time'? 'agenda_date' is date custom fields. agenda_time is text custom fields I tried this, ...
-1
votes
1answer
983 views

Choose custom post type template by category

I need to style my portfolio posts with different templates. My thought is that it would be done by category. I have tried using in_category and is_category and a lot of other work around's but to no ...
-1
votes
1answer
41 views

Wordpress show different custom post type

In wordpress I want two different types of custom post. In one section I want to post all the latest news and in other I want to use as blog. In latest news post type when I will make a news it should ...
-1
votes
1answer
52 views

Exposing custom fields to the user in custom type post

I have a custom post type - say Hotel Booking - all the data are filled in by the admin and users can browse through different Hotel Rooms. Now, I would like the user to be able to tick additional ...
-1
votes
1answer
219 views

Pagination for Custom Post Type with Multiple Types

The first page shows the first results however, mypages/page2 leads to a 404 error. The following code is inside archives-mypages.php <?php $temp = $wp_query; $wp_query=null; $args = array( '...
-1
votes
1answer
1k views

Front end post form won't post categories to custom post type

Trying to get a front end post form to work with my custom post type. It posting to the post type but the 2 custom taxonomies and the tag field aren't posting/saving. Here is my CPT. add_action('init'...
-1
votes
1answer
25 views

my custom_post_type does not appear in my web page…how?

i created a custom_post_type and created a post in there and it does not appear in my web page... how can i call it to where i want? normal post are called like this: <?php if ( have_posts() ) : ...
-1
votes
1answer
127 views

How is it possible to list custom post types by “category” like with simple posts?

I created a custom taxonomy, "partners". I would like to categorize these items, so I created a custom post type with a taxonomy. register_taxonomy("partners-category", array("partners"), array("...
-1
votes
2answers
553 views

Custom Post Type Archive Title Lowercase

Is there any reason that my custom post type archive title is all lower-case even though 'name' is defined as sentence-case? Here is the post type function I'm using: function resources_post_type() {...
-1
votes
1answer
21 views

Are custom posts included when getting a categories' posts?

Would WP_Query('cat=1') display custom post types, or is that something that I have to specify? I have a custom post type, am assigning it to a category, and would like for it to be displayed when ...