WordPress.org

Forums

Twitter Widget Pro
[resolved] Remove date and time AND remove links of hastags (6 posts)

  1. Inspired Media
    Member
    Posted 2 years ago #

    Hi there,

    Is it possible to remove the date and time?
    And also, is it possible to NOT have links to the hashtags?

    Thanks!

    http://wordpress.org/extend/plugins/twitter-widget-pro/

  2. Aaron D. Campbell
    Member
    Plugin Author

    Posted 2 years ago #

    To not link the hashtags you'll need some code. You can add it either to your theme's functions.php file or to another plugin.

    function range_no_hashtag_links() {
    	$wpTwitterWidget = wpTwitterWidget::getInstance();
    	remove_filter( 'widget_twitter_content', array( $wpTwitterWidget, 'linkHashtags' ) );
    }
    add_action( 'init', 'range_no_hashtag_links' );

    To hide the date, just use CSS. It can be somewhat theme-dependent, but adding something like this to your theme's style.css file should work:

    .widget_twitter .time-meta {
    	display: none;
    }
  3. Inspired Media
    Member
    Posted 2 years ago #

    Thanks alot Aaron D

    And how about those @account links? How do I remove these?

  4. Aaron D. Campbell
    Member
    Plugin Author

    Posted 2 years ago #

    Just add one more line to that code I gave you:

    function range_no_hashtag_links() {
    	$wpTwitterWidget = wpTwitterWidget::getInstance();
    	remove_filter( 'widget_twitter_content', array( $wpTwitterWidget, 'linkHashtags' ) );
    	remove_filter( 'widget_twitter_content', array( $wpTwitterWidget, 'linkTwitterUsers' ) );
    }
    add_action( 'init', 'range_no_hashtag_links' );
  5. skp87
    Member
    Posted 2 years ago #

    Great Plugin, but little tricky to customize. How can I remove the link from the date?

    Or, how can I link the whole tweet to the post on Twitter and not just the date?

  6. intiii
    Member
    Posted 1 year ago #

    Hi,

    I was looking for the same solution for removing the date from the line. as the customization from the widget or settings doesn't seem to do it.
    But adding this code to the stylesheet does not solve it either.
    this is the website I'm working on:
    http://informationenergy.org/

    I would appreciate your help. Thank you

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Twitter Widget Pro
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic