Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to create 'News' overview page in Executive Pro
Tagged: executive pro
- This topic has 6 replies, 4 voices, and was last updated 9 years, 4 months ago by Toon61.
-
AuthorPosts
-
December 13, 2014 at 11:16 am #134465Toon61Member
Hi all,
This might be very obvious to the most of you, but I just don't know where to look for it.
All I want to do is create (a page with) an overview (archive?) of all blog-posts, that only shows the blog's title and maybe the publishing date. And then I want the latest/newest blog post (the first one on the list) to also show an excerpt (or character limited content).
A bit like this (of course the actual page is a bit longer):
Any idea someone?
December 14, 2014 at 12:07 pm #134510arushMemberHi,
You'll need to create a custom archive for this, as well as use a custom loop and add some code to your functions.php to control the excerpt length and which post it shows for. If you're not comfortable making the code adjustments yourself, you may want to look into hiring out the work.
Hope this helps,
Amanda
December 14, 2014 at 3:24 pm #134527anotherusernameParticipantJust thinking out loud here...
wondering if he could "hide" the excerpt and other things using CSS???
December 15, 2014 at 3:09 am #134564Toon61MemberActually, I was already thinking in that direction (using CSS to hide things), but I think a custom archive is more the way to go and in the end more flexible.
December 15, 2014 at 3:22 am #134565Genesis DeveloperMemberare you using "Blog" Template for this listing? Or you're wanting completely new page template for it?
display:none;
will be bad idea. I think it.
December 15, 2014 at 3:48 am #134567Genesis DeveloperMembercreate a new file page_blog.php file and put the following code:
<?php /** * Genesis Framework. * * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances. * Please do all modifications in the form of a child theme. * * @package Genesis\Templates * @author StudioPress * @license GPL-2.0+ * @link http://my.studiopress.com/themes/genesis/ */ //* Template Name: Blog //* The blog page loop logic is located in lib/structure/loops.php add_action('genesis_before_entry', 'custom_archive_page', 5); add_filter('genesis_post_info', 'custom_post_info'); function custom_post_info($post_info){ return '[post_date format="d-m-Y"]'; } function custom_archive_page(){ global $wp_query, $loop_counter; if ( $wp_query->current_post > 0 ) remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 ); remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 ); remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); } genesis();
I started the code this way. But you can modify it.
December 15, 2014 at 4:11 am #134569Toon61MemberGenwrock,
This is exactly what I need. Thank you so much!
I also want to limit how much of the content is displayed (100 or 200 characters followed by a 'Continue reading...'). -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.