Tagged: wysiwyg editor custom field
July 11, 2019 at 8:57 pm #33966
Hi, glad to use your nice theme
I want to add shortcode in the restaurant listing type via the custom field “editor” in “field” page of listing type editor (not the “unique” page of listing type editor), but when I put the shortcode in custom field when Im in editing page of the restaurant, it doesn’t work (doesn’t appear) in single page of the restaurant therefore it’s working when I put the shortcode in the “description” field which use “wysiwyg editor”
So how can I add a custom field which work with shortcode?
thanksJuly 12, 2019 at 2:41 pm #33987
You can use ShortCode element on Single -> Listing sub-tab instead: http://prntscr.com/odz2eiJuly 13, 2019 at 12:40 am #34020
I want to add different shortcode in each restaurant, how can I declare the shortcode element in field to use when I fill the information for a restaurant?July 15, 2019 at 11:45 am #34051
1 – Add new custom select field for predefined shortcode for select from listing submit: http://prntscr.com/of2k81
2 – Create new builder element ( or override existing element ) to add your shortcode implement code: http://prntscr.com/of2lig
$custom_shortcode = get_post_meta( get_the_ID(), ESB_META_PREFIX.'custom_shortcode_field_name', true ); echo do_shortcode( "[$custom_shortcode]" );
https://docs.cththemes.com/docs/for-developer/July 16, 2019 at 12:20 am #34081
I did what you said but still not working, the best solution is to show me how to create a “wysiwyg editor” field or to show me how to replace the standard “text” field by a “wysiwyg editor” field.
the shortcode work in the description field so I just need to duplicate the description field may be..
(I used a standard shortcode of CF7 just for testing)
attached picture of what I’ve done until the result
- This reply was modified 4 days, 21 hours ago by adminb.
Attachments:You must be logged in to view attached files.July 16, 2019 at 11:08 am #34094
You can’t use shortcode with Custom Field element. You have to create new one element or override existing one. Check links above for detailed documentation.July 16, 2019 at 9:02 pm #34110
_ I made the copy of azp_templates folder in my child theme and modified the azp_lcontent.php as you said me to do (picture attached A1 ),
_ I create a field as you told me but I don’t know (picture attached A2)
_ But in the single listing editing (picture attached A3) page I don’t know what to add
please give me a step by step way to add shortcode field in my listings, each shortcode will be different, so like the description field in the listing page (picture attached A4) I need to change values for each restaurant in their editing page
hope it’s clear
thank you in advance
Attachments:You must be logged in to view attached files.July 17, 2019 at 3:47 pm #34125
Try this: http://prntscr.com/og67tx
And the shortcode will display on single listing page ( not listing edit page )July 17, 2019 at 9:50 pm #34145
Thank you for this correction,
now it’s working
Good job!July 18, 2019 at 12:06 pm #34156
You are most welcome 🙂
You must be logged in to reply to this topic.