Questions tagged [custom-post-types]

Custom Post Types extend WordPress to support additional content.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Display category filters for custom post type when category is shared by multiple post types

I already have a solution to this problem but I'm wondering if there's a more efficient way to do it. I have a custom post type called "galleries" that uses the same taxonomy as blog posts. ...
1
vote
0answers
8 views

How can I list all custom post types in a block

I want to show the list of all available custom post types in the settings of the block in admin. How can I do that? Later I want to show a dropdown with those post types which user can select and ...
0
votes
0answers
15 views

How to only display all posts to a custom User Role?

I have a custom user role and I want to display all custom website posts to them, without letting them edit/delete them. Right now the custom post doesn't show up in their dashboard. I know it will ...
0
votes
1answer
18 views

Why is my Custom Post Type not showing up after adding capabilities?

I'm trying to add a custom post types with capabilities, so a custom user role can do certain things with them. Eventually the custom role is a Client, and the post a Website, and I want clients to be ...
0
votes
1answer
10 views

How to add a sub directory to WordPress single posts without affecting other post types?

I've been trying to add a subdirectory to my blog post's permalink for example domain.com/blog/post-slug/ However, this is affecting the other post types that I've created using Pods such as domain....
1
vote
1answer
37 views

Having trouble with custom date field for CPT query (Wordpress)

I've read as many of the questions and answers on here as I can find and none of the solutions are working for me. No idea what I'm doing wrong here. I have a CPT 'event' with meta key 'start_date' - ...
0
votes
0answers
23 views

Dashboard error from creating custom taxonomy code [closed]

I am adding a custom taxonomy to my plugin file, however when I try to flush the permalinks in the dashboard, I am confronted with this error on it: What does this mean and how can I fix it? I have ...
0
votes
0answers
38 views

How to get the custom page get_permalink?

I have create two a custom page called page-blogs.php and page-blog-content.php. In the page-blogs.php I am displaying my all the custom blogs post and page-blog-content.php will display the blog ...
0
votes
0answers
19 views

Display 10 popular tags of custom posts of curent custom taxonomy term

I want to display 10 popular tags in current taxonomy. ok i can display popular tags of total tags but i need to display tags (with post count) of custom posts of current custom taxonomy term. please ...
0
votes
1answer
16 views

Do posts, pages and / or custom post type objects have unique ID numbers or can there be multiple objects with the same IDs?

What are the canonical rules for the ID numbers of posts, pages and CPTs? Especially as they are created programatically.
0
votes
0answers
13 views

Show all entries from an ACF Field

I have used ACF Pro fairly successfully thanks to these forums and I am back once again for help as I am clearly not a programmer! I created a new WYSIWYG field and added it to my Custom Post Type. I ...
0
votes
0answers
30 views

How to add field to custom post type endpoint

I have an endpoint in this address: example.com/wp-json/wp/v2/myendpoint I want to add a field to the endpoint with these codes: add_action( 'rest_api_init', 'create_api_posts_meta_field' ); ...
0
votes
0answers
20 views

Permalink for a custom post type isn't working and I don't know why

I think this question was answered a lot, but despite all threads I couldn't find a valid answer: I'm working on a website with Wordpress (and without any plugin). Here the creation of my custom post ...
0
votes
0answers
58 views

Modify Custom Post Type Slug

I have a CPT called 'projects', which display images with their titles. I have a page to display the CPT's called 'single-projects.php'. Is there a way through using templates and/or functions, to ...
1
vote
0answers
17 views

Return the latest post from a custom Taxonomy and Post Type

CPT called: updates Custom Taxonomy called: systems What I was trying to do was loop through all my posts in a CPT and display the '1' latest post from each of my 'I think they're called Terms' (it's ...
0
votes
0answers
7 views

How to customize DIVI Post Slider and similar modules to Include Custom Taxonomies created with PODS [closed]

We have been using DIVI for a very long time now and we are facing a deadlock right now. Though there are other less convincing ways to accomplish what we need, but what would be really great for us ...
1
vote
1answer
31 views

