All Questions
3,593 questions
0
votes
1
answer
13
views
How to keep prev/next nav on posts in same taxonomy
I am using a theme called Avada a fairly well known theme. By default wordpress if you have more than one category for posts and have prev/next nav on for the posts wordpress will run thru all the ...
0
votes
1
answer
12
views
Searching in categories AND custom fields
I need to display results that meet two criteria: both the value in the custom field and the category must match. For example, I would like to display all results whose category is ‘Clothing’, and ...
0
votes
1
answer
28
views
Two related taxonomies. how to filter terms in second taxonomy depending on selected term in first taxonomy on Post edit page?
I have two custom taxonomies on the site - Countries and Cities.
The Country taxonomy contains over 200 terms, and the Cities taxonomy contains over 47,000 terms.
Naturally, editing content with ...
0
votes
1
answer
29
views
Can't retrieve custom post type taxonomy term to custom post type editor
I have 2 main problems:
I can't seem to add editor_name custom field to default/native WordPress list of request URL query parameters.
This is the request WordPress is using:
http://localhost/wp-...
0
votes
1
answer
20
views
How can I get the categories and subcategories separately?
I am using this code to get the categories and subcategories from the reference page. It is quite good because it allows me to sort them hierarchically. But I would like to give them two different ...
0
votes
0
answers
22
views
Put ACF function output code the_terms
I would like to put an ACF field in the of my the_terms function, is this possible?
Because I can't figure out how to put it.
<?php $dev = get_field ('my_field', 'option');?>
<?php ...
1
vote
0
answers
33
views
wp_insert_term is extremely slow
we are using wp_insert_term to add product categories. The problem is, that this command is extremely slow. Does anybody has had a similar experience and found a solution for this? wp_update_term is ...
0
votes
1
answer
41
views
My custom meta box with textarea field not saved
I created a custom meta box for my custom post type with address, phone, and map but only the map field type textarea not saved.
My code here:
// Add meta box
function vn_store_add_meta_box() {
...
0
votes
0
answers
23
views
Inherit values from taxonomy custom field in the post that contain that taxonomy
I have a custom post type called "Jobs" and a custom taxonomy field called "Cities". Within the "Cities" taxonomy, there is a custom text field named "Zip Codes"...
0
votes
1
answer
29
views
How to enforce a requirement for custom taxonomy
I’d like to set a custom taxonomy as required, i.e. authors must select at least one term from the taxonomy in order to save or update a post of a specified set of custom post type. If they haven't ...
1
vote
0
answers
38
views
Having many sub-urls on the same custom taxonomy term
I have custom taxonomies, and each term has many URLs to display content like below:
/custom-taxo/term-1/slug-1
/custom-taxo/term-1/slug-2
/custom-taxo/term-1/slug-3
/custom-taxo/term-2/slug-1
/...
0
votes
0
answers
23
views
Issue with WordPress Automatically Assigning Terms to Multiple Posts
Hello WordPress community,
I'm encountering an issue where WordPress is automatically assigning newly created terms to multiple posts in my installation. When I create a new term (custom taxonomy: ...
1
vote
1
answer
32
views
Showing all posts of the current custom taxonomy on archive page
I have created a custom post (houses) and a custom taxonomy (houses_area). On each houses_area archive page, I want to see all the posts displayed by alphabetical order. I get stuck in calling the ...
1
vote
0
answers
26
views
One custom taxonomy with unique sets of labels for two post types?
I’m trying to use one custom taxonomy with different labels for different post types. I have the default “post” post type, and a “podcast” post type. Both post types have an associated Taxonomy with ...
0
votes
1
answer
16
views
Custom fields empty after refreshing page
I have added some custom fields to the Gutenberg editor, the purpose is getting these custom fields loaded in the custom-post-type.
Thats is all working, I was able to get the custom-fields in the ...
0
votes
0
answers
15
views
WordPress Add/Edit Post right admin sidebar change title
How is it possible to change the "Tags" title on the right admin sidebar "accordion" and in the preferences of the block editor? See screenshots.
I've tried changing $wp_taxonomies[...
0
votes
1
answer
19
views
Filtering according to the locale 'de_DE'
I already have a filter to show on archive pages the terms of the taxonomy "tipologia" according to the locale = 'de_DE'. I need a similar filter to show in german the same taxonomy terms ...
0
votes
0
answers
20
views
custom post type with metabox custom fields
how to make meta custom fields in custom post type name jobs_board_cpt , I am using boilerplate ?
public function jobs_board_cpt() {
$labels = array(
'name' => ...
1
vote
1
answer
46
views
Metabox conditionals depending on post format and template in Gutenberg
In the classic editor, I used jQuery to display metaboxes depending on the current post-format or page template selected. If a user selected a different format or template, they would toggle depending ...
0
votes
1
answer
24
views
Filter on one post type with taxonimy and get other post type
I would like to fetch my posts of type 'news', 'videos', 'webinars', 'whitepapers', 'testimonials', and 'landing-pages' and apply a "filter" to only get the landing-pages type with the ...
0
votes
0
answers
15
views
Show Featured products with custom taxonomy template
I have a custom taxonomy template / archive called taxonomy-brand.php and this loops fine and shows the products that have the same "brand" taxonomy, trouble is I want to have a second loop ...
1
vote
0
answers
22
views
When using get_terms with hide_empty = true, terms that only contain scheduled posts are not returned. How to override this?
My code is simply:
$cats = get_terms(
[
'taxonomy' => 'category',
],
);
Obviously, hide_empty is true by default. There's a category that only contains scheduled posts and it's not ...
0
votes
0
answers
50
views
Passing total post count to javascript
I have a ajax post loading program, I can load more post on click of a button.
Problem im having is getting the button to hide or show less when no more post.
I can query out the post count in PHP as ...
0
votes
1
answer
33
views
How reorder post tags taxonomy in the non-alphabetical custom order and save it in the Block Editor
I see that Wordpress always sorts tags in the Block Editor in the alphabetical order. How can I prevent this behaviour?
I have found a good article with an approach which uses term_order field from ...
0
votes
1
answer
32
views
Taxonomy question how to add more data
Normally taxonomy has a name and a value in the template I'm using it has a name value and what they call category what I'm wondering is what function call in PHP do you use to set that category I ...
0
votes
1
answer
98
views
How to get parent and child sub category (Taxonomy) order to display
Trying to get my list of categories to display the child after the parent.
For Example
Parent Category
Child Category
child category
Parent Category
child category
Current code
<aside ...
0
votes
0
answers
32
views
Change taxonomy key of existing and future taxonomy posts
I registered a taxonomy with a certain key name, initial_name, and now there are hundreds of posts in a custom post type with this taxonomy selected that I don't want to lose the connection with (the ...
0
votes
0
answers
32
views
Taxonomy term archive claims there are no posts, but there are. How to resolve?
I have a custom post type (url), and a custom taxonomy term (url-category) for this post type.
The archive page for this custom post type works fine.
The taxonomy term archive claims there are no ...
0
votes
1
answer
37
views
Second featured image only shows in metabox preview after saving a post in the wordpress editor
I am trying to add a second featured image to the Wordpress post editor, and it seems all be working. When I select and image from the mediauploader the first time the image shows in the preview of ...
0
votes
2
answers
105
views
How to get a custom taxonomy slug in body classes
I've been trying without luck to get a custom taxonomy slug to appear as a class in the body tag of WordPress. Perhaps it has to do with the fact that I'm using a custom taxonomy rather than the build ...
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 = ...
0
votes
2
answers
150
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 ...
-1
votes
1
answer
460
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 ...
0
votes
0
answers
48
views
Cannot set custom taxonomies when creating post
I'm migrating some posts from another source to WordPress, specifically to a theme/plugin called Madara, which has some specific taxonomies. I'm using wp_insert_post() to create the post, everything ...
0
votes
0
answers
30
views
coauthors_plus_edit_authors to display metabox based on author caps
Need to display the coauthorplus metabox with author capabilities.
On the documentation of the plugin they say its only with super admin and editor that the metabox is available.
Any idea to add a ...
0
votes
1
answer
62
views
Loop a Single Taxonomy and Output all Posts Associated (but also show a message for empty ones)
I have a custom post type for Vacancies, with a Taxonomy of Location set up. What I've achieved is looping through all Locations and then showing underneath associated posts.
Update: Thanks to @...
0
votes
1
answer
25
views
Query top level custom post in taxonomy
This is my first post, I'm a bit stuck.
I have a custom post (dan) and taxonomy (dnas), with hierarchical categories.
I want to make a query resulting in posts at toplevel (hoofdcategorie01, ...
0
votes
0
answers
33
views
Bulk 301 redirect for Taxonomies with pagination
I'm looking for the best way to bulk redirect for modified taxonomy URLs.
After category slug has been changed, I need to perform a redirect for all paginated pages:
/category-old/ redirects to /...
0
votes
1
answer
89
views
doesn't save custom meta box data wordpress
My WP doesn't save my meta box data. I see the metabox and the field, but the data doesn't saving. Somebody could help me? Thank you. This is the code:
<?php
// Function to add a metabox
function ...
1
vote
0
answers
78
views
How to Filter the Custom term loop based on dropdown
I had created on Custom Post Type 'resource', which has 4 taxonomies ('type', 'sector', 'industry', 'rtag')
now i had added 45 posts in following manners
Type - Brochure, Infographic, Research Paper, ...
0
votes
1
answer
54
views
Add a Permalink To a Post Title?
I'm remaking a Real Estate website for the company i work for using Wordpress along with houzez theme and elementor, The theme is using posts as properties where you can select all the property ...
0
votes
1
answer
81
views
Only display top level taxonomy on the edit post page with option to expand sub-categories
We have a custom taxonomy that is hierarchical. It has so many sub-categories that to scroll through them in the edit post page is proving problematic for editors.
Is there a way to initially show ...
1
vote
1
answer
196
views
Using add_meta_box on a page with file upload and importing fields
This must be fairly simple :) I'm trying to import data into ACF repeater fields and am mostly following the answer to Add special meta box to custom post type
But what I have below isn't saving the ...
0
votes
1
answer
195
views
Wordpress Product Page Change Label From 'Category' to 'Artist'
I would like to add a php snippet to Change Label From 'Category' to 'Artist' on wordpress product pages (alternatively throughout the whole site)
I see many examples of how to remove the label, but ...
0
votes
0
answers
155
views
ajax select parent show child in another select and show posts in another select-ajax filter search
I'm on wordpress and I created a search filter shortcode which user can select province and show towns on another html select base on province and when user select town, in another html select it must ...
0
votes
1
answer
126
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 ...
1
vote
0
answers
24
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.
...
0
votes
0
answers
134
views
Creating a page that will dynamically get posts from 2 taxonomies
I have 2 taxonomies type and city
I want to have page where it will dynamically query a city and type depending on the link for example:
type/condo/city/toronto should get all my properties from ...
0
votes
1
answer
20
views
Saving custom input from settings sidebar of pages in Wordpress
I created a meta-box with an input field in the settings sidebar of pages. Now I try to save the value, but it does not work. Maybe the problem is, that I try to do this with pages and not with posts. ...
0
votes
1
answer
85
views
How to get parent and child name in taxonomy page
I have new taxonomy "car-brand" and I want to show name of parent taxonomy in child taxonomy page.
My hierarchical taxonomy:
bmw
-series1
--F20
--G40
-series2
--F22
--...