Forum Replies Created
-
AuthorPosts
-
November 15, 2014 at 3:05 pm in reply to: Exclude Single Post Featured Image From Certain Categories #131657
horizonsofchaos
ParticipantThis is the tutorial of yours I referenced: http://wpsites.net/web-design/display-featured-image-before-or-after-entry-title-on-single-posts-pages/
Here is my functions.php code
<?php //* Start the engine include_once( get_template_directory() . '/lib/init.php' ); //* Child theme (do not remove) define( 'CHILD_THEME_NAME', 'Genesis Sample Theme' ); define( 'CHILD_THEME_URL', 'http://www.studiopress.com/' ); define( 'CHILD_THEME_VERSION', '2.1.2' ); // Child theme library require_once(CHILD_DIR.'/lib/structure/lexicon_post.php'); //* Enqueue Google Fonts add_action( 'wp_enqueue_scripts', 'genesis_sample_google_fonts' ); function genesis_sample_google_fonts() { wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:300,400,700', array(), CHILD_THEME_VERSION ); } //* Add HTML5 markup structure add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) ); //* Add viewport meta tag for mobile browsers add_theme_support( 'genesis-responsive-viewport' ); //* Add support for custom background add_theme_support( 'custom-background' ); //* Add support for 3-column footer widgets add_theme_support( 'genesis-footer-widgets', 3 ); // Add new image sizes add_image_size('Slideshow', 600, 300, TRUE); add_image_size('Small Thumbnail', 70, 70, TRUE); add_image_size('Medium Thumbnail', 250, 166, TRUE); add_image_size('Photos Page Thumbnail', 150, 100, TRUE); // Changing excerpt more add_filter('excerpt_more', 'new_excerpt_more'); function new_excerpt_more($more) { return '…<br /><span class="more-link-wrapper"><a href="'.get_permalink().'" class="more-link">Read More</a></span>'; } // Alter Post Byline remove_action('genesis_before_post_content','genesis_post_info'); add_action('genesis_before_post_content','lexicon_post_info'); // Remove Post Meta remove_action('genesis_after_post_content', 'genesis_post_meta'); //* Enqueue sticky menu script add_action( 'wp_enqueue_scripts', 'sp_enqueue_script' ); function sp_enqueue_script() { wp_enqueue_script( 'sample-sticky-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/sticky-menu.js', array( 'jquery' ), '1.0.0' ); } //* Reposition the secondary navigation menu remove_action( 'genesis_after_header', 'genesis_do_subnav' ); add_action( 'genesis_before', 'genesis_do_subnav' ); //Enables use of images in widget title box function genesis_widget_title( $title ) { if( preg_match( '|^https?://|', $title ) ) return "<img src='{$title}' />"; return $title; } add_filter( 'widget_title', 'genesis_widget_title' ); // Register responsive menu script add_action( 'wp_enqueue_scripts', 'genesis_enqueue_scripts' ); /** * Enqueue responsive javascript * @author Ozzy Rodriguez * @todo Change 'prefix' to your theme's prefix */ function genesis_enqueue_scripts() { wp_enqueue_script( 'genesis-responsive-menu', get_stylesheet_directory_uri() . '/lib/js/responsive-menu.js', array( 'jquery' ), '1.0.0', true ); // Change 'prefix' to your theme's prefix } //Featured Image on Single Post add_action( 'genesis_entry_header', 'single_post_featured_image', 15 ); function single_post_featured_image( ) { if ( ! is_singular( 'post' ) ) return; $img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) ); printf( $img ); } //Featured Image on Category Archive //Home Page News Posts add_action( 'genesis_before', 'child_conditional_actions' ); function child_conditional_actions() { if( is_category( 'photos' ) || is_category( '2015-photos' ) || is_category( '2014-photos' ) || is_category( '2013-photos' ) || is_category( '2012-photos' ) || is_category( '2011-photos' ) || is_category( '2010-photos' ) || is_category( '2009-photos' ) || is_category( '2008-photos' ) || is_category( '2007-photos' ) || is_category( '2006-photos' ) || is_category( '2005-photos' ) || is_category( '2004-photos' ) ) { remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); add_action( 'genesis_entry_content', 'photos_archive_featured_image', 8 ); } } function photos_archive_featured_image() { $img = genesis_get_image( array( 'format' => 'html', 'size' => 'Photos Page Thumbnail', 'attr' => array( 'class' => 'alignleft post-image' ) ) ); printf( $img ); }
horizonsofchaos
ParticipantNevermind. Just realized I wasn't paying attention when I created the folder name for the new theme and I had a space in there. Definitely not one of my brighter moments.
horizonsofchaos
ParticipantSorry to bump a dead post but this is the only one I've found that seems relevant to an issue I'm currently experiencing. I just downloaded the 2.0 beta and sample theme because I wanted to try and start a design for an upcoming website. I created a new folder in my theme's directory, copied the contents of the sample theme to the new folder, and changed the theme name in the style.css. Once I activated the new theme however, the css doesn't load at all. I'm not sure what I'm missing, but I literally only changed the theme name in the css and somehow it no longer works.
horizonsofchaos
ParticipantOkay, I've been playing around with this on my local xampp install to get a feel for it. I'm trying to figure out how I'd like to set things up for this site in particular. What I think I'd like to do is have on the videos page is have it broken up into a few options for the videos. I guess if I could give a visual it would be like this:
2013 Monster Truck Videos | 2012 Monster Truck Videos | 2012 Mud Racing Videos
2011 Monster Truck Videos | 2010 Monster Truck Videos | OtherAnd then have a portfolio like setup for the option itself, so you can view 2013 Monster Truck Video posts under 2013 Monster Truck Videos and so on if that makes any sense. Could I make a 2013 Monster Truck Videos as parent with a custom field to work similar to a blog page so it pulls the child posts for 2013 Monster Truck Videos?
horizonsofchaos
ParticipantI'll give Brian's tutorial a shot and see how that goes. Thank you for the response.
-
AuthorPosts