Tagged: ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #805087

    I have private posts in a category when I choose that category in “Magazine” Nothing appears.

    #805502

    Hey Ssy3,
    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    Login credentials include:

    • The URL to the login screen.
    • A valid username (with full administration capabilities).
    • As well as a password for that username.
    • permission to deactivate plugins if necessary.

    Best regards,
    Nikko

    #806674

    Hello Mr. Nikko,

    Try the following on your Enfold:

    Step 1
    1- Create a new Post.
    2- Assign this post to a category
    3- Change the visibility to “Private”
    4- Click publish
    ———————————-
    Step 2
    1- Create a new post.
    2- Activate the advanced layout editor
    3- Choose Magazine
    4- Inside magazine choose the category with the private post from STEP 1
    5- Click publish
    6- Click view published post

    Do you see the private post on this page?

    #807977

    Hi Ssy3,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #1000096

    Did you find a solution for the problem, because I also want to restrict content via role and in MAGAZINE & MASONRY it doesn’t work out-of-the-box (not even shown when logged in as admin!) ?

    • This reply was modified 6 years, 2 months ago by jobalzer.
    #1000190

    Any help out there?

    #1000688

    Hi jobalzer,

    We did not receive the credentials for you. Did you share them with us?

    Best regards,
    Victoria

    #1003812
    #1004298

    Hi,

    The solution is (at the moment) – add this code to the child theme functions.php file:

    
    add_filter('avia_masonry_entries_query', 'avia_custom_query_extension', 10, 2);
    add_filter('avf_magazine_entries_query', 'avia_custom_query_extension', 10, 2);
    add_filter('avia_blog_post_query', 'avia_custom_query_extension', 10, 2);
    
    function avia_custom_query_extension( $query, $params ) 
    {
    	if(is_user_logged_in()) $query['post_status'] = array('publish','private');
    	return $query;
    }
    

    Then go to the parent theme folder and replace the code in wp-content/enfold/config-templatebuilder/avia-shortcodes/av-helper-masonry.php with the code from here: https://pastebin.com/raw/wApTDxJq and the code in wp-content/enfold/config-templatebuilder/avia-shortcodes/magazine/magazine.php with the code from here: https://pastebin.com/raw/0mWXdRjX

    I explained the changes here: https://kriesi.at/support/topic/private-posts-not-shown-in-masonry-or-magazine/#post-1003722 . We’ll add a filter to these shortcodes files – starting with the next update it should be possible to overwrite the value with a child theme.

    Best regards,
    Dude

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.