Forum Replies Created
-
AuthorPosts
-
angewi
MemberThanks;
dev.assetguardian.com
angewi
MemberGot it completed and it's working nicely.
1. Made two new page templates, one for each division.
2. Made two functions, just amended the one above to look at the page template and if for division A returns division A logo, the second function looks and if for division B returns B logo
3. Used the stylesheet to float it right so it appears very nicely on the page.I should use an if, else if, else coding to put my two functions into one, but that's for another day 🙂
angewi
MemberAn update, sorry it took so long!
Thanks to Braddalton for getting me a big step ahead. I used the code suggested with a slight change to only show the image on specific pages.
function wpsites_image_before_title() { if(is_page( array( 8, 10, 18 ) )) echo ' <div class="header-banner"><img alt="" src="image url alt=" /></div> '; } add_action('genesis_before_post_title', 'wpsites_image_before_title');
My next steps is to right align the image and get this to include an "or" so it shows a different image on the second division's pages.
angewi
MemberHi Braddalton, yes I'm happy when adding images in posts. For these pages we'd wanted to get the logo for each division shown above the page content and page title, but not be the header as the company logo will be shown then.
The hook location I was focusing on was “genesis_before_post_title”.
angewi
MemberAh brilliant, thank you Braddalton.
The site header banner will stay the same, so I am looking to use the “genesis_before_post_title” hook to have the image displayed.
An example can be seen on this page - http://www.webexit.co.uk/angepp/division-a/. I need to right align the image, but it sits in the right location - just above the page title)
So for the page Division B and all their child pages, I'll use the featured image with division A's logo
For the page Division B and all their child pages, I'll show division B's logo
Does this explain things more clearly?
-
AuthorPosts