Found 2 elements with non-unique id (#_ajax_nonce) and (#_wpnonce)

I am developing custom theme from scratch and creates a custom post type and getting this warning while editing custom post type. I also design custom Meta box with two input fields and using nonce in ...
0
votes
0answers
11 views

Add class of active faq

I create a custom post type for faqs. Now I want to add class of active faq but its add all items active here my code: <?php // get current page/post ID ...
0
votes
1answer
28 views

Custom post type and standard post not displaying or working

I want to display 5 images of custom post type 'project' and 1 standard post in the front-page. I have tried to merge both queries in one, however its not working. FYI: I have set the theme support ...
0
votes
1answer
26 views

WordPress Custom Post Loop

I am trying to loop through the custom WordPress posts and have an issue like I add the custom field and want to display it in <li> using loop. I did it successfully but the data/link/category ...
0
votes
0answers
23 views

How to debug failing updates for custom post type?

Issue Overview I have a post that I am working on for a few days, when I try to update it I get a error updating failed. Steps to Reproduce (for bugs) Make a post Select a sub industry taxonomy Save (...
0
votes
0answers
14 views

Display images on front-page static or custom post type?

I am currently learning Wordpress development, building out a portfolio theme. I would like advice on what's the best way(noob question), development wise, to dynamically display featured images on ...
0
votes
1answer
25 views

Change custom taxonomy archive permalink

I have created a custom post type named video and a custom taxonomy for video as video_category. I have created a page template with the name taxonomy-video_category.php. So that the categories of the ...
0
votes
0answers
5 views

How allow admin to manage textual information in a custom post type page?

I have a custom post type allowing to create articles as meals. All that meals are rendered in a specific page. I want to add information about menu & prices on top of that page (like a banner ...
0
votes
0answers
22 views

Disable comment flood protection for specific post type

I am trying to disable comment flood protection for a specific custom post type. So far I have tried the following: function filter_comment_flood_filter( $false, $time_lastcomment, $time_newcomment ) {...
0
votes
0answers
9 views

Easiest and most elegant way to make comment form appear as popover (using ajax preferably)

What is the most simple/robust/elegant way to make my comment forms appear as a popover modal? I have many CPT elements appearing on the page, so AJAX would reduce the initial load time. Here is the ...
0
votes
0answers
35 views

How to modify a query in functions.php to involve both post_title and fields from wp_postmeta?

On my Fusion Builder powered WP website I have created a CPT called movies. The title of each post (i.e. each movie) has a post_title property which is located in wp_posts table, other custom ...
0
votes
1answer
21 views

What is the diference between Post Metadata and Queried Object

When I edit a Submitted Essay post and look at the Post Metadata using the plugin JSM's Show Post Metadata. I cannot see comment_status. But when I view the post using the Debug Bar and look at the WP ...
0
votes
0answers
10 views

how to add share buttons below any image inside the post?

I have a function of sharing buttons which i have added in function.php of my theme using filter hook,Now I want to hook same function below the image of my post(not featur image),which filter hook ...
0
votes
1answer
23 views

post_type internal ID?

This may sound like a stupid question, but is there something like an ID associated with the post types (built in or custom) in WordPress? I'm not interested in the actual post id, but wondering if ...
0
votes
0answers
20 views

Wordpress next post by ajax call on button click

I have an archive of custom post type "Trivia" where I want to display next custom posts on click of a button "Next Post" I have this code for displaying 1 post on archive page: $...
0
votes
1answer
41 views

Store a value in global scope after init hook is fired

I am working now on a Settings page. As I will need data about post types, taxonomies, and posts repeatedly in my setting page, I preferred to get these variables in the global scope and call them in ...
0
votes
0answers
14 views

Why this didn't work if i use get_the_ID(), but works if i pass the numeric id

It is a custom meta box that handles pdf upload. I want to get the URL of the uploaded file. Inside admin, it works but on the homepage, it doesn't work. function moin_notifications_get() { // ...
0
votes
0answers
14 views

How to export only custom taxonomies for each post in CSV/JSON format?

I have one wordpress website running with 100+ products (woocommerce) and i had to export & import the products into another wordpress website. However, products have custom taxonomies that were ...
0
votes
0answers
13 views

Section Intro and items add in custom post type

I create a custom post type service. But in my section i have services items and service section intro. I add service items added in service custom post.But now am confused how can i add service ...
0
votes
0answers
25 views

Boostrap Sliser convert into wordpress

I create a custom post type slider. I add the title, content and featured image, but there is a button option in my boostrap slider. I dont know how can i add button in the custom post type and how ...
0
votes
1answer
23 views

Create a post automatically if search result has zero results

I'm developing a site where people can search phone number(s), the most complex part is that i want to create a post automatically when someone search for a specific number if that phone number yield ...
0
votes
2answers
33 views

Custom post type query with taxonomy

I use this query to call posts from a custom-type post I setup apart $args = array( 'posts_per_page' => 5, 'order'=> 'DES', 'post_type' => 'custom-post' ); $myposts = get_posts( $args ); ...
0
votes
1answer
23 views

Create API's for custom-post types & custom queries using REST or Graphql

I want to create a cross-platform app using rest APIs for the website (zoetalentsolutions.com). The website is in WordPress and has custom post-types, fields & custom queries. This app will not ...
1
vote
1answer
22 views

Custom post type - no layout section of Document tab, and no author choice

A portion of my website is used by another non-profit organization. In order to restrict them from editing/deleting at large, I created a custom post type for them, and added a user role to go with ...
0
votes
0answers
16 views

Custom Post type content not displaying on single page

I have added a select dropdown on my custom post type in the admin panel. Basically that is a select dropdown which is displaying my another custom post type title. I used below code. $args = array( '...
0
votes
1answer
15 views

Trying to list years (for a filter) but not all years display

I did an ajax filter to filter posts per years, however the filter isn't showing all items. Years are displayed in DESC order, but not all years appear I don't understand.... <?php $terms_year = ...
0
votes
1answer
17 views

Only show posts with a specific term of an associated taxonomy in a custom post type archive

I have a custom post type "movie" with a taxonomy "period". The "period" taxonomy has two terms: "current" and "past". Is it possible to only show ...
-1
votes
0answers
13 views

How can I do metabox filtering?

I have a post type. I have a private domain within this post type. My special area is a date. I want to filter by post type and end date. How can I do that? Thank you in advance for your help.
0
votes
0answers
9 views

Adding custom URL rewrite rule for custom post type slug

I have a theme which defined custom post types. This post type is having a listing page and a single item page for every item. The problem is I can't change the slug for the custom post type and for ...
0
votes
0answers
12 views

WordPress pagination problem on merged queries

I have merged queries in search.php with custom post types. This is my scenario when user search to "math", the main query is searching in the post title, post excerpt, and post content. Now ...
0
votes
0answers
20 views

How can I make rewrite rules for a custom post type?

I'm trying to create rewrite rule which will work this way: when user enters URL site.com/projects/projectname/cityname it should work as site.com/?projects=projectname&city=cityname, where: ...
0
votes
2answers
20 views

REST filters only firing when I have a param set

I'm trying to use a REST filter to require a certain parameter is set. Using custom taxonomies and custom posts I've been able to make it so when I request /wp-json/wp/v2/car?visible_to=123 That the ...
0
votes
1answer
25 views

Add two custom product type

Hello i'm trying to add two custom product types, if i only add one everything works fine but when i add the other custom i get a crtic error, what im doing worng, this is the code that im using ...
0
votes
0answers
26 views

Adding a Custom Post Type

I'm not sure if this is feasible or not, but I want to add a simple custom post type that does two(2) jobs: Has a comment section (the user can comment on an image) It has a rating system (basic 5 ...

1
2 3 4 5
192