custom fields
-
Is it possible to display custom fields content? How can I do that?
-
This would need a custom set of code. Two options that I see here and heavily dependent on how many custom fields you have in mind.
The first is to use CRP_Query which is similar to WP_Query to get the posts and display them. That way you can tap in to custom fields, e.g. if you’re using ACF then use the_field like you’d do with WP_Query.
This is probably the best option especially if you’re using ACF or similar.
The other alternative, is to use a filter function to filter either crp_before_list_item or crp_after_list_item to add the field content before or after the main list items that are displayed.
Hello, I’ve the same problem. I must insert one custom fiedl. I’ve created the field with ACF. I try to put the shortcode in crp after list item, but the shortcode doesn’t work. Can you help me?
The shortcode is [acf field=”name”]
I try also with php but is the sameGreets
Silvia@silviaserpe what is the full code you are using?
I use the shorcode.
[acf field=”name”]
greets
SilviaYou can’t put that into the settings as the shortcodes are not processed. You’ll need to do a custom install (as mentioned above using CRP_Query) in order to display ACF fields the related posts output.
Can you help me? Because I’n not a developer.
I don’t know where to put the code and what is the code to put.
Greets
SilviaLet me work up an example. I don’t have ACF so will be untested code. I’ll get back to you
you can see here the related products in the page, under the pumps.
https://www.gmppumps.com/en/product/flanged-pumps-for-gasoline-and-diesel-engines/
I need to optain this result, if you scroll down the page you can see the pumps.
https://www.gmppumps.com/en/pumps/industry/The custom field of ACF is called “versioni”
Thanks in advanceSilvia
@silviaserpe
Is it this text e.g. “4 KW 400/690 V T.”Yes it is
Would you be able to extract the code that displays the layout on your site and paste here or in a gist?
I don’t know if is correct
the page is here https://www.gmppumps.com/prodotto/b8xr-a-r-30-kw-400-690-v-t-1450-giri/
-
This reply was modified 4 years, 4 months ago by
silviaserpe.
This would be part of the theme files that you have – it might single.php or index.php more likely.
Do you know which theme you are using and if this was custom changed?
You’ll need to post the code to gist.github.com ideally.
-
This reply was modified 4 years, 3 months ago by
Ajay.
The theme is Avada. No it has not been changed
-
This reply was modified 4 years, 4 months ago by
The topic ‘custom fields’ is closed to new replies.