Last active
September 29, 2022 18:29
-
-
Save dcooney/f1729d99f8d053009f24fc372a4af84d to your computer and use it in GitHub Desktop.
ALM GeneratePress Homepage
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 | |
/** | |
* The template for displaying posts within the loop. | |
* | |
* @package GeneratePress | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} | |
?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php generate_do_microdata( 'article' ); ?>> | |
<div class="inside-article"> | |
<?php | |
/** | |
* generate_before_content hook. | |
* | |
* @since 0.1 | |
* | |
* @hooked generate_featured_page_header_inside_single - 10 | |
*/ | |
do_action( 'generate_before_content' ); | |
if ( generate_show_entry_header() ) : | |
?> | |
<header class="entry-header"> | |
<?php | |
/** | |
* generate_before_entry_title hook. | |
* | |
* @since 0.1 | |
*/ | |
do_action( 'generate_before_entry_title' ); | |
if ( generate_show_title() ) { | |
$params = generate_get_the_title_parameters(); | |
the_title( $params['before'], $params['after'] ); | |
} | |
/** | |
* generate_after_entry_title hook. | |
* | |
* @since 0.1 | |
* | |
* @hooked generate_post_meta - 10 | |
*/ | |
do_action( 'generate_after_entry_title' ); | |
?> | |
</header> | |
<?php | |
endif; | |
/** | |
* generate_after_entry_header hook. | |
* | |
* @since 0.1 | |
* | |
* @hooked generate_post_image - 10 | |
*/ | |
do_action( 'generate_after_entry_header' ); | |
?> | |
<div class="entry-summary"<?php echo $itemprop; // phpcs:ignore -- No escaping needed. ?>> | |
<?php the_excerpt(); ?> | |
</div> | |
<?php | |
/** | |
* generate_after_entry_content hook. | |
* | |
* @since 0.1 | |
* | |
* @hooked generate_footer_meta - 10 | |
*/ | |
do_action( 'generate_after_entry_content' ); | |
/** | |
* generate_after_content hook. | |
* | |
* @since 0.1 | |
*/ | |
do_action( 'generate_after_content' ); | |
?> | |
</div> | |
</article> |
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://examples.connekthq.com/generatepress/ | |
/** | |
* 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. | |
* Learn more: http://codex.wordpress.org/Template_Hierarchy | |
* | |
* @package GeneratePress | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} | |
get_header(); ?> | |
<div id="primary" <?php generate_do_element_classes( 'content' ); ?>> | |
<main id="main" <?php generate_do_element_classes( 'main' ); ?>> | |
<?php | |
/** | |
* generate_before_main_content hook. | |
* | |
* @since 0.1 | |
*/ | |
do_action( 'generate_before_main_content' ); | |
if ( generate_has_default_loop() ) { | |
if ( have_posts() ) : | |
while ( have_posts() ) : | |
the_post(); | |
generate_do_template_part( 'index' ); | |
endwhile; | |
/** | |
* generate_after_loop hook. | |
* | |
* @since 2.3 | |
*/ | |
do_action( 'generate_after_loop', 'index' ); | |
else : | |
generate_do_template_part( 'none' ); | |
endif; | |
} | |
echo do_shortcode('[ajax_load_more pause="true"]'); | |
/** | |
* generate_after_main_content hook. | |
* | |
* @since 0.1 | |
*/ | |
do_action( 'generate_after_main_content' ); | |
?> | |
</main> | |
</div> | |
<style> | |
.alm-reveal article{ | |
margin-bottom: 20px; | |
} | |
</style> | |
<?php | |
/** | |
* generate_after_primary_content_area hook. | |
* | |
* @since 2.0 | |
*/ | |
do_action( 'generate_after_primary_content_area' ); | |
generate_construct_sidebars(); | |
get_footer(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment