• Resolved canvasflow

    (@canvasflow)


    Hi, i’m currently developing a plugin that tries to get the rendered content as html, i’m using do_shortcode inside the plugin to get the html of the article, it works with the shortcodes from the system and from other plugins but not with the shortcode [ngg].

    This is the shortcode that i’m trying to render
    [ngg src=”galleries” ids=”1″ display=”basic_thumbnail”]

Viewing 4 replies - 1 through 4 (of 4 total)
  • In WPML translations I see this wrapped in <p></p>, e.g:

    <p>[ngg src="galleries" ids="3" display="basic_thumbnail"]</p>

    Maybe you can try that?

    Thread Starter canvasflow

    (@canvasflow)

    Yeah i also try it and still didn’t work, they got a class or something in their plugin that renders their owns shortcodes? I’m also trying to get the content inside a plugin not in the editor.

    • This reply was modified 5 years, 11 months ago by canvasflow.

    @canvasflow:

    I’d suggest using the C_Displayed_Gallery_Renderer class.

    
    $renderer = C_Displayed_Gallery_Renderer::get_instance();
    echo $renderer->display_images(array(
    	'src' =>	'galleries',
    	'ids'	=>	 array('3'),
    	'display' =>	'basic_thumbnail'
    ));
    
    • This reply was modified 5 years, 11 months ago by mweichert.

    Because it has been a month or more since your last reply, I am going to mark this as resolved as I assume you have found a solution. Please feel free to reply again if you still have questions.

    Thanks!

    – Gaby, Customer Support.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘do_shortcode not working with ngg shortcode’ is closed to new replies.