Αυτό το πρόσθετο δεν έχει δοκιμασθεί με τις 3 τελευταίες κύριες εκδόσεις του WordPress. Μπορεί να μην αναπτύσσεται ή να υποστηρίζεται άλλο και να έχει προβλήματα συμβατότητας με τις πιο πρόσφατες εκδόσεις του WordPress.

TTT Loadmore

Περιγραφή

WordPress plugin to load more event with your own template.

For code contributions please go to https://github.com/33themes/ttt-loadmore

How to use it

This is the base html:

<a href="#" data-tttloadmore-do="archiveposts" data-tttloadmore-to="#main" data-tttloadmore-args="category:php;">
    Load more content
</a>
  • data-tttloadmore-do* is the action to load more content
  • data-tttloadmore-to* is where the script put the content after load more posts (the result of the “do” action)
  • data-tttloadmore-args* contain all the arguments you want to send to the “do” action

Then, you have to create an action with the same name of the data-tttloadmore-do

<?php
function loadmore_archiveposts( $page, $args = false ){

    $archiveposts = array(
        'post_type' => 'post',
        'post_status' => 'publish',
        'order' => 'DESC',
        'orderby' => 'date',
        'paged' => $page,
        'ignore_sticky_posts' => 1,
        'category_name' => $args['category'],
    );
    $archiveposts_query = new WP_Query($archiveposts);
    ?>

    <?php if ($archiveposts_query->have_posts()) : ?>
        <?php while ($archiveposts_query->have_posts()) : $archiveposts_query->the_post(); ?>
                <?php get_template_part( 'partials/content', 'content' ); ?>
        <?php wp_reset_postdata();?>
        <?php endwhile; ?>
    <?php endif;?>

    <?
}
add_action('ttt_loadmore_archiveposts','loadmore_archiveposts', 1, 2);
?>

Εγκατάσταση

This section describes how to install the plugin and get it working.

  1. Upload ttt-loadmore folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

Κριτικές

Δεν υπάρχουν αξιολογήσεις για αυτό το πρόσθετο.

Συνεισφέροντες & Προγραμματιστές

“TTT Loadmore” είναι λογισμικό ανοιχτού κώδικα. Οι παρακάτω έχουν συνεισφέρει στη δημιουργία του.

Συντελεστές

Σύνοψη αλλαγών

1.1

Remove assets from the main file

1.0

First version