Where to put the Shortcode
-
Hi,
I’ve just bought the Next Page add-on but I am a newbie at WordPress and I couldn’t manage the plugin to work.
As far as I understand I have to edit my single post template (single.php) and paste the short-code.
And I believe this is the code to paste:
<?php echo do_shortcode('[ajax_load_more nextpage="true" nextpage_urls="true" nextpage_post_id="'. get_the_ID() .'" pause="true" button_label="Next Page"]');
And my single.php file:
<?php /** * @package WordPress * @subpackage U-Design */ if ( !defined( 'ABSPATH' ) ) exit; // Exit if accessed directly global $udesign_options; // construct an array of portfolio categories $portfolio_categories_array = $udesign_options['portfolio_categories']; if ( $portfolio_categories_array != "" && post_is_in_category_or_descendants( $portfolio_categories_array ) ) : // Test if this Post is assigned to the Portfolio category or any descendant and switch the single's template accordingly include 'single-Portfolio.php'; else : // Continue with normal Loop (Blog category) get_header(); $content_position = ( $udesign_options['blog_sidebar'] == 'left' ) ? 'grid_16 push_8' : 'grid_16'; if ( $udesign_options['remove_single_sidebar'] == 'yes' ) $content_position = 'grid_24'; ?> <div id="content-container" class="container_24"> <div id="main-content" class="<?php echo $content_position; ?>"> <div class="main-content-padding"> <?php udesign_main_content_top( is_front_page() ); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div <?php post_class(); ?> id="post-<?php the_ID(); ?>"> <?php udesign_single_post_entry_before(); ?> <div class="entry"> <?php udesign_single_post_entry_top(); the_content(__('<p class="serif">Read the rest of this entry »</p>', 'udesign')); ?> <?php udesign_single_post_entry_bottom(); ?> </div> <?php udesign_single_post_entry_after(); ?> </div> <?php comments_template(); endwhile; else: ?> <p><?php esc_html_e("Sorry, no posts matched your criteria.", 'udesign'); ?></p> <?php endif; ?> <?php udesign_main_content_bottom(); ?> </div><!-- end main-content-padding --> </div><!-- end main-content --> <?php if( ( !$udesign_options['remove_single_sidebar'] == 'yes' ) && sidebar_exist('BlogSidebar') ) { get_sidebar('BlogSidebar'); } ?> </div><!-- end content-container --> <?php endif; // end normal Loop ?> <div class="clear"></div> <?php get_footer();
Please tell me where to paste the code or which sentence should be replaced.
Thanks in advance…
Hur
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Where to put the Shortcode’ is closed to new replies.