Articles of categories

Add Post into a Subcategory

I’m making a WordPress Template using HTML 5 Blank but my client want to insert into the nav a subcategory something like this But i don’t know how can I make it, i create a page of intenacionals and nationals and in my functions file i add this // Create 1 Custom Post type for […]

Link For Portfolio Categories

I am using portfolio posts to show products. I’ve created 4 portfolio category. And placed my products under these categories. My problem is it wont give links like blog posts. When i am add a blog post it gives a link includes categories but not in portfolio posts. Current URL: Wanted URL: How […]

Graphic before title – Specific Category

I am trying to add a “category specific” graphic before the post title of that category. Each category would have a separate graphic. This is what I have so far, any ideas? function new_title( $title ) { $new_title = ‘⚠️ ‘ . $title; return $new_title; } add_filter( ‘the_title’, ‘new_title’ ); The above adds the graphic […]

Pull Categories List with custom background color

With an inspiration to the article Adding Colorpicker Field To Category I have implemented the extra field for the category background in my theme. I want to add the background color in an inline style property but unable to do as I’m using get_the_categories_list() to pull the categories in the post meta data shown in […]

Displaying posts within current category – with Timber

Working with Timber (Twig) on a wordpress theme. I am trying to display all posts within the current category. This is for the categories page template. in my categories.php I have included: $category = get_the_category($post->ID); $args = array( ‘post_type’ => ‘post’, ‘posts_per_page’ => 12, ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘category’, ‘field’ […]

woocommerce display parent category thumbnail only (taxonomy-product_cat.php)

I created a function that display parent category thumbnails for all the pages that uses this template (taxonomy-product_cat.php) . The function is working on one of my parent and it’s subcategories (category 1 with 6 subcategories), the problem is on the other category (category 2 with 6 subcategories) I created. It repeats the echo 6 […]

Custom permalink /%category%/%postname%/ produces 404 on each post

I have installed brand-new wordpress-4.8.3. My next steps were, as in WPBegginer – How to Include Category and Subcategory in WordPress URLs: In Dashboard/Settings/Permalinks, I’ve pasted: /%category%/%postname%/; Saved my permalinks settings; Edited & Published my “Hello World!” post; Visited http://localhost/wordpress/uncategorized/hello-world/ Got: Not Found The requested URL /wordpress/uncategorized/hello-world/ was not found on this server. Apache/2.4.18 (Ubuntu) […]

How to organise the products on woocommerce – categories / tags

I would like to ask you how manage and organise the products on woocommerce. What’s is better, also in order to load as little as possible the database/ query time ? For example if I have 300 products of car parts so for example : Spoiler, visor, mudgard, ecc.. and I have 10 auto brand […]

Multiple color scheme in WordPress theme at a time

I am developing a WordPress theme and want to use a different colored title in category and tags,( example ) while the theme color is different. I have made a custom style file as theme-style.php by which I can maintain the theme color dynamically from theme option.But the problem I cannot maintain different color scheme […]

Do not want to display random category. Want to exclude a few or make post show only the category I want

I’m stuck in a strange situation right now. So I have my wordpress posts which belong to multiple categories. e.g one of my post belongs to two categories. One is ‘News’ category, and the other one is ‘Top Bar’. (I use it to assign posts to the header posts area which fetches its articles from […]