WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Sociable plugin only on selected pages. (4 posts)

  1. netbuddy34
    Member
    Posted 5 years ago #

    Im using this code to try and get the sociable plugin only on selected pages, but I keep getting an error. Im putting this in page.php template.

    <?php if (is_page(array('Freebies', 'Basic Comparison', 'Advanced Comparison'))) {
    <?php if (function_exists('sociable_html')) {
      echo sociable_html();
    } ?> } ?>

    Not sure what the problem is, my php skills are pretty minimal lol.

  2. netbuddy34
    Member
    Posted 5 years ago #

    still cant get this one to work, just not sure why its throwing an error.

  3. netbuddy34
    Member
    Posted 5 years ago #

    Figured out the solution, just in case it helps anyone here it is.

    <?php if (is_page(array('Freebies', 'Basic Comparison', 'Advanced Comparison'))) : ?>
    <?php if (function_exists('sociable_html')) {
      echo sociable_html();
    } ?>
    <?php else : ?>
    <?php endif; ?>
  4. Joost de Valk
    Member
    Posted 5 years ago #

    In 2.9.3 and up you have the option to disable Sociable on a per post basis

Topic Closed

This topic has been closed to new replies.

About this Topic