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.
Leave a Reply