Community Forums › Forums › Design Tips and Tricks › Customize blog listings
This topic contains 2 replies, has 2 voices, and was last updated by ZeroGravity 1 month, 3 weeks ago.
-
AuthorPosts
-
March 19, 2013 at 1:36 pm #29475
I am applying some custom settings to the blog listings (category, author, tags, date etc.) and I’m sure there must be an easier way to do it. I have created a file blog-settings.php and have included it respective php files. eg. category.php, author.php etc.
<?php/*
* Settings to customise category pages.
*/// Custom blog settings for the Travel Journal
include_once( ‘blog-settings.php’ );genesis();
?>
Any suggestions would be appreciated.
Darren Burns
Zero Gravity Web WorksMarch 20, 2013 at 2:34 am #29638There’s a few plugins which help you do this: http://wordpress.org/extend/plugins/post-types-order/
Can you please be more specific with what you want to do.
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.March 25, 2013 at 4:06 pm #31189Thanks for your reply Brad, sorry I haven’t go back to you before now. I am trying to use as few plugins as possible. This is the code I have in blog-settings.php.
/* * Settings to customise the blog and archive pages. */ // Add Content (excerpt) for the posts in this Page Template remove_action('genesis_post_content', 'genesis_do_post_content'); add_action('genesis_post_content', 'mmttj_do_post_content'); function mmttj_do_post_content() { the_excerpt(); } // Add Featured Image for the posts in this Page Template remove_action('genesis_post_content', 'genesis_do_post_image'); add_action('genesis_post_content', 'mmttj_do_post_image', 7); function mmttj_do_post_image() { $img = genesis_get_image( array( 'format' => 'html', 'size' => 'thumbnail', 'attr' => array( 'class' => 'alignleft post-image' ) ) ); printf( '<a href="%s" title="%s">%s</a>', get_permalink(), the_title_attribute('echo=0'), $img ); } // Add read more link after excerpt add_filter('the_excerpt', 'excerpt_read_more_link'); function excerpt_read_more_link($output) { global $post; return $output . '[<a href="'. get_permalink($post->ID) . '">Continue Reading…</a>]'; } // Modify length of post excerpts add_filter('excerpt_length', 'mmttj_excerpt_length'); function mmttj_excerpt_length($length) { return 100; // pull first 100 words } // Set page navigation to numeric remove_action( 'genesis_after_endwhile', 'genesis_posts_nav' ); add_action( 'genesis_after_endwhile', 'mmttj_posts_nav' ); function mmttj_posts_nav() { genesis_numeric_posts_nav(); }
Darren Burns
Zero Gravity Web Works -
AuthorPosts
You must be logged in to reply to this topic.