• Resolved natgo

    (@natgo)


    Hello! the complement is very good. I have a doubt. Create a restriction of a ctp, and it’s fine … but I need to be able to show some fields of that type of post on the home page and when generating a restriction it cancels it in both samples. Is there a possibility to enable it on the homepage and on the page of each post that is restricted? please wait for help, regards

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @natgo

    Are you trying to display the custom post type in a widget list on the homepage?

    Regards,

    Thread Starter natgo

    (@natgo)

    Hello! The type of custom post restricts it well, but part of that content I need to show it on the home page and when placing restriction with the plugin it cancels it in both places … On the home page I use elementor custom skin to display …

    on the other hand, the emails do not reach the members or the administrator email.

    any suggestions?

    thanks

    Thread Starter natgo

    (@natgo)

    Hello, the mails to members now arrive, setting up an smtp. What has not yet arrived is the domain administrator email …

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @natgo

    Have you tried changing the domain administrator email and see if the issue still the same?

    >>Re: post restriction issue
    Does this also restrict the post components in the Elementor?

    Regards,

    Thread Starter natgo

    (@natgo)

    Hello!
    the problem I had with the mails was solved … I changed my mail and now it works.
    The restriction yes, it takes it both in the home page and in the custom post type … and I only need it to restrict in the ctp … I mean?

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @natgo

    You can try adding these filter hooks to display the restricted content:

    
    add_filter("um_restrict_post_thumbnail","__return_true");
    add_filter("um_post_content_restriction_settings","__return_false");
    

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @natgo

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards,

    Thread Starter natgo

    (@natgo)

    Hi! the code is fine! the restriction is canceled in both places (home and page) … is it possible to leave it without restriction in home?
    Could you give them the link of the site?

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @natgo

    If you want to restrict other pages except the homepage, you can try this code snippet:

    if ( is_home() || is_front_page() ) {
      add_filter("um_restrict_post_thumbnail","__return_true");
      add_filter("um_post_content_restriction_settings","__return_false");
    }
    

    Regards,

    Thread Starter natgo

    (@natgo)

    Hello, unfortunately it happens that placing this code continues to restrict all content. I need to be able to visualize a loop generated with a custom skin element, which has restricted information … and the page is restricted for registered users. The custom post type uses the same fields and when you override in the post type, you override it in the loop as well: /

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Custom post type and restricted’ is closed to new replies.