Questions tagged [custom-post-types]

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

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

i cant see the max_num_pages of a custom wp query

i hope you help me with this, i am making a wordpress website witch has 3 diffrent post types(the regular post type and 2 others), i have the pagenation work very with in the regular posts page, but ...
1
vote
2answers
16 views

Limit the Title Length on Custom Post Type Archive Page to a Set Number of Characters

I have a custom post type 'news' and would like to limit the title character length to 42 characters on the custom post type archive page for 'news' The following code is how the title is displayed ...
0
votes
0answers
14 views

Adding empty cells in a table with posts

I'm trying to create a plugin, and want to show up a table, in which WP posts would be shown. I can do it with the following code: echo '<table class="custom_type_table">'; $custom_type_args = ...
0
votes
0answers
6 views

New Post Link Defaults to Standard Post, not Custom Post Type

I have a 'news' custom post type, but when I click the '+ New' link (image attached) in the backend it generates a new generic post, not a custom post type. How do I get the '+ New' link to relate ...
-1
votes
0answers
15 views

How to create custom blocks associated with a post?

I am trying to create blocks in posts such that I can reference the block in navigation menus, emails, etc, but do it in a way that does not require custom posts or taxonomies. I am new to wordpress ...
0
votes
1answer
13 views

Should Custom post types and fields be in the theme files or in a custom plugin packed into the theme?

I am trying to create a Custom Premium WordPress theme for a Travel Agency. I am thinking of finishing the theme and submitting it for review. I want this theme to be really useful so I ended up ...
0
votes
1answer
11 views

Restrict user to only one custom post type

I am new to wordpress, i create a custom post type called news and i need to restrict access to one user, to only this custom post type. I am using wordpress 5.3, i do install the advanced custom ...
0
votes
0answers
20 views

custom post type single page not found after aotumatic publish By the author's robot

I use a plugin that has a custom post type and when I publish a post it is displayed on a single page but when the post is automatically published using a author's robot plugin, unfortunately the ...
0
votes
0answers
13 views

Custom Search Type - Searching

