Forums

[Plugin: Featured Tag Widget] Short code for templates please? (2 posts)

  1. houseofstrauss
    Member
    Posted 2 years ago #

    I want to use the widget output in other templates other than sidebar. Can you modify the plugin so that I can use a short code such as
    <?php if ( function_exists('featured_widget') ) { featured_widget(); } ?>

    Many thanks

    http://wordpress.org/extend/plugins/featured-tag-widget/

  2. developer
    Member
    Posted 2 years ago #

    Hi.
    I used this simple loop script i wrote, before I decided to write a full working plugin:

    <?php $posts=query_posts('tag=PUT_YOUR_TAG_NAME_HERE&posts_per_page=NUMBER'); if (have_posts()) : while (have_posts()) : the_post(); ?>
                <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
    	<?php endwhile; else: ?>
      <?php _e('No posts found.'); ?></p>
    <?php endif; ?>

    It does the same things, showing only post titles and links in this example.
    Edit PUT_YOUR_TAG_NAME_HERE and NUMBER to fit your template.

Topic Closed

This topic has been closed to new replies.

About this Topic