Articles of categories

Custom Post Type Category Link

I have a loop of posts for a custom post type I built. How can i call the link of the category/taxonomy for each post? Thanks

Custom WP_Query for current category (in category.php)?

I’m using a small code to display a tag list for the current categories like below: <?php $custom_query = new WP_Query(‘posts_per_page=-1&category_name=overnachten’); if ($custom_query->have_posts()) : while ($custom_query->have_posts()) : $custom_query->the_post(); $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { $all_tags[] = $tag->term_id; } } endwhile; endif; $tags_arr = array_unique($all_tags); $tags_str = implode(“,”, $tags_arr); $args = array( […]

Is there an easy way to get a list of Category IDs?

I’m working with a couple of plugins that ask for a list of category IDs to include/exclude. When I go to the categories section and select “Edit” I don’t see an ID field listed on the page, though I see all the other details. Since I will be relaying this information onto other users, how […]

How can I change the tooltip in the_category?

My use of the_category works fine, but I want to change the tooltip, which says “View all posts in (category name)”. How can I change this tooltip? I guess this might be something similar to this. Thank you

Category.php loads first before page.php?

I’ve got a problem with the following: I made a category called app-functions, when viewing my domain.com/app-functions/ it opens up the category-app-functions.php instead of page-app-functions.php. Does anyone know why this happens? Also.. with the view of SEO, page.php is more important then category.php.. right?

Targeting Parent Category Pages

I wish to create different template pages for all Parent Categories and Subcategories. I was hoping to do it using the hierarchy (eg. something like category-parent.php and category-sub.php), but looking at the flow diagram I found, I don’t think there’s an option: I could manually add a category-$slug.php for the parent categories (as these shouldn’t […]

Single.php – Get Current Parent Category

The Problem I’m trying to display the current parent category title with the post title right under it. The problem is, I can’t seem to get the posts current category inside or outside of the loop. I can get a list of parent categories. For instance, if I have a post in 3 different categories, […]

WP the_posts() on single-cars.php get category link

I have a custom post type called cars. There is a taxonomy brands. I have a template single-cars.php and I’d like to add a link to the brand page(The category). Assume I’m on the page of the post Passat 2013. The brand is Volkswagen. I’d like to show the permalink of the brand Volkswagen. My […]

Where and when does WordPress invoke routes

One of my URLs for which I’m wanting to create a Category Archive is coming up with a 404 despite having matching routes and, supposedly, matching templates. I’m going through the core WordPress code (groan) and haven’t figured out where routes are invoked. It seems that the Categories are decided in query.php in the parse_query […]

Exclude current post from loop

I have a custom post type for accessories. When you view the post it also shows related posts. It looks great, but it also shows the current post within related posts. Is there a way to exclude the current post from the loop? <div> <?php $category = get_the_category(); $model = $category[1]->cat_name; $accessory = array(‘numberposts’ => […]