Tagged Questions

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)

1
vote
1answer
435 views

How to show only one category in breadcrumb navigation

I added breadcrumb navigation to WordPress & I'm facing one problem. Here's the function.php code of the breadcrumb: function ux_breadcrumbs() { if (!is_home()) { echo '<a href="'; ...
0
votes
1answer
19 views

Loops in category description

I would like your help to find how to do a thing I need: I have some posts, for example: Article Title: Banana Article Title: Orange Article Title: Lemon Article Title: Strawberry All this ...
0
votes
2answers
149 views

How to display custom content in post with category XXX

Let’s say I have one post with tittle "Dummy one" and that post is filed under "Category one" and i have other post eg : "dummy two, dummy tree, etc" and category two, category three etc. and now I ...
2
votes
1answer
96 views

Permalink Settings: optional settings doesn’t apply to editor

In my WordPress 3.8 in my "Permalink Settings" I've chosen the option "Post name". Then I've added "Optional" for "Category" ( %category%/%postname% ), the URLs works like I wanted - ...
0
votes
2answers
58 views

Apply custom category template to subcategories

Hello on my wordpress site I have a custom template for category A with slug (cat-a). I created a category-cat-a.php file to give this category a custom layout and this works without a problem. I am ...
0
votes
0answers
103 views

Get sub categories and posts with the same parent category

I want to fetch all posts in category 1, then fetch all sub-categories in category 1, then merge the results into one array. Is that possible?
0
votes
1answer
127 views

Order posts by separate menu order for different sub-categories

My scenario is as follows: Categories: 1. Category A - Sub-Category A1 - Sub-Category A2 - Sub-Category A3 2. Category B - Sub-Category B1 3. Category C 4. Category D The ...
0
votes
0answers
221 views

Loading individual category post via dynamic tabs

I've been searching for a navigation solution for my wordpress site's front page that loads individual categories and their corresponding post through dynamic tabs. These are tabs or buttons that load ...
0
votes
0answers
166 views

Display newest posts from multiple categories ordered by date

I have the categories listed below in my post post type. Category Name: Test 1 ID: 1 Category Name: Test 2 ID: 2 Category Name: Test 3 ID: 3 Category Name: Test 4 ID: 4 I'd like to retrieve for ...
0
votes
1answer
51 views

Is there a way to randomize and connect a background and header image?

Right now I am using a different CMS, and I wrote a little bit of PHP which helps me (by using content from hidden pages) bring in a connected background and header and randomly display them, UNLESS ...
0
votes
4answers
58 views

How to find the number of Tags a post has?

Is is possible to find how how many tags (and categories) a post has and to display it? something like this: when a post has three Tags and two categories, at the end of the post show that number ...
1
vote
1answer
458 views

Automatically adding categories and authors in custom menu?

I've spent a couple of days googleling around, looking for a way to automatically add categories and authors to my custom menu as soon as they are created (the same way that pages are automatically ...
0
votes
0answers
46 views

Media Library filter returns undefined function get_current_screen

Hello I am following Filter by post category in Media Library I copied the code answer into my functions.php file at the bottom and got this error: Fatal error: Call to undefined function ...
2
votes
1answer
43 views

Edit category output

I am using the following to display all the categories from my custom post type. How can I edit it so instead of having the output of the categories in <ul><li> elements it has <a href ...
0
votes
0answers
77 views

different categories (using the same category labels) for different post types

I'm trying to build a multimedia aggregation website with 6 different custom post types and I would like each post type to have 12 categories, the same 12 category labels that the other 5 have, only I ...
0
votes
3answers
1k views

How to get category name from URL and pass to a template

I'm using the following page template to display the posts in a single category and plan to format the first post differently than the others. This works as desired but I have the category_name hard ...
0
votes
1answer
72 views

date.php shows all posts. how to fix it?

I am using the following function for category.php. It's working fine. function cat_page_list(){ /* post : returns the post for category page */ $paged = (get_query_var('paged')) ? ...
1
vote
0answers
67 views

Wordpress Multisite - Create Default Post and New Category On New Site Install

I've looked around quite a bit, but couldn't find help with creating a new, initial blog post and new category (or renaming the default category) once a new sub-domain has been installed. I've added ...
2
votes
1answer
331 views

Filter out posts before display category count

I have meta key "Due" for posts....if a post has expired (past the current date or not equal to it) then it should not be displayed in the count (i have code to display the count, which fades in over ...
0
votes
1answer
453 views

what is the action hook code to supporting product category condition in single product page of woocommerce?

I want to display product attributes of 2 different product category with the help of conditional tags. But the condition was not working This is the condition that i given ...
1
vote
1answer
85 views

Display post X of Y in category

I am trying to display a post number (X) on each single.php, based on what number that post is in it's category, followed by the total number of posts (Y) in the category. So if there is 10 posts in ...
0
votes
2answers
41 views

Ordering categories by slug vs. name

I am simply trying to reorder my dropdown options in my header menu. It pulls from categories and is currently listed them, with the exception of the first, in alphabetical order. I want to list in ...
0
votes
1answer
71 views

Trying to see if page is category or single and displaying title with appropriate heading tag

I'm using a custom theme from ThemeForest and I'm trying to get the custom post php to check and see if the post is on a category or single post. If it's on category, use <h2> for the title (for ...
0
votes
2answers
165 views

Let user select their own category

I would like to let category editor appear to any user and user can edit their preferred category(ies). For example: the category is about kind of job or profession and there are 10 ...
0
votes
1answer
33 views

Displaying year once in category.php [duplicate]

I want to be able to make my category.php display like this: 2013 Title 3 Title 2 Title 1 2012 Title 3 Title 2 Title 1 It's already been done for displaying ALL posts but how do I get it to ...
0
votes
2answers
168 views

Creating sub-categories via php

Can someone tell me what's wrong here? I'm trying to create a category and a sub-category via PHP. My code is wp_set_object_terms($postID, array($subCategory, $catgeory), 'category'); But that ...
0
votes
2answers
51 views

Restrict CSS on one page

I have my site: http://theapkstore.com . On the homepage I've added a slider. And reduced the top margin of widget which says "Welcome to my site". The homepage looks fine but then when I open any one ...
0
votes
1answer
31 views

Customize category URL

I've searched around and have not found the answers im looking for. By default I have: example.com/blog (blog archive) example.com/blog/entry (single entry) example.com/blog/category/announcements ...
3
votes
2answers
120 views

Restrict individual category combinations

While assigning multiple categories to a post, I need to restrict the category choices on a post depending on what other categories have already been assigned to the particular post. For example, ...
0
votes
0answers
39 views

SQL update post category by post starting letter

I need to update post category based on post first letter. E.g. all post starting with "A" should go into "A" category. so far i can only select posts starting with "A". SELECT * FROM wp_posts ...
0
votes
1answer
99 views

is user member of a group, show them categories [closed]

I want to only display categories e.g. the 'group-1' category to users that are members of a certain buddypress group e.g. 'group-1'. I think I can do this by manipulating this code, and replacing ...
-1
votes
1answer
41 views

Display Product category in archive product page

I want to display the category products in the store page ie archive-product.php. But early it was working, when i add new category it was not display the category product and the url is going correct ...
0
votes
0answers
49 views

How to get multiple loop in category.php, my scripts becomes madness

I am trying to develop a category.php page for my new theme and the loop which I’ve developed shows all posts of my blog and really bad too. I'm not an expert in WordPress theme development and ...
0
votes
1answer
105 views

Retrieve latest post by multiple categories with ID

I have the categories listed below in my product post type. Category Name: Test 1 ID: 82 Category Name: Test 2 ID: 83 Category Name: Test 3 ID: 84 Category Name: Test 4 ID: 85 Now I want to ...
0
votes
0answers
55 views

wp_list_categories Display Output in dynamics Columns

I use wp_list_categories on my site but they show list of categories in one column. I found chow to create 2 or 3 columns in 2/3 columns but i woundering it is possible to creat colums dynamic sorted ...
0
votes
0answers
42 views

Remove meta info for one specific category on all posts in that category

As for the moment each post on my site http://wonderfulwanderings.com (hope this is okay, just want you to know what I'm talking about) is displaying which category it belongs to. I would like to ...
0
votes
1answer
319 views

How to get category slug link? ( include parent categories)

for example, if main category slug is cars; sub-category slug is: Ford; how to get the permalink of Ford, including its parent categories' slug? ( get_category_link() returns mysite.com/?cat=19 type ...
0
votes
2answers
221 views

wp_insert_category() setting the 'cat_ID' gives not array error

I'm writing a plugin that automatically creates a bunch of stuff ie categories and child categories. But when I use the following code to create the categories: (from wp codex) //Create Post ...
-1
votes
1answer
27 views

One set of categories for multiple custom posts

Hi I have a site which has 3 different custom post types. At the moment each post type has it own custom taxonomy which is linked to the post type like a native category. What I would like is one ...
4
votes
1answer
354 views

Filter by post category in Media Library

I am trying to find a way to filter the Media Library by the Post Category that a Media item is assigned with. I can see that you can sort by "attached to" but this only get me a little of the way ...
0
votes
0answers
136 views

Admin - post order by category and sub category

I am trying to get the list of posts ordered in the admin area when sorted by their parent category. Ideally it would sort like this: parent category 1 -child category 1 --post 1 --post 2 ...
0
votes
1answer
171 views

Function to list posts from current post's category fails in WP 3.8

I have this function in my child theme's functions.php, whose simple aim is to list a number of posts, only from the category of the current post, but not the current post itself. It was working fine ...
0
votes
2answers
306 views

Multiple parent categories

I'm new to wordpress. I want to create some main categories and 5 sub categories for each main category. Sub categories will be same for both main categories. E.g main categories will be ...
0
votes
2answers
76 views

Get the name of category in query

I have parent category, Game (cat ID 42), and some child categories in it: Acrade, Causaul. After I using the loop to get the title of the post, I want to have a child category name. But my code is ...
0
votes
1answer
36 views

Displaying categories items among posts

I'm making a website with lots of custom posts as well as custom hierarchical taxonomies. Default index (archive) page is made of bricks with photo, title and excerpt from posts. And here comes the ...
0
votes
0answers
150 views

Displaying wp post categories into my custom metabox

Is there a way to display custom select box containing list of WordPress posts categories in my metabox? (also my metabox in custom post) Here are the illustrations: This are categories from ...
0
votes
1answer
371 views

Add multiple classes. Different style for each category tag

The output of <?php the_category(', '); ?> is <a href="http://url.com/category/my-category-name/" title="Show all posts under my-category-name" rel="category ...
0
votes
3answers
69 views

Get sticky post from category?

I have parent category is Game cat_id=42. Child categories are : acrade, causual,.... I want show a top game module in mainpage template, it will show 10 sticky post from game category. This my code ...
0
votes
2answers
95 views

Display one category in one page

I have different categories called as reviews, ideas etc. I have a page called as review, I want to display review category to the review page (only review category). Is this possible? Which file I ...
0
votes
0answers
305 views

category_name not working in WP_Query

I have a custom post type and I wanted to show posts just from a certain category but its not working. Here is the code: <?php // Reset post data. wp_reset_postdata(); $photo_group = 0; // For ...