• Resolved pinokio

    (@lapanwebsite)


    How do I add pagination inside one div block. I did many changes so I can’t explain everything.
    My posts are horizontal not vertical in category archive.

    All I need is to force pagination in new row, so I have to soround this fuction by one div class:

    function mh_pagination() {
    		global $wp_query;
    	    $big = 9999;
    		echo paginate_links(array(
    				'base' 		=> str_replace($big, '%#%', esc_url(get_pagenum_link($big))),
    				'format' 	=> '?paged=%#%',
    				'current' 	=> max(1, get_query_var('paged')),
    				'prev_next'	=> true,
    				'prev_text'	=> __('?', 'mh'),
    				'next_text' => __('?', 'mh'),
    				'total' 	=> $wp_query->max_num_pages
    		));
    	}
    }

    How to soround “paginate_links” by <div class=""paginate_links">Here is pagination content</div>

    Now it is inside section class and messing up my content, I tried with many css things neither work, only this is solution.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi LapanWebsite,

    you will have to do it like this:

    <div class="paginate_links"><?php mh_pagination(); ?></div>

    Regards
    Michael

    Thread Starter pinokio

    (@lapanwebsite)

    Thanks.
    Actually I couldn’t find what’s function and where.

    Child theme category.php:

    if (have_posts()) {
    				while (have_posts()) : the_post();
    					get_template_part('content', get_post_format());
    				endwhile;
    				echo '<div style="float: left; clear: both;">';
    				echo mh_pagination();
    				echo '</div>';
    			} else {
    				get_template_part('content', 'none');
    			}

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pagination?’ is closed to new replies.