Questions tagged [custom-post-types]

Custom Post Types extend WordPress to support additional content.

Filter by
Sorted by
Tagged with
0 votes
2 answers
83 views

How to Display Content from Search URLs on Permanent URLs in WordPress?

The search link for a WordPress website looks something like this: https://example.org/?s=seo or https://example.org/?s=blogging. For certain specific pages, I prefer to use permanent links. For ...
Ranuka's user avatar
  • 1,782
0 votes
1 answer
22 views

Wordpress duplicating posts from single loop

I've created a custom post type with ACF custom fields included. The CPT is being placed inside of a bootstrap slider. Everything seems to be working, except, the posts being rendered on the page are ...
Mitch S's user avatar
  • 27
0 votes
0 answers
18 views

author archives, showing all custom post types, problem on pagination

Please, look at the link to the page I need support with. This is a website where several “authors” make their reviews on books or create some original posts. This page shows “Badges” which are all ...
Ioria's user avatar
  • 11
0 votes
0 answers
12 views

How to assign a single-menu-template to a menu-items in a taxony/ cat/ subcat/ subcat-item

Hi hope really someone can assist. I have created a single-meny-template with post-type-meny, and I have created taxonomy, categories, sub-categories and subcat-items. What happens is that the ...
Brango's user avatar
  • 1
0 votes
0 answers
32 views

Disable All In One SEO plugin for custom post type

