custom post types – Is it possible to have dedicated page for parent/child taxonomy?

I’ve been working non-stop on this for the past few days. I have a post type, floorplan, which has a hierarchical taxonomy called County. Each County taxonomy has child taxonomies with the names of communities within each county, which I’ve been able to apply to the post permalinks by following This Guide. So my post urls are now floorplans/{parent-county}/{child-county}/{the-floorplan}

Now, I have a custom county-taxonomy.php template that displays all posts of this type that have the county taxonomy assigned. The url is floorplans/{parent-county} where parent county is the parent taxonomy. This template will also display if you navigate to the url floorplans/{child-county} where child-county is the child taxonomy.

HOWEVER, if I try to navigate to floorplans/{parent-county}/{child-county}, I get a 404.

So my basic question, is it possible to modify the permalink of the taxonomy page such that it includes both parent and child?

Change taxonomy term of node through comments

I have a node with status. Status is a taxonomy with states – open and closed. I need to change the status of this node to “CLOSED” using the drop-down menu and submit on the comment.

How do I change the taxonomy using comments?

Side Note: I created this node using content types.

Change Node Status

Possible to remove taxonomy from permalink if uncategorized?

I’m working on a client’s website who requested that the custom search functionality I’m building out provide a number of ‘pretty’ permalinks that they can use for ad campaigns.

The post types I’m working with are community, floorplan, and ready-made homes, and they want to be able to have direct links to search results by county and community.

To achieve this, I set up taxonomies that would create nicely formatted URLS such as {county}/{community}, {county}/{community}/{floorplan} {county}/{community}/{ready-made}.

This is all working fine, however it leads to some issues. For example, If you do not specify a county in your search, you will get links like uncategorized/{community} returned in the results.

Is there any way that you can remove uncategorized taxonomy from the URL, but leave the taxonomy in if it exists?

I’ve figured out how to update the URLs in the search results, however they will lead to 404s if left completely empty because they technically don’t exist if you remove the taxonomy from the url. Ideally, I would want them to just redirect to communities/{community} for example, instead of communities/uncategorized/{community}

sharepoint online – Setting “Allow Fill-In” on taxonomy fields with PnP

Stack Exchange Network

Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

8 – How to filter Search API index view by taxonomy parent

I just figured this out the answer was simpler than I thought.

I was trying to use contextual filters & relationships like other answers said but what worked was just simply adding the Taxonomy Field to Filter Criteria then selecting the desired parent. That’s it. No need to add a relationship to it.

There is still a problem: it doesn’t work when using a grouped exposed filter it gives this error:

A value is required if the label for this item is defined.

Log Message:

PHP – Warning: trim() expects parameter 1 to be string, array given in …

I tried changing the filter to Combined field filter with the Taxonomy as a field so the input would be string but I still get another error.

PHP – Error: Call to undefined method …

8 – Different custom view per taxonomy

I’m currently working on my first Drupal 8 project and while many things are now integrated in the core, others still stump me (for example restoring options to now bare bones CKEditor requires like 4 additional modules). As I relied on Taxonomy Display module to display different taxonomies with different views and this module is not ported to D8 while similar module TVI is still in beta, I am left wondering what’s the current standard of handling this use case. I could use template_preprocess_views_view to programatically switch displays depending on vid. Some suggested you can just use contextual filters to do the same, but I don’t see how could you switch between different displays using contextual filters. To me it seems that multiple views would run at once, but some would return empty result sets, spamming database with duplicated queries. Is there really no cleaner way to do it?

Display taxonomy parent in node.html/twig

I would like to print a taxonomy parent of my taxonomy term in my node.html.twig.
Thank you for your help !!

8 – View listing related nodes by taxonomy term

Many of the Drupal features seem magical, but sometimes there are more steps to configure to make them work.

How to use Views Preview with Contextual filters

Contextual filters are strictly linked to individual Fields. It isn’t enough to use only the NID Contextual filter (in your Preview) that would then be able to “pull” all the other information, no matter if you have the other Contextual filters set up.

What you enter into the Preview field is what Drupal would take from the URL, or the specified default value as if the URL value is available.

If you have two Contextual filters, you need to enter two filter values into the Preview, one for each filter, in the correct order, separated by /.

To test the complete situation you enter a value for both Contextual filters, for example thriller/35 or 21/35 if Thriller has TID 21 and your first Contextual filter is for term ID and not term name, and 35 is the “current node” NID.

Most Contextual filters have the Exception value set to all. This is a sort of a bypass, the Contextual filter behaves as if it weren’t there.

So if you have two Contextual filters and you enter all/all you will see the Views results as if there are no Contextual filters at all.

This is useful when you have to test a Contextual filter while making sure the other one isn’t in the way. So you enter all/35 to see all nodes but not the current one (if the current one has NID 35). Or you enter thriller/all so see nodes tagged Thriller but the current one is still on the list.

The Views Preview field (arguments) can test only the part of the Contextual filter that has Provide default value or When the filter value IS available or a default is provided options.

Preview does help to test and configure Contextual filters more quickly, but it doesn’t gurantee that you have set them up correctly for cases that don’t take values from the URL, so you have to test the Block on the appropriate location anyway.

How to create pagination for custom taxonomy in WordPress

my code it’s this, and i can’t create the pagination for that, its working good the pages 1, 2, 3 and etc.. but its just that the pagination links are not showing in the template.

I created a template for show all the custom taxonomies with the pictures and etc.. its just that not appear’s the numbers of pagination but its working the pages writing manual.

my code its this.

'hide_empty' => false,
'orderby' => 'count',
'order' => 'DESC',
'posts_per_page' => 5,
'number' => 5,

// Check if any term exists
if ( ! empty( $terms ) && is_array( $terms ) ) {
// Run a loop and print them all
foreach ( $terms as $term ) { ?>

  <div class="item">
    <div class="pornstars-box-stars">
                  <div class="video-pornstar">
                    <a class="estrella-enlace" href="<?php echo bloginfo( 'url' ); ?>?girls=<?php echo $term->slug; ?>" title="<?php echo $term->name; ?>">

term_id, 'girls-image-profile', true );
$cat_image = wp_get_attachment_image( $image_id, 'video-thumb' );
if ( $cat_image ){
echo $cat_image;
$thumb_url = '';
if ( has_post_thumbnail() ) {
$thumb_url = get_the_post_thumbnail_url( get_the_id(), 'video-thumb' );
} elseif ( '' !== get_post_meta( get_the_ID(), 'thumb', true ) ) {
$thumb_url = get_post_meta( get_the_ID(), 'thumb', true );
if ( empty( $thumb_url ) ) {
$thumb_url = get_stylesheet_directory_uri() . '/img/no-thumb.png';
echo '';

                  <span class="titulo-estrella"><?php echo $term->name; ?></span>
                      <div class="estrella-contador">
                        <?php echo intval( $term->count ) ?> videos


} ?>

    <div class="pagination-box">
     <?php pagination('«', '»'); ?>