Home Forums Space themes support forum Sticky Reaveal Footer

Sticky Reaveal Footer

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #639029

    sotiris
    Participant

    Hi,
    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,
    Sotiris

    #639105

    Luke Nielsen
    Keymaster

    Hello,

    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

    #640437

    sotiris
    Participant

    Hi,
    2. What is the correct way to add the code, my attempt resulted in complete failure.

    Regars,
    Sotiris

    #640445

    Luke Nielsen
    Keymaster

    Hello,

    2. Paste the code to the functions.php file in your child theme.

    Kind Regards

    #640498

    sotiris
    Participant

    I get a syntax error. Please advice.

    Attachments:
    You must be logged in to view attached files.
    #640542

    Luke Nielsen
    Keymaster

    Hello,

    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

    #640548

    sotiris
    Participant

    Thanks, it works but I now get duplicates. I purged all from lightspeed, I cleared cache of Chrome and also from Hostinger. Hostinger also has an “no cache preview” function which also has the duplicates problem.

    Attachments:
    You must be logged in to view attached files.
Viewing 7 posts - 1 through 7 (of 7 total)