Forum Replies Created
-
AuthorPosts
-
aschoenbrunMember
Tried it and it worked. Thanks Victor.
aschoenbrunMemberEven if that page has a loop in the content?
aschoenbrunMemberI created a second test page and applied this temlate to it. All that showed was the title of the page (twice). I even tried putting the custom loop code I used for the blog page and nothing changed.
August 12, 2016 at 2:57 pm in reply to: add_action('genesis_before_content_sidebar_wrap ', 'function'); outputting code. #191192aschoenbrunMemberWorks now. I have no idea what did it. I copied and pasted one action to the other, then modified to match original. I added `echo '<p>Hello</p>' to each, then removed. After all said & done, it works. The only thing I can think of is that when I copied the hook text, somehow hidden characters came along. I have no idea why they would though. I use Atom, which, at its core, is a text editor (I believe.). Any insight woudl be appreciated...
Thanks so much Christoph`August 12, 2016 at 2:44 pm in reply to: add_action('genesis_before_content_sidebar_wrap ', 'function'); outputting code. #191191aschoenbrunMember// 1 - Equal Height Element wrapper tops add_action('genesis_before_content_sidebar_wrap ', 'equal_height_content_start'); function equal_height_content_start() { echo '<p>Hello</p>'; } // 2 - Equal Height Element wrapper bottoms add_action('genesis_after_content_sidebar_wrap', 'equal_height_content_end'); function equal_height_content_end() { echo '<p>Hello</p>'; }
Did not work. Must be something wrong with those specifically
August 12, 2016 at 2:41 pm in reply to: add_action('genesis_before_content_sidebar_wrap ', 'function'); outputting code. #191190aschoenbrunMemberDid a test in that MU plugin for the divs:
add_action('genesis_before_content_sidebar_wrap', 'ttg_test'); function ttg_test() { echo '<p>Hello</p>'; }
It worked. So now I'm even more confused
August 12, 2016 at 2:35 pm in reply to: add_action('genesis_before_content_sidebar_wrap ', 'function'); outputting code. #191189aschoenbrunMemberI want to add custom content to this site. I must be going about it wrong, I just dont know how
August 12, 2016 at 2:32 pm in reply to: add_action('genesis_before_content_sidebar_wrap ', 'function'); outputting code. #191186aschoenbrunMemberNothing.
I must say I've been having a lot of trouble hooking and unhooking functions, some of which are essentially simple html. The only success I've had was the first MU plugin I did to replace the site title with the logo.
function framework_header_adjust() { // 1, 2, 3 - Replace name and description with logo remove_action( 'genesis_site_title', 'genesis_seo_site_title' ); remove_action( 'genesis_site_description', 'genesis_seo_site_description' ); add_action('genesis_site_title', 'ttg_logo'); function ttg_logo() { ?> <div id="Logo"> <?php $attachment_id = get_field('Logo', 'options'); $size = "Logo"; $image = wp_get_attachment_image_src( $attachment_id, $size ); // url = $image[0]; // width = $image[1]; // height = $image[2]; ?> <a href="<?php echo esc_url( home_url( '/' ) ); ?>"> <img src="<?php echo $image[0]; ?>" alt="<?php bloginfo('name'); ?>" /> </a> </div> <?php } } add_action('after_setup_theme','framework_header_adjust', 1, 50);
Any subsequent hooking or unhooking has not worked, whether added as an MU plugin or applied straight to the child theme's functions.php. Please note I have been referencing the hooks and actions by searching through the Genesis parent theme folder ans well as by using the Genesis Visual Hook Guide plugin (https://wordpress.org/plugins/genesis-visual-hook-guide/)
August 12, 2016 at 1:49 pm in reply to: add_action('genesis_before_content_sidebar_wrap ', 'function'); outputting code. #191183aschoenbrunMemberThanks for answering, Christoph,
I switch in and out since it's easier for me to code HTML without getting distracted by php. I made the changes anyway to see if that would work:
function framework_content_adjust() { // 1 - Equal Height Element wrapper tops add_action('genesis_before_content_sidebar_wrap ', 'equal_height_content_start'); function equal_height_content_start() { echo '<div id="ContentWrapper"><div id="SidebarBorder"><div id="ContentReplace">'; } // 2 - Equal Height Element wrapper bottoms add_action('genesis_after_content_sidebar_wrap', 'equal_height_content_end'); function equal_height_content_end() { echo '</div></div></div>'; } } add_action('after_setup_theme', 'framework_content_adjust', 2, 50);
Still, the changes are not being reflected.
-
AuthorPosts