I am trying to search through my custom post types. I am using this code which using debug, I know is being fired. function search_post_type($wp_query) { if (is_search()) { $wp_query->...
0
votes
1answer
16 views

What is Wordpress Way to Add Content Blocks to Post and Reference them as Many to One Relationship?

I am using a plugin that uses custom post content types. I think what I am trying to do is a gerneral Wordpress workflow question versus plugin specific. That said the plugin in LearnDash. So, I have ...
0
votes
0answers
14 views

How to do a searchable database of links?

not sure how to go about something. There is a WP website I'm involved into, it's a scholarly database of thousands of links and for now those links are divided in couple of pdf docs which is not the ...
0
votes
1answer
22 views

ACF for custom post type archive pages: which hook to use?

I'm trying to register ACF options pages for each custom post type defined in the theme: $post_types = get_post_types( array( 'public' => true, '_builtin' => false ), ...
0
votes
0answers
13 views

SEARCH QUERIES - REVERSE OUTPUT

When I perform a search on the WP admin side for my custom post query I am returned with the most relevant queries first. Great However, performing the same search on the front end of the site and I ...
0
votes
0answers
10 views

Is it possible to trigger Zapier hook on a post update and pass ACF fields?

I got myself into a bit of a pickle with a website and I would love some help. I am attempting to trigger a Zapier hook when a custom post type is updated, and send any ACF fields with it. Is this ...
0
votes
1answer
6 views

WordPress retrieving $post based on random key in $_POST

I have a WordPress page /floorplans/ that is submitting a form with the attributes method="post" and action="/contact/" to the '/contact/' page. Before I do anything else on the contact page, I am ...
0
votes
2answers
12 views

How To Post WordPress Custom Post Types to Twitter via IFTTT

I have my wordpress site. Which has the normal "post" and a custom post type "download", I Currently use IFTTT, (If This Then That Service) to post my wordpress posts to Twitter. The IFTTT recipe ...
0
votes
1answer
11 views

Custom Page Template - Widgets of wrong sidebar

I have created a blog page and added some widgets to it. So far so good... Than I created a custom page by putting a file with /** * Template Name: Shop **/ <?php /** * Template Name: TWArms ...
0
votes
0answers
19 views

using search filter ajax for custom field type post

I created some custom post type [by code not plugin] and I want to use search filter ajax for these post types. here are my custom post types : <?php function add_custom_meta_box() { ...
0
votes
1answer
17 views

Adding Custom Post Type Content to Elementor Custom Widget

I created a new Elementor Widget using the documentation provided here: https://developers.elementor.com/creating-a-new-widget/ The widget works fine from the demo for static content. But what I'd ...
0
votes
0answers
11 views

permalinks to show taxonomy and the post type

I have a custom taxonomy which has about 3 levels, parent, child, grandchild which is visible in the URL when you drill down eg: example.com/my-cagegory/parent/child/grandchild/ And then after ...
0
votes
0answers
21 views

How to save fields with elementor into Custom Post Type created by me?

Im working on a project where Elementor('no-code-feelings') is a pre-requisite. So, what im facing: 1st) i've Created post type named lp_item with 2 custom fields: lp_item_a and lp_item_b; 2nd) i've ...
0
votes
0answers
21 views

Custom post type + category archive page

I have default post type "post" and created custom post type "restaurants". I have categories (not taxonomy): cat1 and cat2. I want to work with same categories on both post types and I don't want to ...
0
votes
1answer
23 views

Why can't I filter my CPT shortcode by category?

I've created my own Custom Post Type called 'products'. I have also registered by own custom taxonomies for the CPT - a custom category type (so it is separate from the default wp posts) and also its ...
0
votes
0answers
14 views

Using date stored as custom field to order posts

I have a custom post type "travel" and a custom field "data" (date format j F) and I would like to see all the posts in order by the custom field "data". I think I have to transform it into timestamp ...
0
votes
0answers
17 views

get_field from related custom post type

I hope I'm able to ask this properly. I have a relationship between two custom post types using a postobject relational field. The first CPT is "amenities" which stores the amenities that a user can ...
0
votes
1answer
17 views

Custom metabox with image gallery upload that won't attach images to post

I have created a custom metabox with an image uploader that will upload multiple images into a gallery that I can then query. It all works accept for the fact that the images don't show as attached to ...
0
votes
0answers
12 views

Post Order with Multiple Queries (ACF)

I created a CPT for "Locations" and I am using the ACF relationship field to pull corresponding staff from my "People" CPT onto each individual location page. Right now, I have them sorting ...
0
votes
0answers
25 views

Pass post ID to wp_update_post

Need your help. I have created a custom post type and have a list table of the latest 10 posts. I need to change the post status of those post which I check a checkbox. However, I can not figure out ...
0
votes
1answer
21 views

order custom post type posts by custom date

Trying to order posts by a custom field, where a date i stored. The date looks like this "03.10.2019". All of the below function works properly, but the posts are sorted by post date, not custom field ...
0
votes
0answers
11 views

Modify Custom Post Type Menu

I have created a custom post type called gallery, which supports a title and a thumbnail. My question is how can I modify the menu of my custom post type? Specifically, I want to include a preview of ...
0
votes
1answer
14 views

Modify Publish Metabox location on CPT

I've been struggling with how to do this properly and have yet to find a solution. I have a CPT with ACF fields. I can't use a front-end form because I'm synchronizing the CPT across several ...
0
votes
0answers
9 views

Indicate error on saving a custom post type which required fields

I have a custom post type film review. I use metaboxes on the admin screen (see screenshot). Some of the fields are required (marked *). I want to add the following functionality: If the user didn'...
0
votes
1answer
32 views

How can I check the rewrite slug of current post type listing page

Supposed I have these urls: http://my-domain.tld/projects-listing-cpt and http://my-domain.tld/musics-listing-cpt. The custom post types was setted this way: Projects: Text Domain: projets $args = [...
0
votes
1answer
37 views

Custom Post Type Category URL

I've created a simple CPT named shop which contains some shop items. After that I've added category support to it which works fine ('taxonomies' => array( 'category' )). Then I created template-...
0
votes
2answers
39 views

Want a custom query with just one category but from all custom post types

I have a template created where I want to call up all post types, but display only those from a common category. The results I'm getting are all normal blog posts and some from one of the custom post ...
0
votes
1answer
18 views

Pagination hitting 404 page on /page/4

This is a bit of a headscratcher. So, I am using the WP Download Manager Pro plugin that creates a custom post type wpdmpro. I have pages for each category, and using the loop, I loop through each ...
0
votes
0answers
16 views

custom post type WYSIWG removes paragraphs when displayed

I have a WordPress 5.2.3 instance that is multilingual with the help of the qtranslate-x plugin. I created a custom post type with a translatable WYSIWG field. The visual WYSIWG editor generally works,...
0
votes
0answers
10 views

If a file input filed is empty set a variable in update_post_meta

I am running this code on the front end to update a post. the post needs be updated multiple times and can be a image or file. ... $call_21 = get_post_meta($call_id, '_call_21', true); ... ...
0
votes
1answer
17 views

Convert comma separated list to serialized array to import as post meta

I have a very site WordPress site that was custom built with custom tables for a membership system. I'm updating the site and trying to figure out how to re-upload the new fields as serialized data. ...
0
votes
0answers
28 views

Foreach result into WP_query

I know it may sound very strange as a question, but I would like to know if it is possible to insert the result of a foreach in WP_query How: I would like to avoid doing the maintenance manually ...
-2
votes
1answer
24 views

Create a Wordpress Database query to find users who purchased specific product through WooCommerce [closed]

I am working with a company that provides online content in the form of semesters you pay to access. The semester is set up like a product that you purchase through WooCommerce. We've been applying a ...
0
votes
1answer
13 views

Possible for Category Base and Custom post Type to share the same slug/permalink?

Rebuilding an author/writer website in WordPress. I have a custom post type of books. Working OK. I'd also like my category base to be books. Not working as yet. So a book URL would be like: https:...
0
votes
1answer
21 views

WordPress CPT custom custom label

I want to edit the html output of the CPT page. Searched a lot but didn't find a solution ... May be I'm searching it wrong or it not might have done by anyone yet. In the screenshot above one can ...
1
vote
1answer
12 views

Stuck in Order by more then one

I want to orderby post by 2 custom fields and alphabetical here is my code 'meta_query' => array( array( 'relation' => 'AND', 'awards' => array( 'key' ...
0
votes
1answer
17 views

Custom Meta Box returns no HTML

I'm trying to write my first plugin and running into an issue with the callback in add_meta_box(). The meta box appears on the custom post type page however there is no content inside. Here is the ...
0
votes
0answers
16 views

Accessing download link from the loop with WP Download Manager Pro

I'm new to Wordpress, so apologies if this is a silly question. I am using the WP Download Manager Pro plugin to upload PDF's to wpdmpro post types. A user has to enter an email address in order to ...
0
votes
1answer
17 views

How to sort post category using its Description

I Am trying to sort my custom post categories according to its description. I tried below args but it did not work $taxonomies = array( 'post_tag', 'product-type', ); // Add the slugs of ...
0
votes
2answers
22 views

ACF field key/value to show on taxonomy list

The title might not be 100% spot on, but let me illustrate what I mean: I have a custom taxonomy (doens't matter if taxonomy of post-type), and ACF fields registered on the taxonomy. It all works ...
0
votes
1answer
11 views

Static blog / posts page issue

In need of some help! I have changed my homepage to static, and my posts page to blogs, but whenever I do this I get an error of 'The site is experiencing technical difficulties' on the blog page. ...
0
votes
1answer
19 views

Enable Custom Fields For Custom Post Type When CPT Created Using Plugin

My CPT is created using a plugin so i cannot edit the supports parameter to add support for custom fields. I tried using this code however it doesn't work either add_action('init', '...