Skip to main content

Questions tagged [custom-post-types]

Custom Post Types extend WordPress to support additional content.

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

Custom post type URl Cutomization

I am creating a custom CPT where I have customized CPT URL structure of CPT, I am using the rewrite rule for this but it is conflicting This is a Lessons CPT, and I want to remove lessons from the URL ...
Neelu Singhal's user avatar
0 votes
1 answer
13 views

How to Connect my Users to a custom post type I Labelled Campaign

I’ve created a Custom Post Type Name 'Campaigns' and now, I would like the users of my site (only registered ones) to indicate their interest in promoting the campaign by just clicking the promote on ...
Joshua Ehimare's user avatar
1 vote
1 answer
101 views

Query multiple post types - Order by type and post title title

I have three custom post types which I need to retrieve posts for within one wp_query. I am seeking to return the posts in the order of post type, as well as by post title. Within the question ...
Allen Tullett's user avatar
0 votes
1 answer
37 views

How to create alias / synonym links to existing posts

I have a directory type website, where each post is a word definition. I want to set up synonyms of these words for audiences from different geographies. For example, let’s say I have a post for “...
Rhecil Codes's user avatar
0 votes
0 answers
57 views

ACF Pro simple Business Directory - Requesting assistance with created Templates and associated Functions.php Coding

I want to replicate the basic Business Directory functionality found at this URL. We've not had any luck with off-the-shelf software and our needs are very basic. https://onetopanga.com/directory This ...
Micah K's user avatar
  • 15
0 votes
1 answer
29 views

WordPress User Role Permissions For Custom Post Type

I'm trying to do some work on a custom post type for a specific user role. Basically, if the user is logged in as "Registered For Portal" then I would like that user to only see their own ...
Nick's user avatar
  • 1
0 votes
1 answer
49 views

Query Multiple Post Types and Paginate Newly Created List

I know this has be asked several times but i cant seem to find the answer anywhere. My site has a resources page which is my archive for all resources (archive-resources.php). I'm trying to also ...
user2402492's user avatar
0 votes
1 answer
59 views

Auto Generate Post Title from 2 ACF Taxonomies [closed]

I am looking for a custom function to auto generate a post title/slug for a specific CPT from two taxonomies and one custom field, created with ACF Pro. Auto generation should be done only when the ...
austriadesign's user avatar
0 votes
0 answers
23 views

how do you display content from custom post type 2 on a single for custom post type 1 that has an ACF relationship?

I have an issue that I can't resolve. I'm not a coder and I'm not even an especially logical thinker (thanks dyscalculia) so this is driving me utterly insane. I am using Breakdance builder and ACF on ...
Jack's user avatar
  • 1
0 votes
2 answers
72 views

Right Permalink for Custom Post Type with number slug

I am working on a little Plugin (based on a Custom Post Type called gallery) for a gallery (that reads out a large number of ftp folders). The post type does not have taxonomies but like pages just ...
inspirationally's user avatar
0 votes
0 answers
22 views

Need some suggestions with Relationship fields and CPT/ACF

I am tasked with creating a Student/Teacher Portal where among other things, I need a way to build a way for Admins to assign Teacher with Students based upon Subject and Age group (Age for students). ...
RitZz's user avatar
  • 1
-1 votes
1 answer
53 views

Display the progress of post achievement with percentage against target in wordpress dashboard

I have a cpt called "movie", and I set a target for writers to make 50,000 posts in 6 months. The question is... can I make a percentage of the results of the number of recent posts against ...
Tuagapat Manam's user avatar
0 votes
0 answers
50 views

Search and filter terms of a custom post type only and display results

I am creating an archive-newsroom.php for my /newsroom page and custom post type. I have the custom post type working, but now I am trying to have a search input to display the custom post type ...
Justin's user avatar
  • 101
0 votes
0 answers
62 views

Tickera missing attendees - No attendees found

I transferred a wordpress site to azure (app-service hosted on linux with php 8.2). One of the errors was related to freemius used by tickera. The site was not loading. It was fixed with that plugin. ...
mihkov's user avatar
  • 121
0 votes
0 answers
21 views

Remove slug of multiple custom post types with and without hierarchical

I have two custom post types called toplijst and product. I am trying to achieve the following permalink structure: Toplijst: website.com/toplijst/parent-toplijst/ website.com/toplijst/parent-toplijst/...
sem roijackers's user avatar
0 votes
0 answers
24 views

Get a custom post type's taxonomy type term names displayed as checkboxes and filter

I using this code to get all the taxonomies associated with a custom post type "newsroom" $post_type = 'newsroom'; // Get taxonomies associated with the custom post type $taxonomies = ...
Justin's user avatar
  • 101
0 votes
2 answers
119 views

