Wat to Add button in category top section for news & events

Posted in: Newspaper
Post count: 9

I want add button “POST NEWS” in news category template top section.
How could i add this? can u explain.

Thanks in advance.

Post count: 22421

Hello,

The category templates do not have any editing options to add or remove content. They can be set using the theme panel settings: https://www.screencast.com/t/D5wbz3Dys0pE
If you want to add certain content to a certain category, you will have to edit the theme core files to do it. You can use the category id and place specific content for a specific category id like so.
You must first identify the correct file to edit. Each category can have multiple category templates or top post templates: https://www.screencast.com/t/cmYE5KzSyB depending on the place you want to add the button to and the templates used on your category setting, you can modify one of the files from the list
Next you can use a is_category function to wrsp your code around the function so you will only affect the desired category. https://developer.wordpress.org/reference/functions/is_category/
You will have to create the button code using html though. There are lots of button generators online that use html and css.

Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.