• Resolved super powered

    (@super-powered)


    Hi, I just downloaded this plugin and am hoping to use it to load my posts on a few pages.
    However, I can not get any of my posts to show. I’m starting very basic with it.

    The page im exporting to looks like this:
    <?php
    /**
    * The template for displaying all pages
    */

    get_header(); ?>

    <div id=”main-content” class=”main-content”>
    <?php
    // Start the Loop.
    while ( have_posts() ) : the_post();

    // Include the page content template.
    get_template_part( ‘content’, ‘page’ );
    the_title();
    the_content();

    endwhile;
    ?>
    </div>

    <?php
    get_footer();

    And then in the page for the content I have:
    [ajax_load_more post_type=”recipes”]

    News Page

    The page simply has the header, the footer and then ‘News’ and ‘News Page.’
    I’m not entirely sure what I’m doing wrong ,any help would be apprecieted

    https://www.ads-software.com/plugins/ajax-load-more/

    –And to clarify, there are recipe posts that exist already

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter super powered

    (@super-powered)

    The shortcode is definately doing SOMETHING at least.
    <div class=”alm-listing alm-ajax ” data-repeater=”default” data-post-type=”post” data-post-format=”” data-category=”” data-category__not_in=”” data-tag=”” data-tag__not_in=”” data-taxonomy=”” data-taxonomy-terms=”” data-taxonomy-operator=”” data-meta-key=”” data-meta-value=”” data-meta-compare=”” data-year=”” data-month=”” data-day=”” data-author=”” data-search=”” data-post-status=”” data-order=”DESC” data-orderby=”date” data-exclude=”” data-offset=”0″ data-posts-per-page=”5″ data-lang=”” data-scroll=”true” data-scroll-distance=”150″ data-max-pages=”5″ data-pause=”false” data-button-label=”Older Posts” data-button-class=”” data-destroy-after=”” data-transition=”slide”></div>

    shows up on the page where the shortcode is. But there’s nothing inside of it however.

    I’ve also tried testing with using <?php echo do_shortcode(‘[ajax_load_more]’); ?> in the page file and get the same result.

    Thread Starter super powered

    (@super-powered)

    Tried to click the “Insert Ajax Load More” button on the page editor and got this warning at the top:

    Notice: Undefined variable: path in /vagrant/wordpress/wp-content/plugins/ajax-load-more/admin/editor/editor-build.php on line 6 Call Stack #TimeMemoryFunctionLocation 10.0010235432{main}( )../admin-ajax.php:0 20.09542383072do_action( )../admin-ajax.php:85 30.09542384544call_user_func_array ( )../plugin.php:496 40.09542384632alm_ajax_tinymce( )../plugin.php:496 50.09652385464include_once( ‘/vagrant/wordpress/wp-content/plugins/ajax-load-more/admin/editor/editor-build.php’ )../editor.php:22 https://vagrantpress.dev/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css”&gt;

    I’m not sure if it’s related or not.
    I have no errors in the console on page load.

    Plugin Author Darren Cooney

    (@dcooney)

    I don’t think that editor error would have anything to do with the front end issues.

    Can you confirm the ajax load more js is loading in the footer and you have jQuery running?

    Thread Starter super powered

    (@super-powered)

    Jquery is definately running and working. 1.11.2

    I do not have anything for Ajax Load more in the footer. Is there a script I’m supposed to be including?

    Plugin Author Darren Cooney

    (@dcooney)

    Yes. Please make sure you have wp_footer() in your footer.

    Thread Starter super powered

    (@super-powered)

    Awesome! Doing that as well as adding wp_head() to the header fixed it.
    Thanks! : D

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can't get shortcode to show anything’ is closed to new replies.