WordPress.org

Ready to get started?Download WordPress

Forums

Hide TweetMeme Button on front page (2 posts)

  1. eLod
    Member
    Posted 5 years ago #

    to hide tweetmeme button on front page apply this patch to tweetmeme.php:

    *** orig.php    Wed Jun  3 15:37:00 2009
    --- tweetmeme.php       Thu Jun  4 08:18:53 2009
    ***************
    *** 52,57 ****
    --- 52,62 ----
          if (get_option('tm_display_feed') == null && is_feed()) {
              return $content;
          }
    +
    +     //add option to hide button on front page by http://hirszerzes.tengerzoldvaros.hu
    +     if (get_option('tm_display_nofrontpage') == '1' && is_front_page()) {
    +       return $content;
    +     }
    
          // if we have switched the button off
          if (get_post_meta($post->ID, 'tweetmeme') == '') {
    ***************
    *** 179,184 ****
    --- 184,193 ----
                              <input type="checkbox" value="1" <?php if (get_option('tm_display_feed') == '1') echo 'checked="checked"'; ?> name="tm_display_feed" id="tm_display_feed" group="tm_display" />
                              <label for="tm_display_feed">Display the button on your feed</label>
                          </p>
    +                     <p>
    +                         <input type="checkbox" value="1" <?php if (get_option('tm_display_nofrontpage') == '1') echo 'checked="checked"'; ?> name="tm_display_nofrontpage" id="tm_display_nofrontpage" group="tm_display" />
    +                         <label for="tm_display_nofrontpage">Do not display the button on your frontpage</label>
    +                     </p>
                      </td>
                  </tr>
                  <tr>
    ***************
    *** 252,257 ****
    --- 261,267 ----
          add_option('tm_version', 'large');
          add_option('tm_display_page', '1');
          add_option('tm_display_feed', '1');
    +     add_option('tm_display_nofrontpage', '1');
          add_option('tm_ping', 'on');
      }
  2. rhythmdoctor
    Member
    Posted 5 years ago #

    Just add to the bottom? Top?

Topic Closed

This topic has been closed to new replies.

About this Topic