Created
April 8, 2020 11:59
-
-
Save fatihtoprak/b2452b9afc710d9b8b998edb635825bd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php get_header(); ?> | |
| <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); | |
| global $numpages; | |
| global $page; | |
| $featured_img_url = get_the_post_thumbnail_url($post->ID, 'full'); | |
| $is_gallery = $numpages>1 ? true : false; | |
| $ad_format = $is_gallery ? 'gallery' : 'single'; | |
| ?> | |
| <div class="container"> | |
| <div class="row mt-2"> | |
| <div id="content-singular" class="col-12 col-sm-8 mb-1 pt-3"> | |
| <?php echo render_urinix_ad('single_1',true,$ad_format); ?> | |
| <h1><?php the_title(); ?></h1> | |
| <?php echo render_urinix_ad('single_2',true,$ad_format); ?> | |
| <div class="page-content"> | |
| <!--postThumb--> | |
| <?php if(has_post_thumbnail()) { ?> | |
| <?php | |
| if( $page==1 ) | |
| { | |
| echo '<p><img class="img-fluid w-100" src="'.$featured_img_url.'" alt="'.get_the_title().'"></p>'; | |
| } | |
| ?> | |
| <?php } ?> | |
| <!--postThumb--> | |
| <?php echo render_urinix_ad('single_3',true,$ad_format); ?> | |
| <?php the_content(); ?> | |
| <?php echo render_urinix_ad('single_4',true,$ad_format); ?> | |
| <?php if($is_gallery) : | |
| $defaults = | |
| [ | |
| 'before' => '<ul class="pagination pagination-lg pagination justify-content-center pager-singular p-2">', | |
| 'after' => '</ul>', | |
| 'next_or_number' => 'next', | |
| 'separator' => ' ', | |
| 'nextpagelink' => 'SONRAKİ➜', | |
| 'previouspagelink' => '⟵', | |
| 'pagelink' => '%', | |
| 'echo' => 1 | |
| ]; | |
| wp_link_pages($defaults); | |
| echo render_urinix_ad('single_5',true,$ad_format); ?> | |
| <?php endif; ?> | |
| </div> | |
| </div> | |
| <?php get_template_part('template/sidebar') ?> | |
| </div> | |
| </div> | |
| <?php endwhile; else : ?> | |
| <p><?php esc_html_e( 'Sorry, no posts matched your criteria.' ); ?></p> | |
| <?php endif; ?> | |
| <?php get_footer(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment