• Resolved Chrissy

    (@paperkawaii)


    Hi.. !

    I am having a great time with the premium version’s template editor.. there are so many things you can do with it.

    I would like to be able to bring in and use shortcodes from custom fields.
    Or have the ability to use php scripts in the HTML box.

    Hope you consider doing that, it would make it so much more awesome! 🙂

    https://wordpress.org/plugins/wp-ultimate-post-grid/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Brecht

    (@brechtvds)

    You should be able to add shortcodes in the HTML & Code block, is that not working for you? We also have a Custom Field block that allows you to output any custom field associated with the post.

    It is possible to use our plugin hooks to alter the output of template blocks with PHP. What changes are you looking for exactly?

    Kind regards,
    Brecht

    Thread Starter Chrissy

    (@paperkawaii)

    ok..

    So in my posts, I have a custom field, which you add a shortcode into.

    If I bring that custom field into a ‘custom field’ box, the shortcode doesn’t render.

    Hope you get what I mean…

    The other way to do it, would be to allow PHP scripts to be added inside the HTML block.
    So you could add a ‘IF’ statement.. such as:

    if this_meta exists { do_this (and do the shortcode etc) }
    else {something else}

    🙂 great plugin though..

    Have it working nicely here: http://www.gilliandeaneart.com

    Plugin Author Brecht

    (@brechtvds)

    Well if you’re comfortable using PHP we do have plugin hooks available you can use to alter the output.

    For example, adding this code to your theme’s functions.php file should make sure the shortcode is executed in the custom field block:

    function wpupg_custom_field_shortcode( $output, $post ) {
    	$output = do_shortcode( $output );
    	return $output;
    }
    add_filter( 'wpupg_output_grid_block_custom-field', 'wpupg_custom_field_shortcode', 10, 2 );

    Brecht

    Thread Starter Chrissy

    (@paperkawaii)

    thanks thats exactly what I was looking for! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Suggestion / request – use shortcodes from custom fields’ is closed to new replies.