Kevin Pepito
asked 5 years ago

Hi,

im trying to modify/create a post template for specific category. however, when i edited the single.php, it does not make any changes.

is there something that i need to do before editing something?

Regards,
Kevin

1 Answers
DominicStaff
answered 5 years ago

Hi,
If you want to change the post for the category, you can use the content.php file.
If you have any issue, you can tell me detail about what you want to change, I will check and help you resolve it.
Regards,

kevinpoy
replied 5 years ago

HI,

Thank you for the quick response, you are awesome!

i am planning to customize the post template, different template for different category.
example:

is_category( ‘Stinky Cheeses’ ){
//display custom header
//display calendar
}

else if
is_category(‘smelly mcsmell’){
//display different custom header
//display sidebar with smelly mcsmell’s facebook page, twitter
}

i tried deleting the contents in content.php’s file but the posts pages(blog articles) are not affected. it is still dislaying its content.

I really appreciate your help!

kevinpoy
replied 5 years ago

hi, i already found a solution to this problem, my next question would be: where can i edit the archive where i can create a condition that if the category is "stinky cheese" it will display a banner dedicated to that specific category!

i appreciate your help!

dominic Staff
replied 5 years ago

You can find the\wp-content\themes\dw-focus\inc\category-meta.php file.
Hope this helps !

kevinpoy
replied 5 years ago

thank you so much!

Powered by DW Question & Answer Pro