shortcode inside shortcode?

This topic contains 2 replies, has 2 voices, and was last updated by  Shean 6 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #459244

    Shean
    Expired Member
    Post count: 10

    Hi,

    I have a plugin that shows the facebook feeds of a FB page. It uses the shortcode
    [custom-facebook-feed id=”MyFacebookPageName”] This works great in the GD shortcode tab.

    In GD I have a txt-field called ‘facebook page’ and with [gd_post_meta key=”facebook_page” show=”value”] it shows the value of the field.

    For example:
    [gd_post_meta key=”facebook_page” show=”value”] = bbcnews
    and I need the shortcode
    [custom-facebook-feed id=”bbcnews”]

    Is there a way to combine these 2 shortcodes? I’ve tried it straightforward like this, but clearly that doesn’t work:
    [custom-facebook-feed id=” [gd_post_meta key=”facebook_page” show=”value”] “]

    Hope my question is clear 🙂

    Thanks so much !

    #459257

    Alex Rollin
    Moderator
    Post count: 27815

    Shortcodes do not automatically nest. You can see an example of the customization you will need here with the caption_shortcode() on this page: https://codex.wordpress.org/Shortcode_API

    #459285

    Shean
    Expired Member
    Post count: 10

    Thanks Alex!
    I will have a look there.

Viewing 3 posts - 1 through 3 (of 3 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount