category code from post templates

Posted in: Newspaper
Post count: 24

We are using custom taxonomy for classification of our content. For this, we wanted to add custom taxonomy to post templates where category is shown on the top, above headline.

In post templates loop-single.php, loop-single-1.php, loop-single-5.php, loop-single-9.php, loop-single-1.php we found the following line of code

<?php echo $td_mod_single->get_category(); ?>

This helped us to know where to add our code. However, wut we are unable to find this in other post templates so we can’t understand from where are the other posts templates getting the category.

Could you tell us?

Post count: 22421

Hi,
Every post template has 2 files associated. A loop file and a single file. If the code you are looking for is not in the loop file, then it must be in the single files: http://screencast.com/t/wsjn3npHIG
Thank you!

Post count: 24

Thanks Bogdan!

I have one more query. I wanted to make some changes to a particular block but I don’t want to change the original block. I would like to save the block with a new name and make changes in the new block. Can you guide me on how I can add a new block, create the shortcode and register the block?

Post count: 22421

Hi,
The best way to go about this is to use the theme API system: https://forum.tagdiv.com/td_api_blockadd/
Please note that this requires coding knowledge and is not covered by support.
Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.