How do i tweak my wp Post title base on category of the post

Question

Hello please i need a wordpress function.php code where i can choose how to display my title differently in section wp_title.

E.g.

If home, tag page, Category page, And Pages are viewed then “Normal Title”.

But.
And then post titles will have a conditional statement like.

If a post is under “Music” catgegory then the title will have a prefix “Download Music:” before the post title.

E.g Download Music: %post_title%

If a post under “Video” category then the title will have another prefix “Download Video:” before the post title.

E.g Download Video: %post_title%

Etc…

I hope i’m understood??.

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/how-do-i-tweak-my-wp-post-title-base-on-category-of-the-post/">

How do i tweak my wp Post title base on category of the post</a>
0
, , Teejah James 2 weeks 0 Answers 12 views 0

Leave an answer