Pagination post with ajax in one page navigation

Good Morning,

it is possible to perform the page paging with ajax in one page navigation.

I have included in the file of functions.php the code that I found in another post, but the navigation takes you to the posts file, what I want is that the posts can be seen from the homepage.

function x_entry_navigation() {

$stack = x_get_stack();

if ( $stack == 'integrity' ) {
	$left_icon  = '<i class="x-icon-chevron-left" data-x-icon=""></i>';
	$right_icon = '<i class="x-icon-chevron-right" data-x-icon=""></i>';
} else {
	$left_icon  = '<i class="x-icon-arrow-left" data-x-icon=""></i>';
	$right_icon = '<i class="x-icon-arrow-right" data-x-icon=""></i>';
}

$is_ltr    = ! is_rtl();
$prev_post = get_adjacent_post( true, '', false );
$next_post = get_adjacent_post( true, '', true );
$prev_icon = ( $is_ltr ) ? $left_icon : $right_icon;
$next_icon = ( $is_ltr ) ? $right_icon : $left_icon;

?>

<div class="x-nav-articles">

	<?php if ( $prev_post ) : ?>
		<a href="<?php echo get_permalink( $prev_post ); ?>" title="<?php __( 'Previous Post', '__x__' ); ?>" class="prev">
			<?php echo $prev_icon; ?>
		</a>
	<?php endif; ?>

	<?php if ( $next_post ) : ?>
		<a href="<?php echo get_permalink( $next_post ); ?>" title="<?php __( 'Next Post', '__x__' ); ?>" class="next">
			<?php echo $next_icon; ?>
		</a>
	<?php endif; ?>

</div>

<?php

thanks

Hello Mauro,

Thanks for writing in! It looks like you are trying to add the pagination with the recent post element and regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.

Thanks for understanding. Take care!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.