Created
July 26, 2016 06:19
-
-
Save MatRouault/703e1a7f709d992a63770a7cad3f7113 to your computer and use it in GitHub Desktop.
Replace the entire loop with your own and use Beans post fragment functions in your HTML
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 | |
//*https://community.getbeans.io/discussion/customize-post-view-on-index-php/#post-1737 | |
beans_modify_action_callback( 'beans_loop_template', 'example_loop' ); | |
function example_loop() { | |
if ( have_posts() && !is_404() ) : while ( have_posts() ) : the_post(); ?> | |
<article> | |
<header> | |
<?php | |
beans_post_title(); | |
beans_post_meta(); | |
?> | |
</header> | |
<div> | |
<?php beans_post_content(); ?> | |
</div> | |
</article> | |
<?php endwhile; else : ?> | |
<div class="uk-alert">No Posts</div> | |
<?php endif; | |
// Display posts pagination. | |
beans_posts_pagination(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment