Home › Forums › Space themes support forum › Sticky Reaveal Footer
Sticky Reaveal Footer
- This topic has 6 replies, 2 voices, and was last updated 4 hours, 18 minutes ago by
sotiris.
-
AuthorPosts
-
February 18, 2025 at 2:18 pm #639029
sotirisParticipantHi,
1.
I want to create a footer reveal on scroll.
In order to do this I need to increase the Z index of the sections of the site. I tried using a negative Z index for the footer but it wont work. Can you instuct me on how to adjust the Z index of sections that are in the shop page i.e. the Ajax shop element?
2. Is there a way to make Ajax shop “ALL” tab display the products in randor order like in the woodmart theme ?
Regards,
SotirisFebruary 18, 2025 at 4:45 pm #639105
Luke NielsenKeymasterHello,
1. You need to use the CSS property Z-Index and put Position different from Static for the desired selector, for example:
.xts-site-content { position: relative; z-index: 2; } .xts-footer { position: relative; z-index: 1; }
2. Rand products:
if ( ! function_exists( 'xts_random_order_for_products' ) ) { function xts_random_order_for_products( $query ) { if ( ! is_admin() && $query->is_main_query() && ( $query->is_post_type_archive( 'product' ) || $query->is_tax( 'product_cat' ) ) ) { $query->set( 'orderby', 'rand' ); } } add_action( 'pre_get_posts', 'xts_random_order_for_products' ) }
Kind Regards
February 24, 2025 at 1:40 pm #640437
sotirisParticipantHi,
2. What is the correct way to add the code, my attempt resulted in complete failure.Regars,
SotirisFebruary 24, 2025 at 1:50 pm #640445
Luke NielsenKeymasterHello,
2. Paste the code to the functions.php file in your child theme.
Kind Regards
February 24, 2025 at 3:14 pm #640498
sotirisParticipantI get a syntax error. Please advice.
Attachments:
You must be logged in to view attached files.February 24, 2025 at 3:57 pm #640542
Luke NielsenKeymasterHello,
After the
add_action( 'pre_get_posts', 'xts_random_order_for_products' )
you need to define;
the semicolon. Then it will work.We have fixed that on your end, so clear the cache and recheck the issue.
Kind Regards
February 24, 2025 at 4:20 pm #640548 -
AuthorPosts
- You must be logged in to create new topics. Login / Register