Part of custom taxonomies show the rest don't(WP) - php

I made custom taxonomies on wordpress and only the first 3 work and the last one for some reason. I have no idea why this is so, I copied the first one that worked and pasted it about 8 times changing all the names/singular names and slugs.
My code:
http://pastebin.com/MEfDrU08

Found the solution to it, the taxonomies had names to similair to eachother.

Related

Change CPT taxonomy archive URL structure to /cpt_name/category_name/

The task seems simple at first glance, but I've been searching for the answer for several hours and so far I've been unable to achieve anything.
Where I am now: I have created a custom post type named my-cpt, I have also assigned to it a taxonomy which I have named my-tax. To it I created some taxonomy terms: term-1, term-2 and term-2;
The effect I would like to achieve is a url in the following format. For the taxonomy archives:
https://example.com/my-cpt/term-1
at the moment I have:
https://example.com/my-tax/term-1
Similarly for a single entry. I would like to achieve:
https://example.com/my-cpt/term-1/my-post-title
at the moment I have:
https://example.com/my-cpt/my-post-title
I've tried a few solutions, but mostly end up with a 404 error. do any of you guys maybe know how to solve this?

Need to manual update custom post after wp-all-import run

I everyone first of all sorry for my English, not a native speaker here.
I have a problem that is probably WordPress related and not Wp-All-import fault, but this is giving me headache.
I have a custom post (Properties) which has some custom fields, one of it is a true/false checkbox to set the property as featured.
Everything is working fine, the value get updated and is actually visible in the backend, so properties that need to be set as "featured" are actually ok.
The problem is that the posts are not showing on frontend, unless I manually update them, doing so will fix the problem and show the posts correctly.
The website is kind of a mess, we took it over because the client was unhappy with his previous service, and many template files have been changed or commented not following best practice...
I had a similar problem once (well... not really) , where adding terms for a taxonomy (while creating the post or just from the classic taxonomy page) will lead to an infinite loading, that was because of too many blanks space in the functions.php, but this is not the case.
I just don't get what it could be, if manual update is working is it a wp-all-import related problem? But the import is fine, I mean the checkbox is actually set to true....but the posts are not showing unless I manually update them.
Thank you in advance
I would like to add that exact same problem started to happen on one of our sites recently. It all worked fine for better part of two years but since two weeks ago, I have to manually update posts after import to see the changes on frontend.
Edit: I think this might be an issue with Search & Filter Pro cache

Changing Custom Post Type Slug with Taxonomy

After reading countless answers on various websites including Stack Overflow and trying different solutions, I think I am losing the will to live because I cannot seem to find a solution to my problem that works - even though many people seem to have solved it one way or the other.
I have the following Custom Post Types on my WordPress website:
CPT: cpt_business
Slug: cpt-slug
Slug Rewrite: mycptbase
with_front = false
and I have the following Taxonomy:
Taxonomy: tax_business
Slug: tax-slug
Slug Rewrite: mytaxonomybase
hierarchical = true
with_front = false
When I create a custom post titled Business Name in cpt_business Custom Post Type, the post has the following URL structure:
https://example.com/mycptbase/business-name/
I want the post to have the following URL structure:
https://example.com/mytaxonomybase/mytaxonomy-1/mytaxonomy-2/business-name/
In other words, I want my custom post type have the taxonomy's URL structure. The tax_business taxonomy is hierarchical, and can have up to 10 items - in which case, only the lowest item in the category tree is selected when creating the post.
I tried many, many different code samples. The closest to a solution I got was with the Custom Post Type Permalinks plug-in, however that insisted on keeping mycptbase in the permalinks - meaning my final URL ended up being /mycptbase/mytaxonomy-1/mytaxonomy-2/business-name/.
The second closest I got to a solution was the method described here, but with this one, it simply ignored the hierarchy in my taxonomy and only included the single taxonomy item selected.
I would genuinely appreciate if you can help me or point me in the right direction. Please note I am a total newbie when it comes to PHP and have a basic understanding of its role in WordPress.
It would be awesome if I can fix this problem by adding / amending a code in the functions.php file. I will give you a corona-free virtual hug if you can help me out.
Thanks a million in advance.

PHP & WordPress - Get posts by filtering by Categories AND custom Taxonomy

I'm new to Wordpress and I've managed to build most of a full custom theme for wordpress on my own.
But the tricky stuff is starting to show its tail, and I've spent the last days stuck on Taxonomies. I just managed to put a code for registering a custom Taxonomy to sort my articles by level of difficulty.
Now I need to work on a taxonomy.php (maybe I'm wrong here) page template where it will display articles by their Category (ex : "Design") AND the difficulty (ex : "Advanced") the reader will choose.
Frankly, staying on this and searching all the web, trying things and failing, plus me not being that good has somewhat burnt my brain, and I have no clue about how to do it!
(well no, I guess it has something to do with the post query loop and the taxonomy term and the category term being in the link to the page (maybe i'm wrong here too, probably !)

wordpress, opening custom post shows empty taxonomy

When I edit my post, no data is added to the taxonomy field (img 1) - although i know that i have chosen a taxonomy for it (img 2). So when i update the post, any previously entered taxonomies are dropped (added taxonomies still update the post, but wont show after update, repeating the mentioned behaviour).
Anyone have the slightest hunch to what would cause the data not to be entered?
I trailed the issue back to a few loops that i use in my edit, apparently there's issues with looping inside loops in posts. I found this https://core.trac.wordpress.org/ticket/18408 4 year old unresolved ticket explaining the behaviour. I resolved it by totally circumventing all that is WP loops and straight up querying what i need instead.

Categories