Title: Andy's Replies | WordPress.org

---

# Andy

  [  ](https://wordpress.org/support/users/andyt81/)

 *   [Profile](https://wordpress.org/support/users/andyt81/)
 *   [Topics Started](https://wordpress.org/support/users/andyt81/topics/)
 *   [Replies Created](https://wordpress.org/support/users/andyt81/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/andyt81/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/andyt81/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/andyt81/engagements/)
 *   [Favorites](https://wordpress.org/support/users/andyt81/favorites/)

 Search replies:

## Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-Polls] How to make a poll page that allows users to vote on all available polls?](https://wordpress.org/support/topic/how-to-make-a-poll-page-that-allows-users-to-vote-on-all-available-polls/)
 *  [Andy](https://wordpress.org/support/users/andyt81/)
 * (@andyt81)
 * [13 years ago](https://wordpress.org/support/topic/how-to-make-a-poll-page-that-allows-users-to-vote-on-all-available-polls/#post-3671679)
 * +1 for this
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Auto Featured Image (Auto Post Thumbnail)] Generate Thumbnails does nothing](https://wordpress.org/support/topic/generate-thumbnails-does-nothing/)
 *  [Andy](https://wordpress.org/support/users/andyt81/)
 * (@andyt81)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/generate-thumbnails-does-nothing/#post-2205175)
 * Does anyone have an update on if this plugin is working?
 * It seems to work when I ‘Generate Thumbnails’ or when I upload images but doesn’t
   work automatically with external images.
 * Any ideas?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Nivo Slider] [Plugin: WP Nivo Slider] Multiple Instances Possible?](https://wordpress.org/support/topic/plugin-wp-nivo-slider-multiple-instances-possible/)
 *  [Andy](https://wordpress.org/support/users/andyt81/)
 * (@andyt81)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-wp-nivo-slider-multiple-instances-possible/#post-1725911)
 * +1 for Multiple Instances
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Automatic Tag Link] [Plugin: Automatic Tag Link] Links are applied in content with %post_tag%](https://wordpress.org/support/topic/plugin-automatic-tag-link-links-are-applied-in-content-with-post_tag/)
 *  [Andy](https://wordpress.org/support/users/andyt81/)
 * (@andyt81)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-automatic-tag-link-links-are-applied-in-content-with-post_tag/#post-1962432)
 * Works prefect…thanks daevisioninc!!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Social Web Links] Use Social Web Links Plugin with Shortcode or Template Tag](https://wordpress.org/support/topic/use-social-web-links-plugin-with-shortcode-or-template-tag/)
 *  Thread Starter [Andy](https://wordpress.org/support/users/andyt81/)
 * (@andyt81)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/use-social-web-links-plugin-with-shortcode-or-template-tag/#post-1871630)
 * I have also tried
 *     ```
       <?php echo do_shortcode("[social-web-links]"); ?>
       <?php echo do_shortcode('[social-web-links-tag]'); ?>
       ```
   
 * but neither work
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Social Web Links] Use Social Web Links Plugin with Shortcode or Template Tag](https://wordpress.org/support/topic/use-social-web-links-plugin-with-shortcode-or-template-tag/)
 *  Thread Starter [Andy](https://wordpress.org/support/users/andyt81/)
 * (@andyt81)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/use-social-web-links-plugin-with-shortcode-or-template-tag/#post-1871629)
 * Thanks
 * How would I call the plugin via php?
 * I have tried both
 * `<?php echo social-web-links(): ?>`
 * and
 * `<?php social-web-links(): ?>`
 * to no luck.
 * Any ideas?
 * Thanks
 * Andy
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [List all posts in current category and group by year](https://wordpress.org/support/topic/list-all-posts-in-current-category-and-group-by-year/)
 *  Thread Starter [Andy](https://wordpress.org/support/users/andyt81/)
 * (@andyt81)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/list-all-posts-in-current-category-and-group-by-year/#post-1981681)
 * Anyone have any ideas on how to limit the posts to one category?
 * Here is the modified plugin code I am using but it pulls all posts from the site
   and I only want one particular category:
 *     ```
       <?php
   
       function favrik_recent_posts($args = '') {
       	global $wp_locale, $wpdb;
   
           // params fun
           parse_str($args, $r);
           $defaults = array('category_name' => 'NTA', 'group' => '1', 'limit' => '10', 'before' => '<li>', 'after' => '</li>', 'show_post_count' => false, 'show_post_date' => true, 'date' => 'F jS, Y', 'order_by' => 'post_date DESC');
       	$r = array_merge($defaults, $r);
       	extract($r);
   
           // output
           $output    = '';
           $pre       = '';
           $full_date = '';
           $year      = '';
           $month     = '';
           $day       = '';
   
       	// the query
       	$where = apply_filters('getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'");
       	$join  = apply_filters('getarchives_join', "");
           $qry   = "SELECT ID, post_date, post_title, post_name
                     FROM $wpdb->posts $join
                     $where ORDER BY $order_by LIMIT $limit";
       	$arcresults = $wpdb->get_results($qry);
       	if ($arcresults) {
       		foreach ($arcresults as $arcresult) {
       			if ($arcresult->post_date != '0000-00-00 00:00:00') {
       				$url  = get_permalink($arcresult);
       				if ($group == 0) { // dates at the side of the post link
                           $arc_date = date($date, strtotime($arcresult->post_date));
                           $full_date = '<em class="date">' . $arc_date . '</em> ';
                       }
                       if ($group == 1) { // grouping by year then month-day
                           $y = date('Y', strtotime($arcresult->post_date));
                           if ($year != $y)  {
                               $year = $y;
                               $pre = '<li class="year">' . $year . '</li>';
                           }
                       }
                       $text = strip_tags(apply_filters('the_title', $arcresult->post_title));
       				$output .= get_archives_link($url, $text, $format,
                                                     $pre . $before . $full_date,
                                                    $after);
                       $pre = ''; $full_date = '';
       			}
       		}
           }
           echo $output;
       }
   
       ?>
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [List all posts in current category and group by year](https://wordpress.org/support/topic/list-all-posts-in-current-category-and-group-by-year/)
 *  Thread Starter [Andy](https://wordpress.org/support/users/andyt81/)
 * (@andyt81)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/list-all-posts-in-current-category-and-group-by-year/#post-1981550)
 * Hey Doc4
 * Thanks for that. After deleting out the day and month from the plugin code it
   does exactly what I want except limit the posts to one category.
 * Do you know how to just show posts from a select category? I tried adding ‘category’
   => ‘nta’ to the array but no luck.
 * Thanks again
 * Andy
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Adding a rel= attribute to a menu link](https://wordpress.org/support/topic/adding-a-rel-attribute-to-a-menu-link/)
 *  [Andy](https://wordpress.org/support/users/andyt81/)
 * (@andyt81)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/adding-a-rel-attribute-to-a-menu-link/#post-1592798)
 * Thanks for that Jack. Just potentially saved me a lot of work!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Get current post slug and display inside query_posts](https://wordpress.org/support/topic/get-current-post-slug-and-display-inside-query_posts/)
 *  Thread Starter [Andy](https://wordpress.org/support/users/andyt81/)
 * (@andyt81)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/get-current-post-slug-and-display-inside-query_posts/#post-1868372)
 * Hey guys thanks for the responses
 * I am running the code on single.php (the default post template)
 * I have gone through and deleted any other custom code and still not having any
   luck
 * I replaced `$post_slug = $post->post_name;` with `$post_slug = str_replace("-","
   +",$post->post_name);` but no luck
 * I then tried this with and without `wp_reset_query();`
 *     ```
       <?php $post_slug = str_replace("-", "+",$post->post_name);
       query_posts( 'tag=' . $post_slug . '');
       if (have_posts()) : while (have_posts()) : the_post(); ?>
       ```
   
 * _[Moderator note: snipped code block, please use the [pastebin](http://wordpress.pastebin.com/)
   as per the [Forum Guidelines](http://codex.wordpress.org/Forum_Welcome)]_

Viewing 10 replies - 1 through 10 (of 10 total)