Forum Replies Created
-
AuthorPosts
-
cultivardesignsMember
Thanks, I'm not only trying to display posts, but I want to put page builder content in an area below the posts feed. I would think you would do that with a page template file, but I'm not sure how to get a posts feed that structured like the default?
Ask us about Custom Genesis WordPress Themes
cultivardesignsMemberSo I know I need to make a custom page template, and I know I can use WP_Query($arg) but I can't find how to recreate what Genesis does by default to output what is done on the posts page.
Ask us about Custom Genesis WordPress Themes
cultivardesignsMembercultivardesignsMemberThe Alternative Solution in this post worked: https://wpsites.net/web-design/prevent-genesis-2-0-archives-from-using-first-image-in-content-area-as-featured-image/
function remove_featured_image_archives( $post ) { if( !has_post_thumbnail() ) $post = ''; return $post; } add_filter( 'genesis_pre_get_image', 'remove_featured_image_archives', 10, 3 );
Ask us about Custom Genesis WordPress Themes
cultivardesignsMemberUpdate, I'm using Sample Theme 2.3.0
I also tried the following:
https://gist.github.com/GaryJones/7070243
add_filter( 'genesis_get_image_default_args', 'prefix_stop_auto_featured_image' ); /** * Stop Genesis archives from using first attached image as fallback when no featured image is set. * * @param array $args Default image arguments. * * @return array Amended default image arguments. */ function prefix_stop_auto_featured_image( $args ) { if ( ! isset( $args['context'] ) || 'archive' !== $args['context'] ) return $args; $args['fallback'] = false; return $args; }
Ask us about Custom Genesis WordPress Themes
cultivardesignsMembercultivardesignsMemberFrom Nathan Rice: If you're having the layout issue with 2.2.4, change the following line in lib/functions/layout.php (line 343) to this
$post_id = is_home() ? get_option( 'page_for_posts' ) : null;
This worked for me!
Ask us about Custom Genesis WordPress Themes
cultivardesignsMemberThanks Christoph and Susan! I didn't know about either of those. Hopefully I can get in the FB group, or hear about a solution soon.
Ask us about Custom Genesis WordPress Themes
November 9, 2015 at 3:30 pm in reply to: Filter outputting apostrophes in unicode characters #170600cultivardesignsMemberfunction themeprefix_add_attr( $attributes ) { $attributes['onload'] = '_googWcmGet(\'number\' \'1-555-555-2086\')'; return $attributes; };
I tried escaping them with backslashes and it didn't work either.
& # 3 0 9 i is still being outputted in the source.
Ask us about Custom Genesis WordPress Themes
August 17, 2015 at 10:57 am in reply to: Genesis 2.1.3 – Download failed. couldn't connect to host #162639cultivardesignsMemberWe are having the same issue with all of our clients. Had to update manually.
Ask us about Custom Genesis WordPress Themes
cultivardesignsMembercultivardesignsMemberYeah, widget areas instead of extra menus could be better, but this is just another way of going about it.
I updated the code so that the menus have widget containers above each menu and the logo sits in between.
//Split Header Nav remove_action( 'genesis_after_header', 'genesis_do_nav' ); add_action( 'genesis_before_header', 'genesis_do_nav' ); // For mobile nav add_action( 'init', 'register_left_menu' ); function register_left_menu() { register_nav_menu( 'left-menu' ,__( 'Left Navigation Menu' )); } add_action( 'init', 'register_right_menu' ); function register_right_menu() { register_nav_menu( 'right-menu' ,__( 'Right Navigation Menu' )); } //Split Header Widgets unregister_sidebar( 'header-right' ); genesis_register_sidebar( array( 'id' => 'widget-top-left', 'name' => __( 'Header Top Left', 'wpcultivar' ), 'description' => __( 'Header Top Left', 'wpcultivar' ), ) ); genesis_register_sidebar( array( 'id' => 'widget-top-right', 'name' => __( 'Header Top Right', 'wpcultivar' ), 'description' => __( 'Header Top Right', 'wpcultivar' ), ) ); //Header Markup function split_genesis_do_header() { echo '<div class="header-top-left">'; genesis_widget_area( 'widget-top-left', array( 'before' => '<div class="widget-top-left">', 'after' => '</div>', ) ); wp_nav_menu( array( 'theme_location' => 'left-menu', 'container_class' => 'genesis-left-nav-menu' ) ); echo '</div>'; genesis_markup( array( 'html5' => '<div %s>', 'xhtml' => '<div id="title-area">', 'context' => 'title-area', ) ); do_action( 'genesis_site_title' ); do_action( 'genesis_site_description' ); echo '</div>'; echo '<div class="header-top-right">'; genesis_widget_area( 'widget-top-right', array( 'before' => '<div class="widget-top-right">', 'after' => '</div>', ) ); wp_nav_menu( array( 'theme_location' => 'right-menu', 'container_class' => 'genesis-right-nav-menu' ) ); echo '</div>'; } remove_action( 'genesis_header', 'genesis_do_header' ); add_action( 'genesis_header', 'split_genesis_do_header' );
Ask us about Custom Genesis WordPress Themes
cultivardesignsMemberOh wow, I'm glad I saw this. Hopefully we can make it down as well.
Ask us about Custom Genesis WordPress Themes
February 15, 2015 at 10:58 am in reply to: Loading genesis_footer_creds_text after new widgets #140933cultivardesignsMemberAfter many futile attempts, I'm going with that it isn't possible, and that the credits is poorly implemented and just needs to be removed.
//* Change Credit Text add_filter( 'genesis_footer_creds_text', 'sp_footer_creds_text', 20 ); function sp_footer_creds_text() { echo ''; }
Ask us about Custom Genesis WordPress Themes
February 14, 2015 at 4:54 pm in reply to: Loading genesis_footer_creds_text after new widgets #140872cultivardesignsMemberFebruary 13, 2015 at 5:35 pm in reply to: Loading genesis_footer_creds_text after new widgets #140791cultivardesignsMemberI don't understand why this doesn't work either...
remove_action('genesis_footer', 'genesis_footer_creds_text');
Ask us about Custom Genesis WordPress Themes
cultivardesignsMemberI wasn't trying to remove the site-container class, I was just appending it with another and adding an id of site-container. Here is what the results are:
<div id="site-container" class="site-container intro-effect-fadeout">
Here is what is on my template:
add_filter( 'genesis_attr_site-container', 'aie_attr_content' ); function aie_attr_content( $attr ) { $attr['class'] .= ' intro-effect-fadeout'; return $attr; } add_filter( 'body_class', 'sp_body_class' ); function sp_body_class( $classes ) { $classes[] = 'aie'; return $classes; }
There you have it: how to add classes and ids to site-container
Ask us about Custom Genesis WordPress Themes
cultivardesignsMembergenesis_markup( array( 'html5' => '<div id="site-container" class="site-container intro-effect-push">', 'xhtml' => '<div id="wrap">', ) );
I think this works, although I'm not sure if I am doing this correctly. I get the right output now, but I am running this in my header.php, and I want to use this in my custom template. I wonder if I have to make a separate header, or if I can unload the markup and replace it on the custom template page itself.
Ask us about Custom Genesis WordPress Themes
cultivardesignsMembergenesis_markup( array( 'html5' => '<div id="site-container" %s>', 'xhtml' => '<div id="wrap">', 'context' => 'site-container', ) );
I edited the markup to add the ID to the site-container, but I can't seem to figure out how to add the class.
Ask us about Custom Genesis WordPress Themes
-
AuthorPosts