• The website is an online directory, and users can create and manage post from the frontend. All is good, except that users are reporting that they cant erase post from the frontend as they used to do. When a user tries to delete the post, inmediatly they are logged out of their session.

    The website was recently migrated from http to https. I can confirm that the issue does not happen in the http protocol. The script Im using in the delete link is the following:

    /* Delete Post Link Bypassing Trash */
    
    if ( current_user_can( 'delete_posts' ) ) {
    
    $delete_post_link = get_delete_post_link( get_the_ID(), '', true );
    
    if ( ! empty( $delete_post_link ) ) : ?>
    
    <span class="confirmation hide">
    
    <a href="<?php echo esc_url( $delete_post_link ); ?>" class="confirm"><i class="fa fa-check"></i> <?php esc_html_e( 'Confirm', 'framework' ); ?></a>
    
    <a href="#" class="cancel"><i class="fa fa-close"></i> <?php esc_html_e( 'Cancel', 'framework' ); ?></a>
    
    </span>

    The issue happens only when the website is using the https protocol. Users login from an https page. All the website is using https now.

    The page I need help with: [log in to see the link]

  • The topic ‘Users being logged out when trying to delete a post from the frontend’ is closed to new replies.