• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Inline Style Post Category Links Differently Using Color Picker

The code in this download folder enables you use the color picker on the Edit Category page to style your post category links different colors.

Once you install the PHP code, all post category links will be styled without the need to add any CSS and each link will be styled differently regardless of how many categories you assign to each post.

Works with any taxonomy type.

Demo Video

Shows you how to use the color picker on the edit category page to set the post category link colors o single posts and archive page types including category and home archive pages.

Tested using the Genesis Sample child theme by StudioPress however will work in any Genesis child theme and any WordPress theme if you change the hook.

Installation Steps

There’s 2 steps :

  1. # Copy & paste the the PHP code ( without the opening PHP tag ) to the end of your child themes functions.php file.
  2.  

  3. # Install the Advanced Custom Fields plugin ( free or pro version ) and import the acf-107783.json file.
  4.  

Download Folder

Usage With Other Taxonomies

Simply swap out the value for the $post_categories variable in the code and change the category taxonomy parameter to match your taxonomy.

$post_categories = get_the_terms( $post->ID, 'category' );

Uses get_the_terms

Related Tutorials

  • Code Color Picker On Taxonomy Edit Screen To Style Post Meta On All Page Types Including Posts Page

Custom Fields Entry Meta Meta Box Taxonomy Terms

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.