How to show custom fields under post title in category or archive page ?

Posted in: Newspaper
Post count: 5

Hello,

I want to show the custom fields for posts to appear under post title in the category or archive page view. How can i achieve this?

**
1. How can i get the category ID on the archive/category page template, so that i can list the posts and custom fields on the front end through a php code. None of the avaialble codes on wordpress codex worked for me?

2. Or else what code to get the ACF custom fields by hardcoding the tdb_module_loop.php

None of the avaialble codes on wordpress codex worked for me? I am able to retrieve the custom fields on single post template but not on archive pages?

link to my single post page

https://quizboard.app/post/genetic-identity-of-a-human-male-is-determined-by/

link to my category archive page

https://quizboard.app/topic/biology/reproduction-system/

I want to display 4 options under the title.

Post count: 35449

Hi ashish252,
If I understand correctly, you are using a pro demo, therefore you have cloud templates, those are a complicate to set with ACF, you need to edit the file that contains an element from your category or archive page , for example for single post template, if I’m right you edited the tdb_single_current_post element, now if you want the same custom files to be display for entire website, you can set it on tdb_title element -> wp-content/plugins/td-cloud-library/shortcodes/common/tdb_title.php
If this is not what you mean, please let me know!

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