New Landing How can we help? Themeforest Theme Support Dante Do not show password protected posts on blog

Viewing 15 posts - 1 through 15 (of 28 total)
  • Posted in: Dante
  • #162218
    Siem43
    Member
    Post count: 40

    Hi,

    how is it possible to set that our blog page is not show password protected posts? (hide them)
    Now, visitors can see posts which are password protected. we need this to send blog post previews to our customers.

    url: http://www.eventinc.de/blog/
    cheers, siem

    Attachments:
    You must be logged in to view attached files.
    #162225
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Did you changed the visibility settings of the posts?
    Can you provide admin access to check it?

    -Rui

    #162231
    Siem43
    Member
    Post count: 40

    Hi,

    yes i changed the visibility settings of the post to “password protected”, beacause i have to send the post to our customers to review it. using “private visibility” isn’t working because the customers do not have a user login.

    #162246
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Can you provide admin access in a private reply? and a blog post example?

    -Rui

    #162291
    Siem43
    Member
    Post count: 40
    This reply has been marked as private.
    #162346
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779
    This reply has been marked as private.
    #162501
    Siem43
    Member
    Post count: 40
    This reply has been marked as private.
    #162506
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please upgrade to latest version of theme and all plugins.
    Thanks
    Mohammad

    #162507
    Siem43
    Member
    Post count: 40

    Thats not possible because we had to fix a lot of SEO issues manually..

    #162515
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I have resolved the issue so please check.
    Thanks
    Mohammad

    #162518
    Siem43
    Member
    Post count: 40
    This reply has been marked as private.
    #162524
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You can update wordpress only.
    Thanks
    Mohammad

    #214490
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code at functions.php file of theme.
    function exclude_protected($where) {
    global $wpdb;
    return $where .= ” AND {$wpdb->posts}.post_password = ” “;
    }

    // Decide where to display them
    function exclude_protected_action($query) {
    if( !is_single() && !is_page() && !is_admin() ) {
    add_filter( ‘posts_where’, ‘exclude_protected’ );
    }
    }

    // Action to queue the filter at the right time
    add_action(‘pre_get_posts’, ‘exclude_protected_action’);

    Thanks
    Mohammad

    #214856
    Siem43
    Member
    Post count: 40

    Hi, thx for your help. I added this code to functions.php form dante, but password protected posts are still shown… siem

    Attachments:
    You must be logged in to view attached files.
    #214858
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please provide me login detail to check and resolve the issue.
    Thanks
    Mohammad

Viewing 15 posts - 1 through 15 (of 28 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register