• Dear all,

    Posted this question in the plugins and hacks section, but it gets burried there by all the plugin comments.
    Anyway, if someone knows any codex to do this, I’d greatly appreciate it.

    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.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘if-else based on post content’ is closed to new replies.