WordPress.org

Ready to get started?Download WordPress

Forums

'the_content', only in the 'post' page (2 posts)

  1. parsa28
    Member
    Posted 3 years ago #

    Hi there, I intend my plugin to add a piece of code to the end a post only if it's in the single-post page. Not in the home page where a list of posts appear. Using 'the_content' filter, adds the code to the end of the post wherever the post is shown. How do I achieve that ?

    Thanks a lot for your time.

  2. pl4y312
    Member
    Posted 3 years ago #

    use filter function is_home() or is_front_page()

    Regards,
    pl4y312

Topic Closed

This topic has been closed to new replies.

About this Topic