Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1395346

    Hello together
    I have installed a new page.
    Link below

    My question: is it possible to show the same slider on the store and shopping cart pages as on the start page?

    thanks in advance
    kind regards
    Franz

    #1395487

    Hey schweg33,

    Thank you for the inquiry.

    Yes, this is possible. First, you have to set the builder to debug mode by adding this code in the functions.php file.

    /**
     * Enable Avia Layout Builder Debug
     * @link http://kriesi.at/documentation/enfold/enable-advanced-layout-builder-debug/
     * 
     * @return string
     */
    function builder_set_debug() 
    {
        return 'debug';
    }
    
    add_action( 'avia_builder_mode', 'builder_set_debug' );
    

    After switching to debug mode, you will have access to the shortcodes field just below the Advance Layout Builder. You can then extract the actual shortcode of the slider from this field and use it to replace the value of the do_shortcode function below.

    // render something after the main container
    add_action( 'ava_after_main_container', 'ava_after_main_container_mod', 10 );
    function ava_after_main_container_mod() {
    	$output  = '';
    	$output .= do_shortcode("PLACE THE SLIDER SHORTCODE HERE");
    	echo $output;
    }
    

    This will render the slider after the main container for every page, so you will have to add a few conditions in order to control the visibility of the slider.

    // https://woocommerce.com/document/conditional-tags/#:~:text=The%20conditional%

    Best regards,
    Ismael

    #1395674

    hello Ismael
    Thank you very much for your introduction:

    I could change the Function.php without problems.

    But after that I don’t know what to do.

    I can’t find this part: the access to the shortcode field ?

    can you give me a look or make a PrintScreen where this field is?

    Thanks in advance
    Friendly greetings
    Franz

    #1395697

    Hello Ishmael
    I have done a test on appointments but it is not displayed like the other sliders.

    Thanks and
    Kind regards
    Franz

    #1395715

    Hi,
    Thanks for the link to your new page, but the code Ismael gave you is for the child theme functions.php, not for a text block on a page:
    Enfold_Support_196.jpeg
    Like this:
    Enfold_Support_198.jpeg
    I added this for you and now the slider shows on your shop page:
    Enfold_Support_200.jpeg
    and your product page:
    Enfold_Support_202.jpeg
    please clear your browser cache and check.

    Best regards,
    Mike

    #1395793

    Hello Mike
    now it looks great

    Now I think I understand how this works

    Is it possible to hide this revSlider on the startpage
    and I can insert another one there, now for example an easy slider, which now comes in second place.

    or is it possible instead of the revslider see below 1
    simply insert an image see path see below 2

    thanks in advance
    Kind regards
    Franz

    #1395897

    Hi,
    I changed your code to this:

    add_action( 'ava_after_main_container', 'ava_after_main_container_mod', 10 );
    function ava_after_main_container_mod() {
    if ( !is_front_page() ) {
    	$output  = '';
    	$output .= do_shortcode('[rev_slider alias="routiers-cvfl"][/rev_slider]');
    	echo $output;
    }
    if ( is_front_page() ) {
    	$output  = '';
    	$output .= do_shortcode("[av_image src='https://routiers-cvfl.li/wp-content/uploads/2023/01/schloss-gutenberg.jpg' attachment='3159' attachment_size='full' copyright='' caption='' image_size='' styling='' align='center' font_size='' overlay_opacity='0.4' overlay_color='#000000' overlay_text_color='#ffffff' animation='no-animation' hover='' appearance='' link='' target='' title_attr='' alt_attr='' img_scrset='' lazy_loading='disabled' id='' custom_class='' template_class='' av_element_hidden_in_editor='0' av_uid='' sc_version='1.0' admin_preview_bg=''][/av_image]");
    	echo $output;
    }
    }

    This shows the slider on all pages except the homepage, on the home page it shows the image you asked for, but it could show a different slider if you wished.

    Best regards,
    Mike

    #1395919

    Hello
    Thanks for your effort
    I think we have misunderstood each other

    On the page home I have inserted an easy slider
    and I want only this slider to be visible.

    but on all other pages the image
    https://routiers-cvfl.li/wp-content/uploads/2023/01/schloss-gutenberg.jpg

    if that works
    thanks and greetings
    Franz

    #1395957

    Hi,
    Thanks, I did misunderstand, so I changed the function to show the image on all pages except the homepage, there you already have your easy slider, I imagine you want to control it on that page.

    Best regards,
    Mike

    #1395965

    Hello Mike many thanks
    Now it works great

    I have now taken another picture.
    I think I just had to change the path.

    thank you
    then you can close the ticket

    kind regards
    Franz

    #1396013

    Hi,
    I checked and your new image looks like it is working correctly.

    Best regards,
    Mike

    #1396026

    Hello Mike

    thanks

    then you can close the ticket

    kind regards
    Franz

    #1396088

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘slider on store like home’ is closed to new replies.