I am using All in One SEO Version 4.2.7.1 I just added a custom post type using below code- function RK_FAQs_register_post_types() { // Set UI labels for the recipes post type. $labels = ...
Ravinder singh's user avatar
0 votes
0 answers
33 views

Use Custom Field to Display Post Loop

In my custom template I have created a menu which is a row of 10 horizontal tabs. Each tab shows a date which is defined using an ACF datepicker field in the post. I have also created a custom post ...
SavPhill's user avatar
  • 118
0 votes
2 answers
29 views

Exclude multiple custom post types from search

I'm trying to exclude a couple of custom post types from search results. The following works for one post type: // Exclude custom post types from search add_action('init', '...
Glasshalfpool's user avatar
0 votes
0 answers
20 views

Best Approach for Implementing Custom Post Types and Taxonomies for an Events Website?

Hello fellow WordPress developers, I'm working on creating a website for events and conferences using WordPress, and I'm trying to figure out the best approach for implementing custom post types and ...
AkshatLive's user avatar
0 votes
1 answer
17 views

Query custom fields with three dates - start and end does not work

I have tried to make a reservation system for a book a table in restaurant. But, I have a problem when I try to see/ make new reservations in an specific day - in showing me which table are free at ...
Fujitsu09's user avatar
0 votes
0 answers
26 views

Is it possible to go to the next post in the same category?

Is there someone who can help me to change the code so the button goes to the next post in the same category? TaaaaannnnnXXXX <div class="nk-pagination nk-pagination-center"> ...
Jasper Stamm's user avatar
0 votes
0 answers
12 views

How to disallow users to edit other's posts for a new custom post type?

I am trying to add a new custom post type and everything works except one thing - contributors can edit other's post of this post type. Here is how I've registered it: /** * Adding new "Series&...
Petar Vasilev's user avatar
0 votes
0 answers
101 views

Send summary email from a form with wp_mail

I'm trying to send two emails (one to the site manager and one to the user) with the data entered in a contact form made by me and placed in a wordpress template, but this doesn't work. i am using ...
LesCa's user avatar
  • 21
0 votes
0 answers
14 views

How to allow subscribers to create post of a new custom post type

I am working on a plugin which adds a new custom post type and I want all users to be able to create new posts of this type. Here is what I've got at the moment: $labels = array( 'name' ...
Petar Vasilev's user avatar
0 votes
0 answers
32 views

Wordpress display post count for custom post type

I have a custom post type created and a taxonomy with CPT plugin. Using Elementor I created an archive page to show the posts from the taxonomies created. I would like a shortcode to dynamically ...
Cosmin Dan's user avatar
0 votes
1 answer
66 views

Using Query Loop with Custom Post Type

I have a Custom Post Type (CPT) named "Events", and I want to add a Query Loop on my front page that displays the upcoming events that my website visitors may want to participate in. On the &...
mawgumelar's user avatar
0 votes
0 answers
32 views

Media Library empty or only 1 item when invoked from custom post type set featured image button

Custom post type 'offer' is defined in a 'mu-plugin' using ACF syntax including featured image support. Theme functions also explicitly declare featured image support for this custom post type. When ...
Ingo Steinke's user avatar
0 votes
1 answer
26 views

Custom fields disappearing when a custom post type is assigned

I have a custom taxonomy page. This custom taxonomy has a few custom fields to populate it's template. A user is able to assign custom post types and media to this custom taxonomy and then those posts ...
solariati's user avatar
0 votes
0 answers
10 views

A custom field that can search through many other related post types?

It's been half a decade since I tried to make a wordpress site, and in the past I would use Advance Custom Fields to solve a very specific problem I'm about to ask. I want to see if there's a newer ...
John's user avatar
  • 157
0 votes
1 answer
32 views

Can Multisite and Custom Post Types work this way?

I'm running a WordPress multi-site, where i have created a custom post type which have 5 different categories on main site. now i want to display data (posts) of those 5 categories on multi-sites 5 ...
Chandresh Tiwari's user avatar
0 votes
0 answers
10 views

Stripe Button not working on a custom post type template

I have a custom post type of "Properties", I am adding a stripe button on the template on this Property Post Type. But when I click the stripe button, i get the following errors: jquery.min....
Bob Jurgens's user avatar
1 vote
1 answer
46 views

Creating multiple pages from one custom post type entry

I'm looking to create multiple pages from one custom post type. For example, I have a custom post type called "Students" that collects various pieces of information, such as name, email, ...
jbenes's user avatar
  • 11
0 votes
1 answer
35 views

Detach Wordpress Media Files In Bulk

Just switched WP themes and I have about 1300 media files attached to what Wordpress is calling a 'Private Post'. These Private Posts are actually photo portfolios from the previous theme. 200 ...
Elemental Media's user avatar
0 votes
0 answers
15 views

Custom Post Type - how to get video urls to automatically result in embedded video?

I've created a custom post type that mostly follows the same setup as posts in order to more easily manage a particular group of content -- most of those posts will include multiple videos (loaded ...
ScottM's user avatar
  • 45
0 votes
1 answer
40 views

Change formatting of Date parameter on custom post type

So I have a custom post type called "wp_events", and I would like to update this portion: Where is says "Scheduled 2023/11/05 by default, I would like this format: Scheduled November ...
InvestedLabs's user avatar
0 votes
0 answers
23 views

How to Show Standard Post and Custom Post in Same Section at Homepage?

I'm trying to show both my standard posts and custom posts on my homepage. I've got the following code working, but it's causing a 404 error if I assign a custom homepage. If I keep the setting of &...
Ayushvam's user avatar
0 votes
1 answer
42 views

How to get taxonomy category in permalink for each taxonomy OR How to give a parent page to a given taxonomy?

I have two taxonomies on my site: portfolio works and blog posts. I want blog posts under /blog and I want portfolio items under /work. I have created a page for blog posts and a page for portfolio ...
JugJoe's user avatar
  • 3
0 votes
0 answers
23 views

CPT Rewrite Slug to Another CPT Slug/Key (as CPT-A/CPT-B Format)

I registered multiple custom post types with following pattern: CPT-A: 'has_archive'=> 'cpt-a' and 'rewrite'=> array('slug' => 'cpt-a', 'with_front'=> true) CPT-B: 'has_archive'=> 'cpt-...
Aqsa J.'s user avatar
  • 271
-1 votes
1 answer
28 views

How do I create a custom search function to only show contact information if they search for an exact unique identifier?

I’m hosting a conference in the future and will be collecting several hundred attendee’s names and email addresses when they register on my site. To help with networking and connecting them after the ...
Patmahoney123's user avatar
1 vote
0 answers
20 views

How to change default taxonomy for CPT only (not posts)

I am trying to change the labels of the default category and tags taxonomies for a CPT only. When trying with the code pasted below it works, but it also changes the labels for the default post type. ...
stemon's user avatar
  • 155
0 votes
1 answer
63 views

SOLVED: Shortcode to display Divi project filtered by tag in WP Query loop

I'm creating a template for a custom post type & I'm trying to add a WP Query loop displaying specific Divi projects filtered by tag. I'm inserting the loop using a shortcode, & I've ...
megseoh's user avatar
  • 21
0 votes
1 answer
148 views

Appointment booking system in WordPress

I have to make an appointment booking system with WordPress, I have a custom post type "appointments" with various various custom fields like : Name, email, date, time, office, service... ...
LesCa's user avatar
  • 21
0 votes
1 answer
24 views

Custom Post Types Do Not work on this permalink setting https://somedominaname.com/%category%/%postname%/

If in Permalink settings I use this structure then on default post type this gets applied → https://somedominaname.com/%category%/%postname%/ But on Custom Post Types it is not applied effectively and ...
WordCent's user avatar
  • 1,827
0 votes
0 answers
28 views

Taxonomy with wp pagenavi not working

Trying to create a tag archive page for a custom post type, the following works and all posts are displayed, but the wp_pagenavi function is not working at the end: <?php $args = array( '...
mwgideon's user avatar
0 votes
0 answers
19 views

Wordpress custom post type listing not showing the correct number of items & pagination

I'm using Custom Post Type UI plugin by WebDevStudios to create custom post type. However, in the admin view custom post type listing, its not showing the correct number of items & also not ...
AdamR's user avatar
  • 1
0 votes
1 answer
57 views

How do I get an intermediary page between 2 custom post types?

EDIT: I am going to simplify this whole question. If I have domain.com/something/{$variable} how do I retrieve that $variable to use in a query within my template. This is really the extent of the ...
Jon C's user avatar
  • 73
0 votes
1 answer
197 views

How to automatically update ACF field value every year?

I'm using ACF in my custom post type and I have 2 numeric fields: one for Birth year and another for Age. I want to update the age field automatically based on the birth year field value. I found out ...
Adriana Leites's user avatar
0 votes
0 answers
25 views

REST API error - Illegal string offset 'context' in class-wp-rest-request.php while reading response header from upstream

This error appears when using the API REST doing a POST call to publish a new post (it's a custom post type). The thing is that a draft post is created at the same time. Illegal string offset context ...
Anfuca's user avatar
  • 181
-1 votes
1 answer
24 views

Where can I find the missing page sections in wordpress?

This is not coding question. This question is related to Word Press I am new to Word Press. I am now trying to edit an old word press website from my company and i am struggling to find a solution ...
Khant Min Si Thu's user avatar
0 votes
1 answer
76 views

How to check if a custom post type uses a custom template?

I have created this custom post type called books, and I already know I can select it with the condition tag is_singular( 'books' );. But, is there a way to select with its custom template name, I ...
PhpDoe's user avatar
  • 197
0 votes
0 answers
80 views

Elementor form data to ACF

I've developed a webpage incorporating the Elementor Pro form widget to enable users to submit a listing on my website. enter link description here I have utilized the ACF plugin to create all the ...
Faris Jamil's user avatar
0 votes
1 answer
63 views

get_posts() function does not honor correct post type

I'm fetching all posts of a specific custom post type like below. print_r(ANCR_POST_TYPE); $announcements = array(); $announcement_posts = get_posts(array( 'post_type' => ANCR_POST_TYPE, // ...
Aakash Chakravarthy's user avatar
1 vote
0 answers
19 views

Introducing sub categories into the URL

I have inherited a pretty dated project, and it contains a lot of legacy code, which I am still fumbling around in. Currently I have a custom post type with the URL: /something/faqs/{topic}/{faq-post},...
ChrisBratherton's user avatar
0 votes
1 answer
23 views

Using a custom widget to add data from a custom post type into the sidebar

A while ago I found a theme called “Games Zone”, by Themefuse, that used a custom widget to add information from a custom post type into the sidebar of a post. I spent some time tearing down the code ...
bstphillips's user avatar
1 vote
0 answers
21 views

Admin custom post ordering

I'm trying to order custom posts in admin page using an acf date/time value, I've found a useful resource on wpmunchies.com I've made some changes, so my code is the following: function ...
Enrico's user avatar
  • 11
0 votes
1 answer
29 views

How to add capability to author role to assign custom taxonomy terms to a custom post type?

my question title says it all. I am not sure if I should approach this by adding a capability to the author role or adding a capabilities array when I register the custom post type or even when I ...
Kropotkin's user avatar
  • 169
0 votes
1 answer
33 views

Custom Post Type Taxonomy Select dropdown list

I've created a select dropdown list of terms from a CPT taxonomy. This works fine. Here is my code <label for="films">Films</label> <select name="films" id="...
alexkodr's user avatar
  • 101
0 votes
2 answers
69 views

create custom post type and populate custom fields using php

I am trying to programatically create posts of a certain custom-post-type. Within the custom post type i've enabled 'show in rest api' and set a slug. Within ACF i've setup a group that contains ...
RkdL's user avatar
  • 1
0 votes
1 answer
83 views

Post term block variations not generated for custom taxonomies

Since Gutenberg 13.3 (and WP 6.1), a post term block variation is generated for each custom taxonomy registered. For example, if you register a “Product category” taxonomy, you should able to add a “...
leemon's user avatar
  • 1,806
0 votes
1 answer
46 views

Want to add custom post type for facebook feed

I have Facebook api for feeds. I want to add multiple user's Facebook feeds on their page. So, how can I add custom post type for Facebook feeds, which users can login to their account to get feeds ...
Devil mind's user avatar
1 vote
1 answer
57 views

How to set up a private custom post type that is accessible in the administrative dashboard?

I'm not entirely sure of the best way to approach the requirement so I'm hoping someone who has more experience with it will be able to share some gems. I've set up a custom post type with the ...
Motivated's user avatar
  • 205