• Resolved olgamm

    (@olgamm)


    Hello,

    i have posts that has a gallery shortcode in the content and when I’m loading more posts with ajax, the shortcode doesn’t render and it’s displayed like a text. I saw in a previous thread that was a version issue but the thread was from 2 years ago.

    I have the latest version of the plugin (Free version)

    Thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • Dear @olgamm,
    Thank you for the inquiry.

    Can we have the gallery page to see the issue from your end?

    Sincerely,

    Thread Starter olgamm

    (@olgamm)

    Hello

    i have created a test page for you to see,
    Link: https://bit.ly/3hdZ34Q

    i have a custom query and i have created a load more for pagination with ajax. The posts inside the_content() have the gallery element only, so when Im calling the the_content() the shortcode doesn’t get rendered.

    if i do it without an ajax pagination the shortcodes get displayed normally

    Many thanks

    Thread Starter olgamm

    (@olgamm)

    Hello @asyag

    any idea why this is happening?

    Thanks in advance

    Thread Starter olgamm

    (@olgamm)

    Well, i solve it in a way,

    in the file functions.php in my function that i get the content, instead calling the function “the_content()”
    im getting the id of the gallery of current post and then im calling the “photo_gallery” function like this :

    if( function_exists(‘photo_gallery’) ) {
    echo photo_gallery($IdOfGallery);
    }

    so this is a workaround for me.
    But the issue is still an issue, it will be great if you can solve it for future issues.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Shortcode doesnts render in ajax response’ is closed to new replies.