WordPress.org

Ready to get started?Download WordPress

Forums

Mini Loops
Get info from more fields in mini loops (3 posts)

  1. Patrick_Wolf
    Member
    Posted 1 year ago #

    Hello i'm trying to get information from another plugin in the shortcode loop of mini loops.

    I made this line:

    echo do_shortcode(" [miniloop number_posts=10 post_status=published current_category=1]
    <li>[ml_title][ml_image from=thumb width=200 height=150][ml_vanaf]</li>
    [/miniloop]");

    and in helpers.php i added:

    add_shortcode( 'ml_vanaf', 'miniloop_vanafPrijs');
    function miniloop_vanafPrijs() {
    	meta("vanafPrijs");
    }

    But the output from ml_vanaf is not inserted in the
    <li></li>
    but created outside the
    <ul>
    Anyone out here who can help?
    http://wordpress.org/extend/plugins/mini-loops/

  2. ebartan
    Member
    Posted 1 year ago #

    doesnt run custum filed code

  3. Kailey (trepmal)
    Volunteer Mod & Reviewer
    Plugin Author

    Posted 1 year ago #

    @Patrick_Wolf: The shortcode function should return data, not echo it.
    I don't know where meta() comes from, but you may need to either simply return that:
    return meta('vanafPrijs'); or find/create an alternate function that will return, perhaps return get_meta('vanafPrijs');

    @ebartan: You're going to need to be a bit more specific.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic