Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1348756
    MIGELANDREY
    Participant

    Shortcode
    [estimation_form form_id=”4″]

    http://vip-m-stroi.ru/?lfb_action=preview&form=4

    #1348759
    MIGELANDREY
    Participant

    Yes, this is my e-mail, try put the your – test, I do not mind.
    Page 1Joao1 – for you.

    #1349188
    Rad
    Moderator
    This reply has been marked as private.
    #1349334
    MIGELANDREY
    Participant

    Hi, I come to the post office as an administrator, when I write. If you put your e-mail and write as a guest, you do not get a resume. Do not come if you write as a guest. I can not set up a true test functions.php? I have been there, too, there is an error. I created a new topic for this error https://community.theme.co/forums/topic/functions-php-i-can-not-properly-do-not-know/

    #1349345
    MIGELANDREY
    Participant

    2)The corrected translation

    Hello! me a came to the post office as an administrator, when I write. If you put your e-mail and write as a guest, you do not get a resume. Do not comes to If to write as a guest. Maybe I not tuned pravelno functions.php? I have been thereis also there is an error. I created a new topic for this error https://community.theme.co/forums/topic/functions-php-i-can-not-properly-do-not-know/

    #1349855
    Rad
    Moderator

    Hi there,

    I still don’t understand. I logged in as admin too, using the same credentials you provided. Would you mind providing a visual guide like a presentation of the process and issues? And what resume?

    Thanks.

    #1350204
    MIGELANDREY
    Participant

    1) You have to change my on your email.
    2) Exit and fill in the form as a guest, you do not get a summary. It does not work on the buyer, you will not see of his at the post office form Filled summary

    #1350205
    MIGELANDREY
    Participant

    In the video I do 2 browser, one guest of another administrator

    #1350357
    Rad
    Moderator

    Hi there,

    1. I did, which is why I got emails.

    2. I see it’s not working if the user is a guest. It’s not a bug but due to your site’s customization that limits the processing for administrator only. I traced it and the result is redirected to the home page when AJAX is requested. Please disable all your customization and test it again.

    But try this one,

    function wph_noadmin() {
    
        if ( wp_doing_ajax() ) return true;
    
        if ( is_admin() && !current_user_can('administrator') ) {
            wp_redirect( home_url() );
            exit;
        }
    
    }
    add_action('init', 'wph_noadmin'); 

    Thanks.

    #1350482
    MIGELANDREY
    Participant

    The code I want to hide the admin panel fully of registered users can be code is not true test? Or I not correctly placed it?

    https://vk.com/doc186134011_441712908?hash=34e4e6a4bd84560148&dl=4438dcdfa29488da49

    #1350485
    MIGELANDREY
    Participant

    I understood – a problem in a children theme, not is put the code like pravelno to put it? It does not work because of this all the problems

    #1350489
    MIGELANDREY
    Participant

    //запрет доступа к админке start
    function wph_noadmin() {
    if (is_admin() && !current_user_can(‘administrator’) && wp_doing_ajax() ) {
    wp_redirect(home_url());
    exit;
    } }
    add_action(‘init’, ‘wph_noadmin’);
    //запрет доступа к админке end

    //скрытие панели для всех кроме админов start
    function wph_del_toolbar($content) {
    return (current_user_can(“administrator”)) ? $content : false;
    }
    add_filter(‘show_admin_bar’ , ‘wph_del_toolbar’);
    //скрытие панели для всех кроме админов end

    #1350490
    MIGELANDREY
    Participant

    The error in the code, or have it install

    #1350537
    Rad
    Moderator

    Hi there,

    I implemented the fix from the video I provided from your other thread. Please check the form again after clearing your browser cache. All these ajax issue are related to the same custom code.

    It’s just changing this line

    if (is_admin() && !current_user_can('administrator') && wp_doing_ajax() ) {

    to this

    if( wp_doing_ajax() ) return true;
    if (is_admin() && !current_user_can('administrator') ) {

    Thanks.

    #1350576
    MIGELANDREY
    Participant

    Hooray ! Thanks – found)

  • <script> jQuery(function($){ $("#no-reply-1344420 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>