ACF into Cloud Template

Posted in: Newspaper
Post count: 95

Hi!

I’m trying to insert into tdb_single_source.php this code $buffy = ‘get_field(‘author’);’;

I think is not the correct syntax, can you help me?

In the near future, please add native support with ACF.

Post count: 35449

Hi,

Please note that we do not tested the ACF into Cloud Template only on standard templates, therefore we can not say if this will work or not, or what is the correct syntax.
If you want you can check a similar topic -> https://forum.tagdiv.com/topic/show-custom-fields-in-a-post-created-with-acf-plugin/

Thank you for your understanding!

Post count: 95

I know that ACF is not your Plugin, but if you say that it is possible to insert it in those files of the screen https://i.imgur.com/gLoYC17.png, I would like to kindly understand how.

I’m trying to insert <?php echo the_field(‘author’, $this->post->ID);?> in tdb_single_modified_date.php but it doesn’t work.

Since ACF’s shortocode doesn’t work in Template Clouds, for example in Column text, I’m willing to sacrifice single_modified_date.php for it to show the author field I need.

Post count: 35449

Hi,

As I said above, we do not tested the ACF into Cloud Template, this was just a reference for the files where it should be set the code if is working with cloud templates.

Also, what is the most exactly thing that you want to achieve? if you let me know, maybe I will be able to help.

Thank you for your understanding!

Post count: 95

Thanks Calin for the support you give.

But it is also a bit strange in this case to say what the editable files are and then not to confirm the method to be used to implement ACF. At this point it is better to say that no, you can’t use ACF with Cloud Template, if that’s right.

Anyway, I use a Cloud Template and in Single Template I would like to insert an ACF shortcode, only that inserting it in Column text, in the editor, does not work. And I can’t even put the PHP code in the file single_modified_date.php.

Is there a solution?

Post count: 35449

Hi,

I just made some checks and for me the AFC is working with cloud elements too, but you need to make sure that these element are present in you single post template, for example: -> https://i.imgur.com/WnNclIQ.png -> https://i.imgur.com/A07Yxp5.png -> https://i.imgur.com/D8wTlXO.png the results are -> https://i.imgur.com/TBLIShZ.jpg

Hope this will help you!
Thank you!

Post count: 7

Hi Calin!
I would like to set the ACF Fields in the cloud template. Not in the “single” source code. Is there any variable available in the cloud template environment which is representing the post id which will be “parsed” from the template engine?

I am facing following issue:
get_the_id is returning the id of the template (which is just a custom post type) this is why.

To get correct feedback from ACF i need to pass the “current” single post id to acf which is obviously not the “get_the_id” id. Somehow or somewhere the template engine know which post to parse. So – there must be an variable holding the required pice of info!

I am looking forward for any kind of help!

Thanks

Post count: 35449

Hi,

You can get the post id from this file -> wp-content/plugins/td-cloud-library/shortcodes/single/tdb_single_content.php -> https://i.imgur.com/NBuS6Dd.png -> https://i.imgur.com/fCcKs8R.png

Hope this will help you!
Thank you!

Post count: 95

Sorry Calin if I come back to the topic late, I’m really asking you for a courtesy,

the following code

$buffy .= the_field('name');

work in tdb_single_content.php but inserting it in tdb_single_author.php doesn’t work, I have to insert it in tdb_single_author.php so I can position it where I want.

If I put on tdb_single_author.php

$buffy .= the_field('name', 40);

Specifying the ID, it works, you understand that I can’t put a fixed ID because changing Post must change the value of the field.

The proof that I ask you to do, however, is with the Template Gadget Pro because I can think that with other templates, like the one used by you, it works.

I ask you to try and find a solution, for me it is important and I think it is important for everyone.

Post count: 35449

Hi,

The cloud template are all made with the same elements and are saved in database, there is no finical files for cloud templates, only the shortcode.
Please just try like in my example and make sure that you are using that element on your post template.

Thank you!

Post count: 95

I tried but to no avail, please check with the Template Gadget Pro and attach the file you edit (tdb_single_author.php).

Use the following code:

the_field('name');

Post count: 35449

Hi,

Please not that AFC plugin is not tested with cloud templates, therefore we can not say if it can or can not work with it! Please note that this is a custom request, you can submit here -> https://tagdiv.com/web-development-services/

Thank you for your understanding!

Post count: 6

Hi Calin,

I need a little help too. I’m trying to create a field that I can see in “new article” but also in “td composer”. I want that field to be filled in when I write the article and in the composer to appear to me in the same way as “source” or “subtitle” appears. I use afc, I created the field in afc but I don’t see it in the new article …

I’m waiting for an answer from you

Post count: 35449

Hi gabrieltanase,
I’m afraid that I do not understand entirely what do you want to achieve.
So, you are using ACF with cloud templates to add extra text. This can be done, but I need to know exactly what you want to achieve and the elements where you want to display that text, also this filed will be add in WordPress posts editor for each post in part. But the only problem is that changing the cloud files is not a good idea, because those can not be set in a child theme, only the classic templates.
Thank you!

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