Custom fields in Post

Posted in: Newspaper
Post count: 10

Hello
I am trying to insert “custom fields” in my post. The tutorials ask to insert the call in the file “single.php”, but for the Newspaper theme this does not work. Can someone help me?

Thank you

Post count: 35449

Hi,

Please take a look over the next useful guide from here -> https://forum.tagdiv.com/topic/add-additional-fields-to-posts-in-category-grid/ -> https://forum.tagdiv.com/topic/add-custom-field-to-post/ to know how you can configure your Advanced Custom Fields.
Also in Newspaper X the single.php files were moved in -> wp-content/plugins/td-standard-pack/Newspaper/parts/single/single_template_1.php

Hope this helps!
Thank you!

Post count: 10

Ok. I tried here and had some success. But I still need more help …

— I created a child theme. I modified the “loop-single1.php”. Then, I edited the post and chose theme “Style 1” and in the front end of the article the custom fields were displayed 🙂

— BUT I want to use the “Single Post Template – Default PRO” theme, in which case, which file do I need to edit?

Post count: 35449

Hi,

The PRO demos are using cloud templates, dos are construct in a different way and can not be set in child theme.
The files path for the single post template from cloud is -> wp-content/plugins/td-cloud-library/shortcodes/single the code need to be assigned to one element that you use in post template.

The single post template from tagDiv Cloud Library can be edited using tagDiv Composer.

Thank you!

Post count: 10

I located the file “tdb_single_content.php” em “wp-content/plugins/td-cloud-library/shortcodes/single”

In the code I found the section that appears to be responsible for displaying the Post text.

$buffy .= ‘<div class=”tdb-block-inner td-fix-index”>’;
$buffy .= $post_content_data[‘post_content’];
if ($post_content_data[‘post_pagination’] != ”) {
$buffy .= ‘<footer>’;
$buffy .= $post_content_data[‘post_pagination’];
$buffy .= ‘<footer>’;

I would like to display in the Post the custom field ACF “<?php echo get_post_meta($post->ID, ‘registro_cas’, true); ?>”

But I can not. Where should I put this code?

Inserted into the template “loop-single-1.php” and it worked, but I need to use the Pro template.

If anyone can help me with this …

Thank you

Post count: 35449

Hi,

Please note that we do not test it with cloud templates, only with standard templates, for cloud templates you need some custom work to adjust the code, also the code can not be set in a child theme, therefore on each update you need to make the changes.
If you want you can make a request to our custom services here -> https://tagdiv.com/web-development-services/

Thank you for your understanding!

Post count: 10

Sorry, I disagree with you. Custom fields are an important feature of WordPress. So the Template Cloud should easily support custom fields. Not wanting an implementation. I’m just asking for important WordPress functionality to be possible in the template.

(Sorry the English)

Thank you anyway!

Post count: 35449

Hi,

For the moment we do not have any guide for implement custom fields in cloud template only on standard templates, maybe this will be implement in the coming updates.

Thank you for your understanding!

Post count: 10

Hello

You told me that it would not be possible to use “cloud templates” to insert custom fields. I didn’t like it, but I accepted. I worked on the standard templates.

I entered the custom fields and they work well. Now, to finish, I need you to tell me which files should I edit so that the custom fields are displayed on the Mobile Template and on the Amp page.

thank you

Post count: 35449

Hi,

The file responsible from mobile theme plugin and amp posts is this one > wp-content/plugins/td-composer/mobile/single.php -> https://i.imgur.com/sgdgEmt.png

Hope this will help you!
Thank you!

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