Conditional Display rule

Support MB Views Conditional Display rule

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31458
    Ole PoetterOle Poetter
    Participant

    Hi,

    in MB Views we can set a location rule to display the template (for example we can define that the template is only display on a single of a custom post type).

    I ther a way to define also a user base logic so we can archive somthing like this:

    "Show View only on single of ctp ="cars" but only if "current user" = "post author"?

    Kind regards,
    Ole

    #31463
    Long NguyenLong Nguyen
    Moderator

    Hi Ole,

    There is no option to show View if the post author is the current user. You can create a condition to check the user and show a template, otherwise, show another template.

    {% if (check current user) %}
        show template A
    {% else %}
        show template B or redirect to a page
    {% endif %}
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.