- This topic has 13 replies, 3 voices, and was last updated 6 years ago by Tom.
-
AuthorPosts
-
April 2, 2018 at 2:44 am #538406Daniel
Hi there
i want to show the featured image and sliders before the main menu… so on my homepage i did this with the wp hook in the “before header” section like this
<?php if (is_front_page()) : ?>
[rev_slider alias=”home”]
<?php endif; ?>worked fine… but whats the best way tho show the featured image on all pages before the main menu? I couldnt find this option in the Customizer section so i guess i have to use the header hook as well?
thanks for help
April 2, 2018 at 9:14 am #538795LeoStaffCustomer SupportApril 2, 2018 at 11:23 pm #539356Danielworked π
thanks
April 3, 2018 at 9:01 am #539898LeoStaffCustomer SupportNo problem π
April 5, 2018 at 11:00 am #542203Danielah sorry to bother you again but is there a way to make the featured image parallax?
thanks for help
April 5, 2018 at 5:11 pm #542470LeoStaffCustomer SupportNot unless you use the page header with it: https://docs.generatepress.com/article/page-header-content/#parallax-effect
If you need more info, can you open a new topic?
Thanks!
April 6, 2018 at 4:06 am #542806Danielyeah but this does not work because i use the featured image… the header is below my featured image because of this code
add_action( ‘wp’, ‘tu_move_featured_image’, 60 );
function tu_move_featured_image() {
remove_action( ‘generate_after_header’, ‘generate_blog_single_featured_image’ );
add_action( ‘generate_after_header’, ‘generate_blog_single_featured_image’, 4 );
}So the header section does not really effect my featured image… is there jsut a simple solution to make every featured image parralax?
thanks
April 6, 2018 at 9:34 am #543094TomLead DeveloperLead DeveloperStatic images can’t parallax, only background images can. So you’d have to set up a page header, and have the featured image set as the background image.
April 7, 2018 at 2:37 am #543583Danielok i understand… but how can i place this image obove the main menu like here
http://wordpress-55262-461237.cloudwaysapps.com/schulter/
When i use the head its below the menu…
thanks for help
April 7, 2018 at 11:08 am #543951TomLead DeveloperLead DeveloperWill the image be different on every page, or will it always be the same?
April 8, 2018 at 6:50 am #544395Danielit will be different on every page…
April 8, 2018 at 9:54 am #544611TomLead DeveloperLead DeveloperSo in this case you can use the Page Header module to build an area with a parallax background image: https://docs.generatepress.com/collection/page-header/
Then use this PHP to move it above the menu:
add_action( 'wp', 'tu_move_page_header', 20 ); function tu_move_page_header() { remove_action( 'generate_after_header', 'generate_page_header' ); add_action( 'generate_before_header', 'generate_page_header' ); }
April 8, 2018 at 11:15 am #544659Danielperfect
thanks so much… you’re the best!
April 8, 2018 at 2:24 pm #544778TomLead DeveloperLead DeveloperNo problem π
-
AuthorPosts
- You must be logged in to reply to this topic.