Display related posts with same category or same tag return blank
Display related posts with same category or same tag return blank
Display related posts with same category or same tag return blank
Category and tags goes 404
I’m not sure why you are only getting 1 post returned. Your query args look correct, even if as I mentioned in the comment you should be using WP_Query. Therefore, if I had to guess, I would say your looped html markup is off? And is maybe not printing the results correctly. I’ve modified your … Read more
Do not use query_posts, and also do not replace the main query with a custom query. This causes more issues than solving the one issue you had before with the main query. I’ve done a complete post on these issues recently that you can check out here According to your query, the only two things … Read more
how to Specifies an author / editor to edit one category only?
Atlast done it fully $categories = get_the_category($post->ID); foreach($categories as $category) : $children = get_categories( array (‘parent’ => $category->term_id )); $category_link = get_category_link($children); $has_children = count($children); if ( $has_children == 0 ) { $name=$category->name; $category_link = get_category_link($category); echo “<a href=”https://wordpress.stackexchange.com/questions/161873/$category_link”>$name</a>”; } endforeach;
Slugs should be unique for each content type as they are a unique identifier of the content on the url side. To overcome this limitation you can simply create two costume taxonomies one for wheels and one for brakes and have a mercedes in both of them.
From your comments, you opted for a custom page template. Based on that, you can simply perform a custom query to retrieve posts that belongs to a certain tag and category I tend to make use of a tax_query using WP_Query when you quering posts from more than one taxonomy. It is more flexible, specially … Read more
One quick way of doing it without having to set up multiple loops would be to use the get_posts() function and grab all pages, then check through them with in_category() and split out pages that are in the category and pages that are not. You can then run through the 2 groups of pages separately … Read more
Is the code used inside of the loop? The following code should work: if ( class_exists( ‘DPortfolio’ ) ) { echo DPortfolio::instance()->dportfolio_get_category(); }else{ the_category(); //or echo get_the_category(); } If outside of the loop you can try echo get_the_category( $post_id ) to show the categories. Note: As you are getting an error, if you edit the … Read more