WordPress.org

Forums

Juiz Last Tweet Widget
[resolved] Add custom archive link inside widget with hook? (5 posts)

  1. Twansparant
    Member
    Posted 1 year ago #

    Hi there,

    Love your plugin, thanks!
    I was wundering if it's possible to insert a custom archive link INSIDE the widget container with a hook? In your example you insert one around the widget, but I really need one inside:

    if( !function_exists('see_more_tweets_on')) {
    	function see_more_tweets_on($tweets_block) {
    		$new_content = '<a href="http://twitter.com/my_username">'.
    		               __('See more tweets on Twitter').
    			       '</a>'.$tweets_block;
    		return $new_content;
    	}
    }
    add_filter('juiz_ltw_content', 'see_more_tweets_on');

    Is there like an juiz_ltw_content_inside equivalant for that?
    Thanks!

    http://wordpress.org/plugins/juiz-last-tweet-widget/

  2. Geoffrey
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    No sorry there is no equivalent for the moment.
    You would like to be able to add a list item for example?
    The container is defined with 'ul' element, tweets inside are 'li' elements (by default)

    Thank you.
    Geoffrey

  3. Twansparant
    Member
    Posted 1 year ago #

    Hi Geoffrey,

    No, ideally I would like a markup similar like this:

    <div class="juiz_last_tweet_inside">
    	<ul class="juiz_last_tweet_tweetlist">
    		<li class="jltw_cached_120s juiz_last_tweet_item jltw_item_first">...</li>
    		<li class="jltw_cached_120s juiz_last_tweet_item jltw_item_2">...</li>
    		<li class="jltw_cached_120s juiz_last_tweet_item jltw_item_last">...</li>
    	</ul>
    	<div class="juiz_last_tweet_footer">
    		<a class="juiz_last_tweet_archivelink" target="_blank" href="http://twitter.com/username">More Tweets</a>
    	</div>
    </div>

    I created a workaround by putting your function directly in my template, but it would be nice to be able to achieve this with the widget and hooks only.

    Thanks, Toine

  4. Geoffrey
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Ok, thank you for this example :)
    You can add directly in the plugin the new hook replacing line 583 and 584 :

    </div>
    ';

    by

    </div>'.
        apply_filters('juiz_ltw_content_inside', '')
    ;

    and use it to do what you want.
    I'll add this hook in the next version.

    Thank you again ;)

  5. Twansparant
    Member
    Posted 1 year ago #

    That would be great, thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Juiz Last Tweet Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic