Community Forums › Forums › Archived Forums › Design Tips and Tricks › Minimum Add Image to every page on top of Tagline widget?
- This topic has 13 replies, 2 voices, and was last updated 12 years, 5 months ago by
Brad Dalton.
-
AuthorPosts
-
September 20, 2013 at 12:35 pm #63553
moxiegirl
MemberThe slider image shows on top of the tagline widget on the home page, How could you add a different static image to the top of every other page that shows in the same spot?
September 20, 2013 at 4:59 pm #63593Brad Dalton
ParticipantCreate a custom field.
Change the hook position, conditional tag in the code and the field type in the plugin settings to image using this tutorial http://wpsites.net/web-design/add-custom-field-before-sidebar-on-any-post/
September 25, 2013 at 9:29 am #64083moxiegirl
MemberSo the code you put on your site shows:
add_action('genesis_before_sidebar_widget_area', 'wpsites_sidebar_custom_field'); function wpsites_sidebar_custom_field() { if ( is_single() && genesis_get_custom_field('sidebar_custom_field') ) echo '<div class="widget">'. genesis_get_custom_field('sidebar_custom_field') .'</div>'; }I need it to go above the Site Tagline on each page, so I need to change it to:
add_action('genesis_after_header', 'header_image_custom_field'); function header_image_custom_field() { if ( is_single() && genesis_get_custom_field('header_image_custom_field') ) echo '<div class="widget">'. genesis_get_custom_field('header_image_custom_field') .'</div>'; }Is that how I'd do it? I'm working on Minimum Pro.
September 25, 2013 at 11:42 am #64098Brad Dalton
ParticipantWell done!
All you need to do know is create a new custom field and meta box using the ACF plugin and make sure you use exactly the same field name in the plugin settings.
header_image_custom_field
Should image upload in the settings as well.
September 25, 2013 at 8:58 pm #64235moxiegirl
MemberReally? I got it? 😀
So I paste that at the end of the functions.php or do I add it in somewhere else. I don't touch PHP much (as we know it frightens me) and I can't make heads nor tails of the php file rhythm.
September 25, 2013 at 9:06 pm #64236Brad Dalton
ParticipantPlease copy the code and paste it at the end of your child themes functions.php file using a text editor like Notepad++
September 26, 2013 at 9:50 am #64298moxiegirl
MemberI added the code and got the plugin installed, but I must have a setting wrong in the plugin as the image doesn't show up. Could you see what I have wrong?
September 26, 2013 at 12:13 pm #64314Brad Dalton
ParticipantUnder options > style you will need to enable standard meta box and then you can add your image from the meta box from your edit screens which display the box according to your settings for Rules.
September 26, 2013 at 1:41 pm #64351moxiegirl
MemberI have enabled the Standard Meta Box. As before, I have the option to upload an image for those pages where it's enable, but nothing shows up? ::confused::
September 26, 2013 at 2:13 pm #64362Brad Dalton
ParticipantMaybe easier to select the editor as the field type rather than image.
September 26, 2013 at 2:25 pm #64365moxiegirl
MemberThat didn't work either. Seems weird.
September 26, 2013 at 2:28 pm #64367Brad Dalton
ParticipantDid as i tested it.
Field Type* WYSISWG Editor and then add your image to the new editor.
September 26, 2013 at 2:48 pm #64373moxiegirl
MemberI did pick WYSISWG editor and inserted the image. I took screen shots of the back and front end.

September 26, 2013 at 3:00 pm #64377Brad Dalton
Participant -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.