Every Post in WordPress is filed under one or more Categories. Categories allow the classification of your Posts into groups and subgroups, thereby aiding viewers in the navigation and use of your site.

learn more… | top users | synonyms (1)

0
votes
1answer
23 views

show category name before first posts in each category

I want sort posts in the loop by category and before first post in each category display category name. For example: Category 1 Post Post Post Category 2 Post Post Post Post ...
0
votes
1answer
54 views

WP_Query order by date in meta_value

i have a small problem i think. this is my code for my category-releases.php: <?php $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; $args = array( 'posts_per_page' ...
0
votes
1answer
45 views

Style a category from category list

This is my previous question Wrap a chosen category name with div which I made a mistake on the question, however I got the correct answer. But thats not what I needed. Currently, I'm using this code ...
0
votes
1answer
22 views

Code to display category-specific single.php is overriding normal single.php, too

I have two different post type categories on the site I'm building at the moment - "press" and "blog". I used the following code, inserted in my child theme's functions.php file, to get the "press" ...
0
votes
0answers
30 views

Category Page showing all posts

I created a menu for my categories. (Some links have sub menus). I added this to the top of my index.php page <?php wp_nav_menu(array('theme_location' => 'lib-menu', 'container_class' => ...
0
votes
1answer
29 views

What is wrong with my WP_Query Arguments?

In my single.php file I am using a nested WP_Query to show more posts, at the bottom of the page. My code for the query and nested loop are as follows: <?php $ep_args = array( ...
0
votes
1answer
30 views

Wrap a chosen category name with div

I'm trying to wrap a category name in a post with a div. This is how i get the category name I need. Reference Links : get_term_by term_exists My Ideas <?php $term = term_exists('foo', ...
0
votes
1answer
15 views

How to switch from custom post type URL to category URL?

For the past year, I've been using custom post types to distinguish my different post types (duh). Thing is, I'm now realizing that categories are more efficient in offering archived pages for these ...
0
votes
0answers
14 views

Get top parent category

My category structure is as follows: - Top Category ---- Sub Category 1 ------- Sub Sub Category 1.1 ------- Sub Sub Category 1.2 ------- Sub Sub Category 1.3 ---- Sub Category 2 ------- Sub Sub ...
1
vote
0answers
41 views

Display name of the last child category

I have the following product structure: -- Category -- Deep -- Deeper Currently the last child category "deeper" will only be used for labeling products. What I want to do is to echo only the last ...
0
votes
1answer
9 views

Need list of child category post titles sorted by child category

There seem to be a lot of variations of this type of question, but I have not been able to find one that matches my specific situation or that is less than 4 years old. We have WordPress 4.1.1 I ...
0
votes
0answers
11 views

Wordpress Category Template

When I click on a Directlink on Articles of one specific Category, then a title appears, which I want to change. It looks like this: http://www.youscreen.de/ovopopxo84.jpg I want to change ...
1
vote
0answers
59 views

Category control subcategories

After hours of googling and no result I am turing to you. I have a Wordpress site where me and my colleagues publish information to the rest of the company. There are several screens put up on ...
0
votes
0answers
18 views

Is it possible to combine multiple category__in arguments?

I want to produce a query that returns posts which are in one array of categories and also in another array of categories. So, if my two arrays are: $offices = Array ( [0] => 73 [1] => 74 ) ...
0
votes
0answers
12 views

Wordpress URL strings for filtering posts by category

I'm working on quite a large blog based site specifically on creating a category navigation system designed to display posts based on multiple category queries. I'm doing this using URLs such as ...
1
vote
1answer
17 views

Get the number of posts in a named category, outside the loop

I've managed to do this from a single.php file, inside the loop, but now I need to do it from another page. I need to find out how many live posts are in category named every story (slug is ...
0
votes
0answers
9 views

Can I set a permalink that filters by three categories and a tag, and will be recognised for caching?

I run http://www.oldies.org.uk, a charity website for rehoming elderly dogs. It's been running on Wordpress since 2005 and has only recently begun using permalinks instead of the default query string ...
1
vote
2answers
62 views

Exclude category by slug for for each loop

I am trying to exclude some categories from a for-loop. <?php $categories = get_categories(array('exclude' => 'apps, windows')); ?> <?php foreach ($categories as $category) : ?> ...
0
votes
3answers
31 views

get_posts with multiple categories

If I do a get_posts() with category set to 1,2 I will get all posts in category 1 OR 2. If i want all posts whit both categories, that is 1 AND 2, how do I make that request?
0
votes
0answers
34 views

Different post design as per category

My site has two types of categories ( training & hard-reset ). Under each category there is a slight change in the design for posts. repairmymobile.in/hard-reset/datawind-ubislate-7cz-tablet/ ...
0
votes
1answer
23 views

In what context should Categories and Tags be used

I was thinking on writing up a post called "Review: Ni no Kuni" which would be a personal review on the title game having finished it. Under categories i could make a "Reviews" Category to group all ...
2
votes
1answer
84 views

How get posts from a subcategory of a category by name?

I'm trying to create a subcategory template of a defined category. For example, for each one, I would like to check if his subcategory Photos exists and to get posts of this. Here is my category ...
0
votes
0answers
27 views

Make related posts display first in search result

I'm looking for a solution that makes wordpress website's search result even better. Question: By default, the search result will return all the not really related posts at first, as long as the post ...
0
votes
1answer
29 views

Adding a page summary to a specific page

I know that a list of posts is generated automatically in WordPress, but what I have been looking for is to have a summary of pages, possibly in a hierarchic format, that resides at the side of a ...
1
vote
1answer
38 views

How to get the post type from a category id?

I am trying to find out the post type from a category id. Suppose that, when i am opening a category page localhost/project/foobaar/category/pen I want to know the post type to which category - ...
0
votes
2answers
130 views

Display sub categories of a parent product in products - woocommerce [closed]

I have searched this forum for the possible solutions but I am not getting anything which works. Maybe I am doing it the wrong way. Here is the code that I have tried so far $parent_categories = '' ...
1
vote
1answer
28 views

Get posts with at least one category in common with current post?

In single.php : I want to get all posts with at least one category in common with the current post. I tried reading through the wordpress codex documentation but I found it rather confusing (I'm ...
0
votes
1answer
16 views

How do I share categories across selected sites in a Multisite setup

I've got a Multisite network that looks something like this: Site A Site B Site C Site D Site E and have a set of Categories like this: Category A Category B Category C Category D Category E ...
0
votes
0answers
11 views

Category page filterable by year and month

One of the requirements for a wordpress site I'm working on is to have a category page that can be filtered by year and month. For example: mysite.com/category/dogs/year/2015/month/02 This will ...
0
votes
0answers
21 views

How can I add an “ALL” button to my list of WordPress categories / sub-categories?

I have a blog in which I am calling the WordPress wp_list_categories and all is working OK. My issue is that I am using the parent <li>s to slideToggle the subs, but need to add an "ALL" ...
0
votes
1answer
275 views

Create product category and keyword search form in woocommerce? [closed]

i want to build category and keyword based search form. so i got this following form <form role="search" method="get" id="searchform_special" action="<?php echo esc_url( home_url( '/' ) ); ...
0
votes
1answer
39 views

How to display only posts assigned to a particular, isolated, subcategory

I am trying to set up my wp site where I use posts assigned to categories and subcategories (about 3 levels). I have a list of 1st level categories as my primary menu. When clicked, the intended ...
0
votes
2answers
24 views

Combine “category search order” with “don't display child posts”

Each of these bits of code work separately in category.php, but when I use both together, the first one is ignored. Can someone tell me how to combine them into a single piece of code, or at least ...
0
votes
1answer
21 views

How can I modify this code to iterate over an array of categories?

I'm setting up a query for a series of 12 classes that will last a week each. There will be a morning session and an evening session. I'll have two different loops in the template to break those ...
0
votes
0answers
51 views

Define category ID using get_post_meta

I need to define the Category ID in my singles page through custom fields so that i can load a different category depending on the page. This is what i have so far and its not working. Any help would ...
0
votes
1answer
50 views

Get archives as array

I'm looking for a way to get the values returned from wp_get_archives as an array, similar to get_categories. I need to do this to modify the post counters to use - [#] instead of (#). See my current ...
0
votes
1answer
37 views

Sorting Posts by custom field

I'm trying to sort my posts by the custom field artwork_title. When I use the following code, I just end up with one particular category of posts no matter what category archive I'm on. Also ...
0
votes
0answers
11 views

Category Template - to be editable from the backend?

I have different categories that includes posts of the category. I want to add text and images before or after the posts of the categories are displayed on the frontend. I want to solve this via ...
1
vote
1answer
87 views

Sticky posts on home page, search, tag and archives without plugin

I have a question today. I am looking for a solution to make sticky post available on my website. But, i just got it work on homepage with the code below. function wpb_latest_sticky() { /* Get all ...
0
votes
0answers
15 views

Unable to uncheck a category in a post

I've created a post and I've checked the 'Jobs' category, but when I save the post, the 'News' category gets automatically checked, as well as the jobs category. It's seemingly impossible stop this ...
0
votes
3answers
85 views

How to add HTML5 'required' attribute to wp_dropdown_categories() without JavaScripts?

I'm using wp_dropdown_categories() for populating <select> field with custom taxonomy terms. If the code is like below: <?php $args = array( 'show_option_none' => __( 'Select one', ...
0
votes
0answers
34 views

A search box for all sites - Multisite

I have setup a few websites with Multisite. I have different topics in my website. Therefore, i have created topic1.mysite.com, topic2.mysite.com, topic3.mysite.com Let me explain how the look i want ...
0
votes
1answer
26 views

Custom filters inside a specific category?

I have different categories that require different filters For example a 'training' can be about a specific bodypart, by a specific athlete,.. What I want is something like this: But different ...
0
votes
1answer
22 views

How to display post in custom file not in archive file?

I create file content-expertises.php and display my category list. Now, When I click one my category name, it is redirect in category.php file not my custom created file like category-expertise.php. ...
0
votes
2answers
31 views

Exclude post category in a blog page

I have two links in "news" where all the news posts goes "blog" where the rest goes just wanted to exclude the category "news" in the blog page I use the code $news = new WP_query ...
0
votes
0answers
17 views

Proper way of manipulating a category on your homepage?

I'm using the Genesis theme, and attempting to create a function that finds the homepage AND a specific category, and removes post content under both those conditions. Using my limited knowledge I ...
0
votes
2answers
58 views

How to add category and subcategory in WordPress custom code?

I create custom plugin for import categories. now i have categories array from api.but when import categories into my wordpress woo commerce means not working. My code is given below. public ...
3
votes
1answer
96 views

Custom Nav Walker menu - Display category count

I have a custom walker menu.( See the code below) I would like to have my nav menu like this: Where 495 is the total of the records containing childrens. Where 42 Number of published articles. ...
0
votes
1answer
42 views

403 forbidden on one page only

I can't access http://www.plantea.com.hr/biljke/ The only error i get is Forbidden You don't have permission to access /biljke/ on this server. This is regular hierarchical category for post. I ...
0
votes
0answers
12 views

Loop within category's posts

I'm trying to figure this out since a couple of days, and even though it should be a quick and easy thing, I couldn't find any workaround. I've 4 categories, and each of it has between 10 and 40 ...