Skip to:
Content
Pages
Categories
Search
Top
Bottom

Modify activity output in entry.php

Viewing 2 replies - 1 through 2 (of 2 total)

  • Henry Wright
    Moderator

    @henrywright

    You can use the get_post_type() function. For example:

    if ( get_post_type( $post_id ) === 'post' ) {
        // This is a "post" post
    } else {
        // This isn't a "post" post
    }

    It’s also helpful to know the default post type names:

    • post
    • page
    • attachment
    • revision
    • nav_menu_item

    assal0le
    Participant

    @assal0le

    thanks @henrywright that works great as I need 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar