Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @author Sridhar Katakam, https://sridharkatakam.com/
- */
- /*
- Template Name: Latest Full Post
- */
- // Force full width content
- add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
- // Remove default Genesis Loop
- remove_action( 'genesis_loop', 'genesis_do_loop' );
- // Add custom Genesis Loop
- add_action( 'genesis_loop', 'sk_do_loop' );
- /**
- * Outputs a custom loop
- *
- * @global mixed $paged current page number if paginated
- * @return void
- */
- function sk_do_loop() {
- // accepts any wp_query args
- $args = (array(
- 'posts_per_page' => 1
- ));
- genesis_custom_loop( $args );
- }
- // Remove Archive Pagination
- remove_action( 'genesis_after_endwhile', 'genesis_posts_nav' );
- // Force Full Content
- add_filter( 'genesis_pre_get_option_content_archive', 'sk_do_full_content' );
- // Set the content archives to full
- function sk_do_full_content() {
- return 'full';
- }
- add_filter( 'genesis_pre_get_option_content_archive_limit', 'sk_no_content_limit' );
- // Make sure the content limit isn't set
- function sk_no_content_limit() {
- return '0';
- }
- // Remove the post image
- remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
- // Display Genesis Simple Share Buttons
- add_action( 'genesis_entry_content', 'sk_gss_buttons', 7 );
- function sk_gss_buttons() {
- if ( function_exists( 'genesis_share_icon_output' ) ) {
- global $Genesis_Simple_Share;
- genesis_share_icon_output( 'work', $Genesis_Simple_Share->icons );
- }
- }
- genesis();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement