• Dear all,

    I would like to now if I can make a if-else statement based on the content of a post.
    For example, if a post contains the word ‘Hidden’ I want to hide the content.
    Like:

    if ( post_contains( 'hidden' ) ) {
    do stuff
    } else {
    do other stuff
    }
    ?>

    Thanks for giving me some directions

  • The topic ‘if-else based on post content’ is closed to new replies.