Generate a shortcode from a theme (3 posts)

  1. macgamer
    Posted 4 years ago #

    If I have a bit of php in my theme that calls a custom field and returns a shortcode, and I have a plugin installed that converts that shortcode into HTML, will this work?

    Or do I need to just generate the HTML myself from the theme file?

  2. 2DMonkey
    Posted 4 years ago #

    Seems a long way round.

    Can you explain in a bit more detail - I'm not totally sure what you are trying to do...

  3. macgamer
    Posted 4 years ago #

    Ok sure. I have a plugin that acts on an [amazon] shortcode.
    I want to store these codes in a custom field for each post, and have the template for the post retrieve them.

    But will the order of things mean that having the template pull the shortcode from the field will not allow the plugin to act on it? Or in other words, will the resulting post just read "[amazon]"?

Topic Closed

This topic has been closed to new replies.

About this Topic