Forum Replies Created
-
AuthorPosts
-
March 29, 2016 at 9:20 am in reply to: Moving page titles to the main header – but not on the homepage #182455studionooblyMember
Thanks Brad,
I think I just figured it out.
On the homepage I added the following:
add_filter( 'genesis_post_title_text', 'genesis_default_title_new', 10, 3 ); function genesis_default_title_new() { remove_filter( 'genesis_post_title_text', 'genesis_default_title', 10, 3 ); }
And in functions I added:
add_action( 'get_header', 'child_remove_titles' ); function child_remove_titles() { if ( is_singular() ){ remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); add_action( 'genesis_header', 'genesis_do_post_title' ); } }
Your way looks a bit cleaner though, I'll give that a go and let you know how I get on.
Thanks,
studionooblyMemberYou could have left me with my delusions of grandeur and now your Genesis rep in tatters 😉
In any case I'm glad we had the same problem and one of us figured it out, the two titles thing was really starting to grate my nerves.
studionooblyMemberAh, cool that did the trick!
Glad someone isn't a lazy bum (like me) and read through the new version documents.
Thanks!
studionooblyMemberThanks Christoph,
I tried that but it doesn't budge, it might because I added something odd in the functions ages ago and I just haven't found it yet?
Eventually I found this by Bill Erickson
And used CSS to hide the offending title... bit hacky but can't find another way.
August 13, 2015 at 10:29 am in reply to: Move the Site Title to the menu but ot on the front page #162263studionooblyMemberThanks for your help.
It's a nice wee theme especially if your into using Bourbon, Neat.
August 13, 2015 at 10:15 am in reply to: Move the Site Title to the menu but ot on the front page #162261studionooblyMemberAlso I tried your filter that removes the site title from all pages and that worked but I couldn't figure out how to then move it back to the menu http://wpsites.net/web-design/remove-genesis-site-title-conditionally/
August 13, 2015 at 10:12 am in reply to: Move the Site Title to the menu but ot on the front page #162259studionooblyMemberI'm using a customized version of Bourbon Genesis https://github.com/JohnLauber/bourbon-genesis and I can't give out the URL as the dev site is set to private if you PM me I can give you the login details if you need?
studionooblyMemberAfter much banging of head against desk, I found this solution worked for me, I'm not sure if it's the best way of doing it, if anyone has a better idea I'm all ears.
<?php /* Template Name: Custom Page Template */ /* This is the Custom page template */ // force page layout to be content then sidebar add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' ); // remove comments remove_action( 'genesis_comments', 'genesis_do_comments' ); // adding a custom sidebar for this page remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); add_action( 'genesis_sidebar', 'nb_do_sidebar' ); // adding two custom fields before the page content add_action( 'genesis_before_content_sidebar_wrap', 'nb_meta_box_callback' ); if (!function_exists('nb_meta_box_callback')) { function nb_meta_box_callback() { // Grab the metadata from the database $text = get_post_meta( get_the_ID(), '_cmb_text', true ); $textarea = get_post_meta( get_the_ID(), '_cmb_textarea', true ); // spit out the metadata in two custom fields echo '<h1 class="entry-title">' . esc_html( $text ) . '</h1>'; echo '<div class="entry-intro">' . esc_html( $textarea ) . '</div>'; } } // inserting custom page content into genesis template add_action( 'genesis_after_entry', 'nb_custom_page' ); // creating custom page content function nb_custom_page() { ?> <!-- you can place aditional page content here --> <?php } // do genesis genesis(); ?>
July 15, 2015 at 11:53 am in reply to: Layout question – how to get content before content sidebar wrap #159490studionooblyMemberStill haven't figured out how to get the content of a page to be the full width of a page and have a sidebar fit snug underneath (you might want this if you have a metabox or custom field that is under the first block of text and then the sidebar is to the right or left of your metabox or CF) the entry content but on custom post type archive pages if you want the title and introduction text to do that then I used the following:
add_action( 'genesis_meta', 'nb_move_category_title' ); function nb_move_category_title() { // wp_reset_query(); if( is_archive() || is_category() || is_tag() || is_tax() ) { remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_taxonomy_title_description' ); // For Custom Post Types add_filter( 'genesis_cpt_archive_intro_text_output', 'wpautop' ); remove_action( 'genesis_before_loop', 'genesis_do_cpt_archive_title_description' ); add_action( 'genesis_before_content', 'genesis_do_cpt_archive_title_description' ); } }
studionooblyMemberThanks, I started from the Genesis Starter theme as it uses SASS/SCSS and it's quite straight forward to completely (or thereabouts) overwrite/re-style and build on top of.
For my next project I'm going to build from my own starter template which I'm in the middle building now.
studionooblyMemberHi guys thanks for all your feedback, for the time being I'm using the "Genesis Sandbox Featured Content Widget" (thanks Jamie) which works quite nicely but I am worried in case they give up supporting the plugin and then sometime in the future it breaks a clients website.
What do you guys think, should I risk it or persevere with trying to find a code solution?
Maadi, I can post the code here if you want?
studionooblyMemberThank you, yes I'm quite pleased with it especially on mobile, though I may need to put in some media queries to speed up the loading of the background images but yea quite happy and will definitely be using Genesis again.
studionooblyMemberAwesome! that worked for me. Thanks!
-
AuthorPosts