• 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

Add Text to Single Posts In Specific Category or When On A Category Archive

There’s different ways you can code a custom function to display text on single posts in specific categories as well as on the same category archive page.

Note: All custom functions should be pasted at the end of your functions file, preferably in a child themes functions.php file. The following examples use the loop_start hook which works in any theme and the web-design category slug which you can swap out with your own category slug or category I.D.

Here’s 4 different methods:

1st Method

2nd Method

3rd Method

4th Method

This method creates a new widget area which you can populate with a text widget.

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