Andy
Forum Replies Created
-
+1 for this
Forum: Plugins
In reply to: [Auto Featured Image (Auto Post Thumbnail)] Generate Thumbnails does nothingDoes 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
In reply to: [WP Nivo Slider] [Plugin: WP Nivo Slider] Multiple Instances Possible?+1 for Multiple Instances
Works prefect…thanks daevisioninc!!
Forum: Plugins
In reply to: [Social Web Links] Use Social Web Links Plugin with Shortcode or Template TagI have also tried
<?php echo do_shortcode("[social-web-links]"); ?> <?php echo do_shortcode('[social-web-links-tag]'); ?>
but neither work
Forum: Plugins
In reply to: [Social Web Links] Use Social Web Links Plugin with Shortcode or Template TagThanks
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
In reply to: List all posts in current category and group by yearAnyone 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
In reply to: List all posts in current category and group by yearHey 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
In reply to: Adding a rel= attribute to a menu linkThanks for that Jack. Just potentially saved me a lot of work!
Forum: Fixing WordPress
In reply to: Get current post slug and display inside query_postsHey 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 luckI 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 as per the Forum Guidelines]