Edit File: index.php
<?php /** * The main template file * * This is the most generic template file in a WordPress theme * and one of the two required files for a theme (the other being style.css). * It is used to display a page when nothing more specific matches a query. * E.g., it puts together the home page when no home.php file exists. * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ * * @package orun */ get_header(); $options = get_option("orun_opt"); $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?> <style> <?php if ( $options['orun-opt-sidebar-main-no'] == true ) { echo '#orun-home-main { -ms-flex: 0 0 66.6667%; flex: 0 0 100%; width: 100%; max-width: 100%; }'; } if ( $options['orun-opt-navbar-excerpt'] == true ) { echo '.orun-pm-excerpt { display: none; }'; } if ( $options['orun-opt-navbar-read'] == true ) { echo '.meta-end { display: none; }'; } if ( $options['orun-opt-meta-onoff'] == true ) { echo '.meta-start { display: none; }'; } if ( $options['orun-opt-meta-onoff'] == true && $options['orun-opt-navbar-read'] == true ) { echo '.orun-pm-meta { display: none; }'; } ?> </style> <?php index_schema(); ?> <main id="primary" class="site-main"> <?php if ( $paged == 1 ) { ?> <?php if (is_active_sidebar('grid-top-fw-widgets')) { ?> <?php } ?> <?php if (is_active_sidebar('grid-widgets')) { ?> <div id="orun-grid-area"> <?php dynamic_sidebar('grid-widgets'); ?> </div> <?php } ?> <?php if (is_active_sidebar('grid-bottom-fw-widgets')) { ?> <div class="orun-fw-widgets"> <div class="container"> <?php dynamic_sidebar('grid-bottom-fw-widgets'); ?> </div> </div> <?php } } ?> <div id="orun-home-area" class="container"> <div class="row"> <div id="orun-home-main"> <?php if( is_active_sidebar('home-widgets') && $paged == 1 ) { dynamic_sidebar('home-widgets'); } ?> <style> .pagination { text-align: center; padding: 10px; } .pagination .page-numbers { border: 1px solid #ccc; padding: 5px 10px; margin: 0 5px; border-radius: 5px; } .pagination .prev, .pagination .next { border: 1px solid #ccc; padding: 5px 10px; margin: 0 5px; border-radius: 5px; } </style> <div class="orun-pm orun-pm-1 row"> <?php if ( have_posts() ) { $args = array( 'paged' => $paged, 'posts_per_page' => get_option( 'posts_per_page' ), ); $orunpmindex = new WP_Query($args); ?> </div> <?php global $wp_query; $big = 999999999; $paginate_links = paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages, 'prev_next' => true, 'prev_text' => __( '<i class="fas fa-angle-left"></i> Önceki', 'orun' ), 'next_text' => __( 'Sonraki <i class="fas fa-angle-right"></i>', 'orun' ), ) ); if ( $paginate_links ) { echo '<div class="pagination">' . $paginate_links . '</div>'; } else { echo esc_html__( 'Üzgünüz yazı bulunamadı.', 'orun' ); } } ?> </div> <?php if ($options['orun-opt-sidebar-main-no'] == false) { get_sidebar(); ?> </div> </div> </main><!-- #main --> <?php get_footer(); } ?>