• Resolved evgenylebedevv

    (@evgenylebedevv)


    Hello!
    I use third-party shortcodes in my posts, but when i use AjaxLoadMore they are not executed, just simply displayed on the post page.
    shortcodes display in post page
    Tried to apply the function do_shortcode in functions.php like that:
    wp-content/plugins/ajax-load-more/core/functions.php:
    return do_shortcode($content);
    and in Repeater Templates:
    <?php do_shortcode(the_content()); ?>
    not work..
    How to win?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    Hi @evgenylebedevv,
    Check out this FAQ question on VC shortcodes.
    https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/#3

    Hope this helps!

    Thread Starter evgenylebedevv

    (@evgenylebedevv)

    It does not help, I’m new user.

    <li<?php if (! has_post_thumbnail() ) { echo ' class="no-img"'; } ?>>
       <?php if ( has_post_thumbnail() ) {
          the_post_thumbnail(array(150,150));
       }?>
       <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
       <p class="entry-meta">
           <?php the_time("F d, Y"); ?>
       </p>
    <?php
       WPBMap::addAllMappedShortcodes(); // VC Function
       $ajax_content = the_content();
       echo $ajax_content ;
    ?>
       <?php
       $postid = get_the_ID();
       $content = do_shortcode(get_post_field( 'post_content', $postid ));
       $content = apply_filters('the_content', $content);
       echo $content;
    ?>
    </li>

    not work

    Plugin Author Darren Cooney

    (@dcooney)

    Just tested and the following example works for me.

    <article>
       <div class='entry-header'>
          <h1 class='entry-title'><?php the_title(); ?></h1>
       </div>
       <div class="entry-content">
          <?php          
             WPBMap::addAllMappedShortcodes(); // VC Function
             the_content();
          ?>		
       </div>   
    <article>

    Hope that helps.

    Thread Starter evgenylebedevv

    (@evgenylebedevv)

    Content was loading but not displayed
    printscreen
    Strangely

    Plugin Author Darren Cooney

    (@dcooney)

    Very strange. Not sure why that happens.

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

The topic ‘Third-party shortcodes in posts’ is closed to new replies.