Created
January 8, 2017 19:44
-
-
Save ziemekpr0/80a8e1d0715516b47df0efed2b1667a3 to your computer and use it in GitHub Desktop.
Dennito v3
This file contains 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 global $theme; get_header(); ?> | |
<div id="main"> | |
<?php $theme->hook('main_before'); ?> | |
<div id="content"> | |
<?php $theme->hook('content_before'); ?> | |
<?php | |
$is_post_wrap = 0; | |
if (have_posts()) : while (have_posts()) : the_post(); | |
/** | |
* The default post formatting from the post.php template file will be used. | |
* If you want to customize the post formatting for your homepage: | |
* | |
* - Create a new file: post-homepage.php | |
* - Copy/Paste the content of post.php to post-homepage.php | |
* - Edit and customize the post-homepage.php file for your needs. | |
* | |
* Learn more about the get_template_part() function: http://codex.wordpress.org/Function_Reference/get_template_part | |
*/ | |
$is_post_wrap++; | |
if($is_post_wrap & 1) { | |
?><div class="post-wrap clearfix"><?php | |
} | |
get_template_part('post', 'homepage'); | |
if(!($is_post_wrap & 1)) { | |
?></div><?php | |
} | |
if($is_post_wrap == 2 ) { ?> | |
<div class="post-wrap clearfix"> | |
<div <?php post_class('post clearfix'); ?> id="post-<?php the_ID(); ?>" style="padding-bottom:15px;"> | |
<h2 class="title">Reklama:</h2> | |
[Tutaj dodaj kod reklamy] | |
</div> | |
</div> | |
<?php | |
if(!($is_post_wrap & 1)) { | |
?></div><div class="post-wrap clearfix"> <?php | |
} | |
$is_post_wrap++; | |
} | |
endwhile; | |
else : | |
get_template_part('post', 'noresults'); | |
endif; | |
if($is_post_wrap & 1) { | |
?></div><?php | |
} | |
get_template_part('navigation'); | |
?> | |
<?php $theme->hook('content_after'); ?> | |
</div><!-- #content --> | |
<?php get_sidebars(); ?> | |
<?php $theme->hook('main_after'); ?> | |
</div><!-- #main --> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment