Your Time:
Our Time:
← Back to discussions

Shortcode in another widget for custom fields listings

Need help with a different issue? Search the forums or open a new ticket.
Open a support ticket

This topic has 3 replies, 3 voices, and was last updated 9 years, 9 months ago by Anonymous.

  • 2016-12-06 at 2:01 pm
    Support Expired
    #18245
    WebD17
    Participant
    • Topics: 1
    • Replies: 1
    • Total posts: 2
    • Post count: 1

    Hi team,

    Just a question please : I looking for display the business hours with your shortcode.

    I write the shortcode in a custom field into a custom post (listing) and I display it by a widget for the custom fields. But my problem is the shortcode doesn’t work. It still in text format. I tried with add_filter on my widget and do_shortcode, but no better.

    If you have an idea. I wish a display by a widget for custom fields, because it’s easier to manage the listings with or without business hours (display or not).

    e.g. : https://www.passiontir.com/listing/the-hoxton/ In the sidebar, there is 2 widgets. One that take into account the shortcode (but same shortcode for all my listings. I don’t want that). And another that only return the shortcode text.

    Thanks for your help !

    2016-12-06 at 2:38 pm
    #18246
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    I figured that your theme doesn’t supports shortcode in the widget you need to install the plugin which provides support for shortcode in widget.
    https://wordpress.org/plugins/enable-shortcode-and-php-support-in-text-widget/

    If you wish to do without plugin you can follow this URL
    http://www.wpbeginner.com/wp-tutorials/how-to-use-shortcodes-in-your-wordpress-sidebar-widgets/

    Please feel free to ask if the problem still persist after following the above procedure.

    2016-12-06 at 9:24 pm
    Support Expired
    #18250
    WebD17
    Participant
    • Topics: 1
    • Replies: 1
    • Total posts: 2
    • Post count: 1

    Hi,

    thank you about your reply.

    Finally, I have coded directly in function.php of my child theme, because I’ve a listings theme, and I need to include variables inside the shortcode.

    Thanks again !

    Best.

    2016-12-07 at 10:11 am
    #18252
    Anonymous
    Inactive
    • Topics: 0
    • Replies: 3227
    • Total posts: 3227
    • Post count: 0

    You are welcome. We are setting this topic to be resolved. If you wish to update this topic please reply here instead of creating another topic.

You must be logged in to reply to this topic.