yashmistrey
Forum Replies Created
-
Forum: Plugins
In reply to: WordPress Social Login : Twitter Authentification failedjlnd thanks i fixed it.
thanks a lotForum: Plugins
In reply to: [Plugin: GD Star Rating] unused cssi fixed this i have now clean 70% of unused css style
open wp-content/plugins/gd-star-rating/css/gdsr.css.php
find $type == “s”
and replace this code
if ($type == "s") { $folders[] = substr($r, 3); $sets[] = $set;
with this one
if ($type == "s") { if ($set['folder'] == 'Classical') { $folders[] = substr($r, 3); $sets[] = $set; }
i am using “Classical” set, depend which set are you using e.g.
soft, Star Rating,Crystal, Darkness etc.now find this
echo "/* stars sizes: ".join(", ", $sizes) ." */\r\n";
add this code just before above code
$sizes = array(16, 24); $sizes = array(); $folders = array();
now i cleaned up arrays with stars and restricted array with sizes to our actually used (16 and 24).
i cleaned upto 30kb of unused css style
hope it’ll help
—sorry for poor English
Forum: Fixing WordPress
In reply to: Automatic insertion of wp-includes/js/l10n.jsjust add
<?php wp_deregister_script('l10n');?>
in headForum: Fixing WordPress
In reply to: how to create separate page for all comments list ?i got it thanks that was in my page template
Forum: Fixing WordPress
In reply to: how to create separate page for all comments list ?dear friend i am not smart in php if you can explain bit
Forum: Fixing WordPress
In reply to: exclude category from related postsr u there frnd
Forum: Fixing WordPress
In reply to: exclude category from related postsi got another code but
dont know how to exclude cat
function dt_related_posts($args = '') { global $post, $news; if ($news['related'] == 1) { // extract args $defaults = array( 'news_heading' => sprintf(__('More on %s','news'), dt_get_category(false)), 'photo_heading' => __('More Photo Galleries','news'), 'video_heading' => __('Watch More Videos','news'), 'showposts' => $news['related_num'], 'imagewidth' => 200, 'imageheight' => 140 ); // simplify vars $r = wp_parse_args( $args, $defaults ); $news_heading = $r['news_heading']; $photo_heading = $r['photo_heading']; $video_heading = $r['video_heading']; $showposts = $r['showposts']; $imagewidth = $r['imagewidth']; $imageheight = $r['imageheight']; // get current post category ID $CatListArray = wp_get_post_categories($post->ID); $current_cat = $CatListArray[0]; // set current post ID to var $current_post = $post->ID; // get current post content type if (get_post_meta($post->ID, 'slideshow')) $content_type = 2; elseif (get_post_meta($post->ID, 'video')) $content_type = 3; else $content_type = 1; // build the relatd content query $display = new WP_query(); if ($content_type == 1) $display->query(array('showposts' => $showposts, 'orderby' => 'rand', 'cat' => $current_cat, 'post__not_in' => array($current_post))); if ($content_type == 2) $display->query(array('showposts' => $showposts, 'orderby' => 'rand', 'meta_key' => 'slideshow', 'post__not_in' => array($current_post))); if ($content_type == 3) $display->query(array('showposts' => $showposts, 'orderby' => 'rand', 'meta_key' => 'video', 'post__not_in' => array($current_post))); global $wp_query; $wp_query->in_the_loop = true; // display results if ($display->have_posts()) : echo '<div class="related">'; echo '<div class="related_header">'; if ($content_type == 2) echo $photo_heading; elseif ($content_type == 3) echo $video_heading; else echo $news_heading; echo '</div>'; $i = 0; while ($display->have_posts()) : $display->the_post(); $i++; if ($i <= 3) { // put them in big thumbs echo '<div class="related_big">'; dt_thumb('width='.$imagewidth.'&height='.$imageheight); echo '<div class="related_title"><a href="'.get_permalink($post->ID).'" title="'.get_the_title().'">'; if ($content_type == 1) dt_posttype(); the_title(); echo '</a>'; if ($content_type == 2) dt_photos_number('show_tag=false'); echo '</div>'; echo '</div>'; } if ($i == 3) echo '<div class="clear"></div><div class="related_s"></div>'; // cut after the first 3 items if ($i == $display->post_count) echo '<div class="clear"></div>'; // if there are few posts (fix) if ($i > 3) { echo '<div class="related_item"><a href="'.get_permalink($post->ID).'" title="'.get_the_title().'">'; if ($content_type == 1) dt_posttype(); the_title(); echo '</a>'; if ($content_type == 2) dt_photos_number('show_tag=false&span_class=photo_count_inline'); echo '</div>'; } endwhile; echo '</div>'; endif; } // Lets kill this query wp_reset_query(); }
Forum: Fixing WordPress
In reply to: exclude category from related poststhanks for reply friend
ms is slug & category both
i paste
foreach( $categories as $individual_category ) { if ( ! $individual_category->category_nicename == 'ms' ) $category_ids[] = $individual_category->term_id; }
instead of
foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
it’s cat id is 77
friend i am not so smart in php if you could help me
Forum: Plugins
In reply to: [Category Posts Widget] Show posts of current category?@alchymyth any feedback ?
Forum: Fixing WordPress
In reply to: current time in 12 hours formatthanks Esmi
donethanks a lot
Forum: Plugins
In reply to: [Category Posts Widget] Show posts of current category?hi friend great work !
but it’s working only on single post pages
not on home page what to do ?
Forum: Plugins
In reply to: [Category Posts Widget] Show posts of current category?can you link that plugin please & please guide me what to do
Forum: Plugins
In reply to: [Category Posts Widget] Show posts of current category?hi friend i copy this code and paste into my widget.php
this error showing
Fatal error: Cannot redeclare class CategoryPosts
Forum: Themes and Templates
In reply to: How to display avatar in comments.php and single.php?@hush !
i am using sociable.es’s facebook connect everything is working finecomment avatar showing in comment list but not in my footer widget
how can i fetch avatar in my footer widget ?
this is working when facebook comment
<?php echo get_fb_avatar(get_comment_author_email(),get_comment_author_url()); ?>
but gravatar not working, i used these all code
<?php echo get_avatar(get_comment_author_email($comment->comment_ID), 40); ?> <?php echo get_avatar(get_comment_author_email(), '37'); ?> <?php echo get_avatar(get_comment_author_url(), '37'); ?>
i tried this plugin – recent comment with avatars
https://pastebin.com/ZbMMbdtC
it display all avatars fb or gravatar (working fine)but i dont want it as a plugin
i want short code in widget
if you can get idea from (https://pastebin.com/ZbMMbdtC) –
i am not smart in php please help meplease help me
Forum: Plugins
In reply to: [WPBook] [Plugin: WPBook] Comments Facebook avatar@bandonrandon i am not using wpbook, i am using sociable.es’s facebook connect everything is working fine
comment avatar showing in comment list but not in my footer widget
how can i fetch avatar in my footer widget ?
this is working when facebook comment
<?php echo get_fb_avatar(get_comment_author_email(),get_comment_author_url()); ?>
but gravatar not working, i used these all code
<?php echo get_avatar(get_comment_author_email($comment->comment_ID), 40); ?> <?php echo get_avatar(get_comment_author_email(), '37'); ?> <?php echo get_avatar(get_comment_author_url(), '37'); ?>
i tried this plugin – recent comment with avatars
https://pastebin.com/ZbMMbdtC
it display all avatars fb or gravatar (working fine)but i dont want it as a plugin
i want short code in widget
if you can get idea from (https://pastebin.com/ZbMMbdtC) –
i am not smart in php please help meplease help me