Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #1426832

    Hello everyone
    I have on the homepage link 01 below

    and made a password protected page
    is it possible to insert a slider on this page above and on this page link 02 below:

    and also under pASsword input and send
    to enter a text.

    thanks
    kind regards Franz

    #1426875

    Hey schweg33,

    Thank you for the inquiry.

    Are you trying to edit the password protected page? If so, try to add this filter in the functions.php file and add your own modifications.

    function avf_custom_password_form()
    {
        global $post;
        $label = 'pwbox-' . ( empty( $post->ID ) ? rand() : $post->ID );
        $output = '
        <div class="boldgrid-section">
            <div class="container">
                <div class="av-more-info">More info here</div>
                <form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" class="form-inline post-password-form" method="post">
                    <p>' . __( 'This content is password protected. This is a custom message. To view it please enter your password below:' ) . '</p>
                    <label for="' . $label . '">' . __( 'Password:' ) . ' <input name="post_password" id="' . $label . '" type="password" size="20" class="form-control" /></label><button type="submit" name="Submit" class="button-primary">' . esc_attr_x( 'Enter', 'post password form' ) . '</button>
                </form>
            </div>
        </div>';
        return $output;
    }
    add_filter('the_password_form', 'avf_custom_password_form', 99);
    

    If you want to add a slider, try setting the builder to debug mode so that you can extract the shortcode of a builder element from one of your pages.

    // https://kriesi.at/documentation/enfold/intro-to-layout-builder/#debug-mode

    Best regards,
    Ismael

    #1426922

    Thank you very much
    Ismael
    thanks to you I managed to do the text

    unfortunately I can’t manage with the slider.

    Thank you
    and greetings
    Franz

    #1427056

    Hi,
    Thank you for your patience, I tried to add your slider to the top of your page with a function at the bottom of your functions.php but it caused an error and the theme editor would not let me remove the code. Please include FTP access to your site so I can correct and try again with some new code.
    I had tested my code on my demo site first and it worked but it caused an error on your site, so I must of made an error, sorry.

    Best regards,
    Mike

    #1427073

    Thanks Mike
    Attached the login data

    #1427074

    Hi,
    Thank you, I corrected the code to show your Slider Revolution slider from the page that you linked to by injecting the slider shortcode [rev_slider alias="dorfgeschichte-doppel"][/rev_slider] above the password field on the password protected page.
    I added this code your your child theme functions.php

    add_action( 'ava_after_main_container', 'ava_after_main_container_mod', 10 );
    function ava_after_main_container_mod() {
    if ( is_page(2959) ) {
    	echo do_shortcode('[rev_slider alias="dorfgeschichte-doppel"][/rev_slider]');
    }
    }
    

    Please check

    Best regards,
    Mike

    #1427076

    Hello Mike super
    many thanks
    Works really great

    Only afterwards on the opened page

    do I see the slider 2 times?

    #1427077

    Hi,
    Try removing the slider element in the page and leave the code in the functions.php

    Best regards,
    Mike

    #1427078

    Sorry Mike
    it all fits
    have looked again

    the slider on the page must then be deleted.

    you can close this request

    thanks
    kind regards Franz

    #1427080

    Hello Mike
    now me again
    if I also want to insert the second page
    an error occurs
    below the code
    greetings Franz
    many thanks

    There was a critical error on your website.

    #1427081

    Fehler-Details
    ==============
    Ein Fehler vom Typ E_COMPILE_ERROR wurde in der Zeile 75 der Datei /home/httpd/vhosts/dorfgeschichte.li/httpdocs/wp-content/themes/enfold-child/functions.php verursacht. Fehlermeldung: Cannot redeclare ava_after_main_container_mod() (previously declared in /home/httpd/vhosts/dorfgeschichte.li/httpdocs/wp-content/themes/enfold-child/functions.php:66)

    #1427082

    Hi,
    This is because you can not use the same name for the function twice, so for two different slides on two different pages try this code in your child theme functions.php

    add_action( 'ava_after_main_container', 'rev_slider_one', 10 );
    function rev_slider_one() {
    if ( is_page(15240) ) {
    echo do_shortcode('[rev_slider alias="bereich-vorstand"][/rev_slider]');
    }
    }
    add_action( 'ava_after_main_container', 'rev_slider_two', 10 );
    function rev_slider_two() {
    if ( is_page(2959) ) {
    echo do_shortcode('[rev_slider alias="bereich-mitglieder"][/rev_slider]');
    }
    }

    Note that I changed ava_after_main_container_mod in 2 places for each snippet to
    rev_slider_one
    rev_slider_two

    So if you want to copy this for a third slider on a third page you could name it
    rev_slider_three
    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.

    Best regards,
    Mike

    #1427107

    thanks mike
    so it fits great
    with 2 different functions

    I still tried to make titles colored here
    that does not work
    see below

    thanks
    kind regards
    Franz

    #1427109

    if both sliders are determined by their alias – you can try that with one function too. Both i guess will work:

    
    add_action( 'ava_after_main_container', 'rev_slider_mod', 10 );
    function rev_slider_mod() {
    	if ( is_page(15240) ) {
    		echo do_shortcode('[rev_slider alias="bereich-vorstand"][/rev_slider]');
    	}
    	if ( is_page(2959) ) {
    		echo do_shortcode('[rev_slider alias="bereich-mitglieder"][/rev_slider]');
    	}
    }

    for color try in quick css:

    #top .rs-parallax-wrap .rs-layer {
      color:  yellow !important;
    }
    #1427115

    Thank you Guenni007
    for your feedback
    everything is working fine

    with the color i don’t mean the color in the slider

    sondern die farbe in der meldung aus der function.php

    <div class=”av-more-info”><span style=”font-size: 14pt; color: ##0097d2;”>Dorfgeschichte Eschnen Nendeln</span></div>

    link: https://dorfgeschichte.li/interner-bereich/

    #1427122

    Hi,
    Your color has two hashtags, try removing one of them
    change: color: ##0097d2;
    to: color: #0097d2;

    Best regards,
    Mike

    #1427126

    Thank you Mike and Guienna 07
    It all fits perfectly now

    Always great support!

    You can close this request

    kind regards
    Francis

Viewing 17 posts - 1 through 17 (of 17 total)
  • The topic ‘slider above the password entry?’ is closed to new replies.