WordPress.org

Ready to get started?Download WordPress

Forums

Best way to remove Like button from a single page? (4 posts)

  1. Smitherinez
    Member
    Posted 3 years ago #

    What is the best way to remove the like button from a single page? I am using the simple facebook connect plugin and displaying the like button that says, "Be the first of your friends to like this." I'm not great at editing php files, so as much info as possible would be great. Thanks!

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 3 years ago #

    remove_filter('the_content', 'sfc_like_button_automatic', 30);

    Add that into a page template or inside an if (is_page(123)) call somewhere.

  3. Smitherinez
    Member
    Posted 3 years ago #

    Wow, thanks for the lightening fast response! When you say add it "somewhere" where would be the best place to add it? Can I add the if statement to the template for that page so that it will modify only that page, not every page with that template?

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 3 years ago #

    You'd add it wherever it makes the most sense in your setup. If you're using a Page Template just for that Page, then that would be sensible. If not, then inside an if block like that on the main page template would be good. As long as it's before the get_header() call.

Topic Closed

This topic has been closed to new replies.

About this Topic