Shortcode in a pod

This topic is: not resolved

This topic contains 5 replies, has 4 voices, and was last updated by  sc0ttkclark 9 months, 1 week ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #159804

    chris.pilko
    Member

    Yes, you can. You just need to call this with the wp function "do_shortcode() like this:
    <pre>
    echo do_shortcode($my_shortcode_string);
    </pre>

    See this forum post for more information.

    http://pods.uproot.us/forums/displaying-pod-items/786

    #159805

    peroyomas
    Member

    I don’t get it very much. Can I insert a shortcode inside a field of a pod instead of a pod page? Can I use shortcodes that exist elsewere? How can I create a shortcode?

    #159803

    peroyomas
    Member

    Is there any way I can insert something like a shortcode in a pod?

    #159806

    sc0ttkclark
    Keymaster
    Post count: 813

    @peroyomas – See http://pods.uproot.us/codex/shortcode for more information about Pods Shortcodes in-case you want to show Pods using shortcodes. Right now, you will need to use PHP like:<pre><?php echo do_shortcode(‘[mycode var=1]‘); ?></pre> in your Pod Pages or Pod Templates. You can’t use PHP in your Pod Fields by default, but nothing is stopping you from enabling that by using something like this:<pre><?php
    echo do_shortcode($Record->showTemplate(‘my_pod_template’));
    ?></pre>

    #168193

    The uproot.us link above doesn’t work.

    Here’s how I do the [staff] shortcode from Shortcodes Ultimate, in conjunction with Pods:

    Scott, can you please add this to the official docs at http://podsframework.org/codex/templates? It’s been an FAQ already. I’d do it but I don’t have edit privileges.

    #168202

    sc0ttkclark
    Keymaster
    Post count: 813

    The URL is at http://podsframework.org/codex/shortcode

    The code you suggested would actually be bad, we don’t want magic tags used within PHP tags, it doesn’t evaluate correctly and can be bad for security.

    This would be correct:

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

You must be logged in to reply to this topic.

Wordpress Cloud Hosting