Show only taxonomy types terms associated with a custom post type in WordPress PHP

I am trying to display only the taxonomy types terms selected on a custom post type "newsroom". The code below shows all taxonomy types terms for every type of post. Is there a way to show ...
Justin's user avatar
  • 101
0 votes
0 answers
43 views

How can I filter records in a custom post type list in the admin based on the ACF field in the post that contains the current user?

I have a custom post type called Projects that includes an ACF field named team_members which uses User as a field type and returns a User Array. I want to filter the post type listing so that the ...
Rizal Kholif's user avatar
0 votes
0 answers
14 views

Add custom text in /post.php?post=503&action=edit

I'd like to know how to add a custom text like "Hello world!" inside the edit post.
winona's user avatar
  • 131
1 vote
0 answers
19 views

edit index custom post type page with elementor or other

i have a custom post type in wordpress like book. i can edit single pages template with add single-book.php file and edit archive pages template with archive-book.php file. i know main page of this ...
milad taghizade's user avatar
0 votes
0 answers
20 views

Pagination Links for Custom post type returns 404 [duplicate]

first of all, I am new to WP development, and PHP. I am developing a template that has several custom post types. the problem is when I add pagination to my custom post type, all pagination links ...
Ehsan Aliverdi's user avatar
1 vote
0 answers
53 views

How do I add a filter to my custom post type archive page?

I used the guide HERE from acf themselves, but for some reason whenever I attempt to query anything at all in the url I get the "There has been a critical error on this website" error. $...
judahking's user avatar
0 votes
0 answers
85 views

Custom Block: Adding "Post Type" dropdown to Sidebar Settings

I'm pretty new to React, so I'm trying to find the simplest and most PHP-based way to achieve my goal. What I've accomplished so far Created custom blocks using the @wordpress/create-block package. ...
beat's user avatar
  • 43
0 votes
1 answer
173 views

Custom post type slug localization

I need to have 2 languages in a website (EN and LT). I have a custom post type 'services'. I need to have the links like this: English version of the service: '/en/services/some-service' Lithuanian (...
LinasK's user avatar
  • 1
-1 votes
1 answer
207 views

Add taxonomy or category slug to custom post types URL

I have created a custom plugin that is similar to Woocommerce but will only manage products that are loaded using the WP REST API in a Vue SPA. I've registered two custom post types, one for products ...
OHICT's user avatar
  • 133
0 votes
1 answer
19 views

WP Query filtering by custom category not showing all relevant posts

Here's a question I've been trying to solve all day: I added a WP Query that would show posts from a category that the admin chooses with a custom field. The post is a custom post type called "...
Jillian Hoenig's user avatar
0 votes
0 answers
11 views

custom post type dynamically shows in menubar in wordpress

I am developing a hospital website in wordpress. For that I make a custom post type "Services". All the hospital services (ex:ICU, CCU, NICU, Emergency etc) are going under this "...
Raff's user avatar
  • 1
0 votes
0 answers
20 views

Wordpress next/previous post link

I need help, please. I'm a newbie on Wordpress. This code is working: $previous_post_url = get_permalink(get_adjacent_post(false, '', false)); $next_post_url = get_permalink(get_adjacent_post(false, ''...
ile's user avatar
  • 1
0 votes
0 answers
37 views

get_posts() return NULL using a custom plugin and add_submenu_page() with Post Type

Inside a custom plugin and using add_submenu_page() for custom post type I want to display one post. As the other post_type I use get_posts($the_id, $arr_params) to get information about it, except in ...
imagIne's user avatar
  • 83
0 votes
0 answers
7 views

Quiz page template, checked attribute missing when option selected

I would like to add a quiz page template to my WordPress site. Part of the template is the code below. The problem is that when any of the inputs is selected, the checked attribute is missing. <div ...
Kostas Stoumpos's user avatar
0 votes
1 answer
36 views

Why does have_posts() return false when in the wordpress admin, but not on the frontend?

Background: I'm new to the Gutenberg block editor and I'm trying to develop a custom block theme. I'm using ACF to create custom blocks. Problem: I'm creating custom blocks with the intention of ...
Danielle's user avatar
0 votes
0 answers
109 views

Include theme header and footer in custom plugin

I am working on a custom plugin. I created a custom post type inside my plugin. Now, for single posts I want to serve a custom template using my custom plugin without touching any theme file. The ...
Farhan Ali's user avatar
0 votes
0 answers
9 views

How can i show multiple post on single post wordpress, just like therichest.com or screenrant.com or hotcars.com.?

How can i Show multiple post with same categories using infinite scroll on a single post page.
Ankush Choudhary's user avatar
0 votes
0 answers
41 views

Cannot create custom post types with a specific name

I am creating custom post types using this code function create_custom_post_type() { register_post_type('courses', array( 'labels' => array( 'name' => __('...
Waleed's user avatar
  • 1
0 votes
2 answers
85 views

Is it possible to create a custom post type with blank page for Post List and Add Post Page only?

I would like to completely reorganize, stylize a custom post type. By default register_post_type() function add Title, editor, category and tags into add custom post from $supports argument. Can I ...
imagIne's user avatar
  • 83
0 votes
0 answers
16 views

Custom templates based custom url structure in wordpress

I'm working on a website that includes a section for Barbers, and I want to achieve the following URL structure: Barbers {domain.com/barbers This page will have 2 section, 1 section will list Barber ...
Tarun's user avatar
  • 1
0 votes
1 answer
50 views

Redirect WordPress page to the latest created post by the logged in author/user

I have a basic WordPress code that redirects someone to the last post type created on the site, in this case is the "case" post type: <?php /* Template Name: Redirect */ $args = ...
Sean Bagheri's user avatar
0 votes
0 answers
81 views

fehler beim laden des blocks: ungültige(r) parameter: attributes - Gutenberg

I'm using the Gutenberg Block "Custom Post Type" It worked well for a long time. Now, as soon as I select it and want to select a blogpost, thats already created, that I wanna display here, ...
Max's user avatar
  • 1
0 votes
0 answers
34 views

REST API callback function is not called

I have a very simple function which used to work perfectly fine. Somehow the callback function is not called anymore: add_action('rest_api_init', 'create_api_posts_meta_field'); function ...
Fewture's user avatar
  • 13
-1 votes
1 answer
117 views

button onclick with get_post_permalink

I developed a custom post type. On my archive page for each post there is a <button>. The problem is that I can't put the link to the post in question. My button is in my loop. <button type=&...
Thica's user avatar
  • 17
0 votes
1 answer
292 views

Can't expose custom field to REST API

As far as I can tell, the following code should make the video custom field of my CPT project available through REST API. Yet the custom field is still not exposed. Why not? add_action('rest_api_init',...
drake035's user avatar
  • 1,167
0 votes
3 answers
306 views

Custom Post Types, Single Posts returning 404 Errors - flushing permalinks does not correct

I have a website that, using ACF Pro, I have created several Custom Post Types (CPTs) for. All using ACF Pro. Of them, 6 of the CPTs are showing fine with the archive and single templates. They are: ...
Mitch S's user avatar
  • 27
1 vote
0 answers
19 views

Keep the expansible tree (list of posts) open in the sidebar

I have created a plugin to diplay a list of posts (cpt) in a tree on the sidebar. It adds an icon [+] when posts have children. However when I click on a post the tree colapses. How can I keep the ...
Artus's user avatar
  • 92
0 votes
0 answers
13 views

How to create download page with countdown in wordpress?

I'm working on a WordPress project and aiming to create a download page similar to "APK Material Download" with a countdown timer before users can access the download link. I've explored ...
Inam Ur Rehman's user avatar
0 votes
1 answer
43 views

Tag template for Custom Post Types

I have setup a Custom Post Type called 'Sports Clubs'. These use tags. I need a page to display a list of posts associated with the various tags. I'm currently doing this for standard posts via the ...
Gareth Roberts's user avatar
0 votes
0 answers
13 views

Normal Posts and Custom Posts with Date Query

I have a custom post type with a date query and these posts only shows on the post archive list when I create a normal non custom post and save this normal post then both the custom post and normal ...
Angel Hess's user avatar
0 votes
1 answer
337 views

getEntityRecords/useEntityRecords: How to use CPT metadata?

I use getEntityRecords as described in the official data API tutorial (https://learn.wordpress.org/lesson/retrieving-wordpress-data-records/). I.e.: const [searchTerm, setSearchTerm] = useState( ''...
gresch's user avatar
  • 111
0 votes
0 answers
17 views

Display posts from Custom Post Type, group by term, arrange term groups and arrange items within groups by menu order

I have a Custom Post Type 'my_cpt' and a custom taxonomy 'types' which has several terms, all of which have posts. I want to do is be able to control both the order of the groups (terms from my custom ...
Tom Latham's user avatar
1 vote
0 answers
466 views

Wordpress Custom Post Type Archive, filter by category and get pagination working

I have created 9 different Custom Post Types via ACF and an assortment of custom field blocks for 8 of them. Those 8 are used to create different content, based on requirements for each post type. The ...
Mitch S's user avatar
  • 27
0 votes
1 answer
29 views

Frontpage overriding my posts

Each time i make a new post I cant see it ok my website when I view it. The front page (which is blank) seems to override my posts. How do I remove it or change the settings
Dineato's user avatar