āĻĒāĻžāĻŦāϞāĻŋāĻ āĻĢā§āϰāĻžāĻŽā§ āĻāĻŋāĻāĻžāĻŦā§ āϏāĻžāĻšāĻžāϝā§āϝ āĻāĻžāĻāĻŦā§āύ ?
=> ⧍ā§Ļā§Ļā§ āĻĨā§āĻ⧠⧍ā§Ļā§Ļ⧝ āϏāĻžāϞā§āϰ āĻŽāϧā§āϝāĻŦāϰā§āϤ⧠āϏāĻŽā§āĻā§āĻā§āϤ⧠āĻāĻŽāĻŋ āĻĒā§āĻžāϞā§āĻāĻž āĻāĻŦāĻ āĻāĻžāĻā§āϰ āĻā§ā§ā§ āĻŦāĻŋāĻāĻŋāύā§āύ āĻĢā§āϰāĻžāĻŽā§ āĻ
āύā§āĻ āϏāĻŽā§ āĻĻāĻŋā§ā§āĻāĻŋ, āĻāϰ āĻāĻā§āϰāĻāϰ⧠āĻ
āύā§āĻ āĻŦā§āĻļāĻŋāĨ¤ āĻāĻŽāύāĻāĻŋ “āĻāĻŽāĻžāĻĻā§āϰ āĻĒā§āϰāϝā§āĻā§āϤāĻŋ” āύāĻžāĻŽā§ āĻāĻāĻāĻž āĻŦāĻžāĻāϞāĻž āĻāĻžāώāĻžāϰ āĻā§āĻāύā§āϞāĻāĻŋ āĻāĻŋāĻā§āĻāĻžāϏāĻž āĻāϤā§āϤāϰ āĻĢā§āϰāĻžāĻŽ āĻĻā§āϰā§āĻāĻĻāĻŋāύ āĻāĻžāϞāĻŋā§ā§āĻāĻŋāϞāĻžāĻŽ(āĻāĻāύ āϰāĻŋāϏā§āϰā§āϏā§āϰ āĻ
āĻāĻžāĻŦā§ āĻŦāύā§āϧ āĻŦāĻž āĻĒā§āϰāĻžāĻāĻā§āĻ āĻāϰāĻž āϰāĻžāĻāĻž āĻāĻžāϰāĻŖ āĻĢā§āϏāĻŦā§āĻā§āϰ āĻāϞā§āϝāĻžāύ⧠āĻŽāĻžāύā§āώāĻā§ āϏāĻžāϧāĻžāϰāĻŖ āĻĢā§āϰāĻžāĻŽ āϏāĻžāĻāĻāĻā§āϞ⧠āĻāϰ āĻŦā§āĻļāĻŋ āĻāĻžāύ⧠āύāĻž !)āĨ¤ āĻāĻŽāĻžāϰ āĻ
āĻāĻŋāĻā§āĻāϤāĻž āĻŦāϞā§, āϏāĻžāϧāĻžāϰāύāϤ āĻāĻŋāĻāĻžāĻŦā§ āĻĒā§āϰāĻļ āĻāϰāϤ⧠āĻšā§ āϏā§āĻāĻžāĻ āĻŦā§āĻļāĻŋāϰ āĻāĻžāĻ āĻā§āώā§āϤā§āϰ⧠āĻ
āύā§āĻā§ āĻāĻžāύ⧠āύāĻžāĨ¤ āĻ
āύā§āĻā§āϰ āĻĒā§āϰāĻļā§āύ āĻāϰāĻžāϰ āϧāϰāύ āĻāĻ āϰāĻāĻŽāĻ
āϧāϰāύ-ā§§āĻ āϝāĻžāϰāĻž āĻā§ā§ā§ āĻāĻžāĻļā§ āύāĻž āĻāĻŦāĻ āĻĒā§āϰāĻļā§āύā§āϰ āĻā§āϤāϰ āĻā§āώā§āĻ āĻāĻžāĻ āĻŋāύā§āϝ āĻĨāĻžāĻā§
āĻĒā§āϰāĻļā§āύāĻ āĻāĻŽāĻžāϰ āĻā§āĻĄ āĻāĻžāĻ āĻāĻžāϰāĻā§ āύāĻž , āĻāĻŋ āĻāϰāĻŦ ?
=> āĻāĻ āϧāϰāύā§āϰ āĻĒā§āϰāĻļā§āύā§, āĻĒā§āϰāĻĨāĻŽāϤāĻ āĻĒāĻžāϞāĻāĻž āĻĒā§āϰāĻļā§āύ āĻāϰāϤ⧠āĻšā§ āĻāĻĒāύāĻžāϰ āĻā§āĻĄāĻāĻž āĻļā§ā§āĻžāϰ āĻāϰā§āύāĨ¤ āĻŽāĻžāύ⧠āĻĻāĻžā§āĻžāϞ⧠āĻā§āĻ āϝāĻĻāĻŋ āĻāĻāĻŦāĻžāϰā§āĻ āĻā§āĻĄ āĻļā§ā§āĻžāϰ āĻāϰ⧠āϏā§āĻĒā§āĻĢāĻŋāϏāĻŋāĻ āĻāĻžāĻŦā§ āĻāĻžāύāĻžāύ āϝ⧠āĻāĻŽāĻŋ āĻāĻ āĻā§āĻĄ āĻāϰā§āĻāĻŋ, āĻā§āĻĄā§āϰ āĻāĻ āĻāĻžā§āĻāĻžāĻāĻž āĻāĻžāĻ āĻāϰāĻā§ āύāĻž āϤāĻžāĻšāϞ⧠āϝ⧠āĻā§āĻ āϏāĻšāĻā§ āϏāĻžāĻšāĻžāϝā§āϝ āĻāϰāĻŦā§āĨ¤ āĻ
āύā§āĻ āϏāĻŽā§ āĻĒā§āϰāĻļā§āύ āĻĻā§āĻā§āĻ āĻļāϰā§āϰ āĻā§āĻŦāϞ⧠āϝāĻžā§ āĻāĻžāĻāĻĒ āĻ
āĻŦāϏā§āĻĨāĻž āĻšā§ āĨ¤
āϧāϰāύ-⧍āĻ āĻĒā§āϰāĻĢā§āĻļāύāĻžāϞ āĻĒā§āϰāĻā§āĻā§āĻ āύāĻŋā§ā§ āĻĢā§āϰāĻžāĻŽā§ āĻāϏ⧠āĻāĻā§ āĻāĻā§ āĻĻāĻŋā§ā§ āĻāϰāĻŋā§ā§ āύā§āĻā§āĻžāϰ āϧāĻžāύā§āϧāĻž
āĻĒā§āϰāĻļā§āύāĻ āĻāĻ āϰāĻŋāĻā§ā§āĻžāϰāĻŽā§āύā§āĻ āĻā§āϞāĻžā§ā§āύā§āĻ āĻāĻŽāĻžāĻā§ āĻĒāĻžāĻ āĻŋā§ā§āĻā§, āĻāĻŋāĻāĻžāĻŦā§ āĻāϰāĻŦ ?
=> āĻĢā§āϰāĻžāĻŽā§ āϰāĻŋāĻā§ā§āĻžāϰāĻŽā§āύā§āĻ āĻĒā§āϏā§āĻ āĻāϰāĻž āĻāĻāĻŋā§ āύāĻž, āĻāĻĒāύāĻŋ āϝāĻāύ āĻā§āύ āĻĒā§āϰāĻā§āĻā§āĻ āύāĻŋā§ā§āĻā§āύ āĻŽāĻžāύ⧠āĻāĻĒāύāĻŋ āϏā§āĻāĻāĻž āϏāĻŽā§āĻĒāϰā§āĻā§ ā§ā§Ģ% āĻāϰ āĻŦā§āĻļāĻŋ āĻāĻžāύā§āύ āĻāĻŦāĻ āĻāĻĒāύāĻžāϰ āĻāύāĻĢāĻŋāĻĄā§āύā§āϏ āĻāĻā§ āĻāĻĒāύāĻŋ āĻĒāĻžāϰāĻŦā§āύāĨ¤ āĻāĻĒāύāĻŋ āĻĢā§āϰāĻžāĻŽā§ āύāĻŋāϰā§āĻĻāĻŋāϰā§āώā§āĻ āĻā§āύ āϏāĻŽāϏā§āϝāĻž āύāĻŋā§ā§ āĻĒā§āϏā§āĻ āĻāϰāϞ⧠āϏāĻšāĻā§ āĻāϤā§āϤāϰ āĻĒāĻžāĻŦā§āύāĨ¤
āϧāϰāύ-ā§ŠāĻ āĻ
āϏā§āĻĒāώā§āĻ āϏā§āĻā§āϰā§āύāĻļāĻ āĻĻā§āĻā§āĻž āĻŦāĻž āĻāϞāĻžāĻāύāĻŽā§āύā§āĻ āύāĻžāĻ āĻāĻŽāύ āĻā§āĻĄ āĻĒā§āϏā§āĻ āĻŦāĻž āĻļā§ā§āĻžāϰ āĻāϰāĻž
āĻĒā§āϰāĻļā§āύāĻ āĻāĻžāĻ āĻāĻāĻāĻž āĻāĻŽāĻžāϰ āĻā§āĻĄ āĻāĻāĻž āĻāĻžāĻ āĻāϰāĻā§ āύāĻž
=> āĻāĻĒāύāĻžāϰ āĻā§āĻĄ āĻĻā§āĻā§ āĻāĻŋ āĻāĻĒāύāĻŋ āĻŦā§āĻāϤ⧠āĻĒāĻžāϰāĻā§āύ ? āϝāĻĻāĻŋ āϏā§āĻā§āϰā§āύāĻļāĻ āĻĻāĻŋāϤ⧠āĻšā§ āϤāĻžāĻšāϞ⧠āĻĒāϰāĻŋāϏā§āĻāĻžāϰ āĻāϰ⧠āĻŦā§ āϏā§āĻā§āϰā§āύāĻļāĻ āĻĻāĻŋāύ, āϏā§āĻā§āϰā§āύāĻļāĻā§ āĻāύā§āĻā§āĻ āĻāϰā§āύāĨ¤ āĻā§āĻĄ āĻļā§ā§āĻžāϰ āĻāϰāϞ⧠āĻā§āĻĄ āĻ āĻāĻŽā§āύā§āĻ āĻāϰ⧠āĻĒā§āϰāĻŦā§āϞā§āĻŽ āĻā§āύ āϞāĻžāĻāύ⧠āĻĒāĻžāĻā§āĻā§āύ āĻŦā§āĻāĻŋā§ā§ āĻŦāϞā§āύ, āĻāϰāĻĒāϰ āĻ
āĻŦāĻļā§āϝāĻ āϏāĻŽāĻžāϧāĻžāύ āĻĒā§ā§ā§ āϝāĻžāĻŦā§āύ
āϧāϰāύ-ā§ĒāĻ āĻĒā§āϰāĻļā§āύ āĻāϰāĻžāϰ āϏāĻžāĻĨā§ āϏāĻžāĻĨā§ āĻāϤā§āϤāϰ āĻāϰ āĻāύā§āϝ āĻŽāύā§āϤāĻŦā§āϝ āĻāϰāϤ⧠āĻĨāĻžāĻāĻž
āĻĒā§āϰāĻļā§āύāĻ āĻāĻŽāĻžāϰ āĻĒā§āϰāĻļā§āύā§āϰ āĻāϤā§āϤāϰ āĻā§āĻ āĻā§āύ āĻĻāĻŋāĻā§āĻā§āύ āύāĻž ?
=> āĻāĻĒāύāĻŋ āĻŽāĻžāĻ āϰāĻžāϤ⧠āĻĒā§āϰāĻļā§āύ āĻāϰāϤ⧠āĻĒāĻžāϰā§āύ, āĻ
āĻĢāĻŋāϏ āĻāϰ āĻŦāĻŋāĻāĻŋ āĻāĻā§āĻžāϰ⧠āĻĒā§āϰāĻļā§āύ āĻāϰāϤ⧠āĻĒāĻžāϰā§āύ, āĻāĻĒāύāĻžāĻā§ āĻ
āĻĒā§āĻā§āώāĻž āĻāϰāϤ⧠āĻšāĻŦā§āĨ¤ āϝāĻžāϰāĻž āϝ⧠āĻĢā§āϰāĻžāĻŽ āĻŦāĻž āĻā§āϰā§āĻĒā§ āĻĒā§āϰāϤāĻŋāύāĻŋā§āϤ āĻāϏā§āύ āϤāĻžāϰāĻž āĻĻāĻŋāύā§āϰ āύāĻŋāϰā§āĻĻāĻŋāϰā§āώā§āĻ āϏāĻŽā§ āĻāĻāĻŦāĻžāϰ āĻšāϞā§āĻ āĻĸā§ āĻŽāĻžāϰā§āύāĨ¤ āϤāĻžāĻ āĻāĻĒāύāĻžāϰ āĻĒā§āϰāĻļā§āύā§āϰ āĻāϤā§āϤāϰ āĻāϰ āĻāύā§āϝ āĻ
āĻĒā§āĻā§āώāĻž āĻāϰāϤ⧠āĻšāĻŦā§ āĻāĻŦāĻ āϏā§āĻ āϏāĻžāĻĨā§ āύāĻŋāĻā§āĻ āĻā§āϏā§āĻāĻž āĻāϰāĻŦā§āύāĨ¤ āϝāĻĻāĻŋ āϏāĻŽāĻžāϧāĻžāύ āĻĒā§ā§ā§ āϝāĻžāύ āϤāĻžāĻšāϞ⧠āĻŽā§āϞ āĻĒā§āϏā§āĻ āĻāĻŦāĻ āĻāĻŽā§āύā§āĻ āĻāĻžāύāĻŋā§ā§ āϝāĻžāĻŦā§āύ, āϏāĻžāĻĨā§ āĻāĻŋ āϏāĻŽāĻžāϧāĻžāύ āĻĒā§āϞā§āύ āϏā§āĻāĻāĻžāĻ āĻāĻžāύāĻžāĻŦā§āύāĨ¤
āĻāϰ⧠āĻ
āύā§āĻ āϧāϰāύ āĻāĻā§, āĻāĻĒāĻžāϤāϤ āĻāĻ āĻā§āĻā§āĨ¤
Tips and Tricks
There are 81 posts filed in Tips and Tricks (this is page 5 of 9).
Year Based Post Listing Timeline in WordPress
Somehow visited this site and liked the timeline
So I made my own script (still it can be improved)
What you need to do is make a custom page template in wordpress and write the following code in the loop. May be I will release it as a plugin as shortcode.
Demo: See it in action here
Thanks
Be native user for which platform you are developing products
Search User by Display Name in WordPress Sitewide
In wordpress in backend or if you use wordpress user query ‘WP_User_Query’ by default it will not search by display_name even if you add display_name in “search_columns” field of WP_User_Query
So, this can be achieved by this small filter https://gist.github.com/manchumahara/9910185 (after add this code now if you search in your wordpress admin panel for user with their display name it will work)
ref: https://codex.wordpress.org/Class_Reference/WP_User_Query
Few lines I follow in my professional and personal life both
1. Respect others if you want to be respected by others, sorry respect is not a one way game. Love could be !
2. Be polite , it doesn’t need to waste dollar to be polite.
3. Try to listen to others , it could be important what others are thinking, sometimes you must listen to rudeness.
4. Learn from others even if they know less than you.
5. After a certain interval like 6 months or one year, Update yourself , re-index your learning, finding, dreams, friends, loved ones and your knowledge.
6. You can not earn faith from your surroundings by just applying some terms and conditions. Sometimes you have to earn that or achieve that. Before expecting believe from others think yourself do you believe them or do you know how to believe others. Sorry believe is not a one way game.
7. Learn how to say sorry.
I try to follow the above lines every day in my personal and professional life, both. When every time I re-index my life timeline I found I have changed my life , my thinking are changed (I will say it’s improved).
I thought those few lines may help others to change their thinking and livelihood.
Category Post Count in WordPress (Custom Taxonomy with Custom Post Type)
Let me explain my need in short:
I want to show post count for any category/any custom taxonomy registered for any custom post type. I searched wordpress forums and in google, found some solutions using
- http://wordpress.org/support/topic/category-post-count-2?replies=6
- http://wordpress.org/support/topic/category-post-count?replies=6
- http://www.intechgrity.com/get-post-count-of-a-category-including-sub-categories-in-wordpress/#
- http://www.web-templates.nu/2008/09/21/get_category_count/index.html
Nothing helped me such way, so I managed my own way with my little knowledge.
wp_get_productcat_postcount($id, $posttype = ‘product’, $taxname = ‘product_cat’)
$id = category or any taxonomy id(term id)
$posttype = post type name, example: post, page, or any custom post type
$taxname = taxonomy name or any category type name, for joomla default taxonomy it will category, post_tag, nav_menu, link_category, post_format, but we can use any custom taxonomy name as I used ‘product_cat’ which is used with custom post type ‘product’ , post type name.
[code lang=”php”]
function wp_get_productcat_postcount($id, $posttype = ‘product’, $taxname = ‘product_cat’) {
$result = wp_cache_get( ‘taxpostcount’.$id, ‘cbtaxpostcount’ );
//var_dump($resul);
if ( false === $result ) {
$args = array(
‘post_type’ => $posttype,
‘post_status’ => ‘publish’,
‘posts_per_page’ => -1,
‘tax_query’ => array(
‘relation’ => ‘AND’,
array(
‘taxonomy’ => $taxname,
‘field’ => ‘id’,
‘terms’ => array( $id )
)
)
);
$query = new WP_Query( $args);
/*
echo ‘<pre>’;
print_r($query->post_count);
echo ‘</pre>’;
*/
$result = (int)$query->post_count;
$cacheresult = wp_cache_set( ‘taxpostcount’.$id, $result, ‘cbtaxpostcount’ );
//var_dump($cacheresult);
}
return $result;
}
[/code]
Note: As I used wordpress object cache for better performance.
Thanks for reading, any comment is appreciable.
Google Plus Comment for WordPress
Google Plus Introduced Social comment plugin(unofficially). so I just made a small shortcode based plugin for wordpress to test the baby.
BTW, I noticed about this from google plus.
Download from bellow:
[download id=”36″]
Demo:
Please check here .
Shortcode:
[gpluscomment]
For more technical people
'url' => '', // leave empty for current post
'width' => '500',
'js' => 1,
'showarchive' => false,
'showhome' => false
My Test results screenshots:
Self Help+Push+Pull = Success
Problem: A man wants to climb a high wall, let see how he can do this đ
Step 1: Self Help + Passion + Self Motivation , yes I must do it, I just need to do it đ
Step 2: Take help from a Friend 1 who can push from land, there may be someone , just search a bit đ
Step 3: Take help from a Friend 2 who can pull from top of wall, and you are done.
BTW, I tried to help myself with pen & paper to draw the pictures, so don’t laugh if they looks funny đ
jQuery Masonry doesn’t work with Bootstrap Hidden Tab
Ref: jQuery Masonry
I think many of you face issue with bootstrap hidden. After a hidden tab is made visible many things doesn’t work for the new visible content as it’s container was hidden, jquery or other js library fails to get various property, example: height, width etc and even some common issues like scrollbar, masonry etc script doesn’t work. So I have a solution for this.
Here is the common declaration about a bootstrap based tab.
[code language=”html”]
<div class="tabbable"> <!– Only required for left/right tabs –>
<ul class="nav nav-tabs">
<li class="active"><a href="#tab1" data-toggle="tab">Section 1</a></li>
<li><a href="#tab2" data-toggle="tab">Section 2</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab1">
<p>I’m in Section 1.</p>
</div>
<div class="tab-pane" id="tab2">
<p>Howdy, I’m in Section 2.</p>
</div>
</div>
</div>
[/code]
The above code will make a tabber based on BT. So now suppose in tab content pane we added Jquery Masonry. On first load the first tab will be visible and it’s masonry will work properly and 2nd tab will not as it should be actually but you will be unhappy about it and tear … đ So here I am trying to how we can make this possible to work properly.
Let For adding masonry the html code for tab here.
[code language=”html”]
<div class="tabbable"> <!– Only required for left/right tabs –>
<ul class="nav nav-tabs">
<li class="active"><a masonid="mymasontabcon1" href="#tab1" data-toggle="tab">Section 1</a></li>
<li><a masonid="mymasontabcon1" href="#tab2" data-toggle="tab">Section 2</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab1">
<div id="mymasontabcon1">
<div class="itembox">hi there</div>
<div class="itembox">hi there</div>
<div class="itembox">hi there</div>
</div>
</div>
<div class="tab-pane" id="tab2">
<div id="mymasontabcon1">
<div class="itembox">hi there</div>
<div class="itembox">hi there</div>
<div class="itembox">hi there</div>
</div>
</div>
</div>
</div>
[/code]
Check in the above code for each anchor in li(tab) I added something like
masonid=”mymasontabcon1″ here attribute masonid is the div id of the div which we want to apply masonry. So suppose on dom ready we added masonry once.
Here we I did is calling the reload method of jquery masonry script but that need to be done after the tab’s container is shown. Otherwise we will not get proper output. I did this for each toggle of any tab, same thing is coded in the tab’s plugin included with BT.
[code language=”javascript”]
jQuery(document).ready(function(){
//this will certain happen when tab show method is done, that means we reload the masonry after the tab container is shown.
jQuery(‘body’).on(‘click.tab.data-api’, ‘[data-toggle="tab"], [data-toggle="pill"]’, function (e) {
e.preventDefault();
var mytarget = jQuery(this).attr(‘cbmasonid’);
//it is taken that already masonry is added in each tab.
jQuery("#"+mytarget).masonry(‘reload’ ); //here we call the reload method.
})
});
[/code]
Linkify url and hashtag for linkedin Status and share api
IF you are working with linkedin api and parsing status and share items for any user or company page then this small code will help to parse the status or share text (comes from api) to 1. linkify 2. Tagging 3. Linkify hashtag
Please note that linkedin doesn’t support any native @ handle for it’s own user based but all @ handle are for twitter user.
[code language=”php”]
/**
* Linkify url and hashtag
*
* @param type string $status_text
* @return type string
*/
function linkify_linkedin_status($status_text){
// linkify URLs
$status_text = preg_replace(
‘/(https?:\/\/\S+)/’,
‘<a href="\1">\1</a>’,
$status_text
);
// linkify twitter users
//please note that any thing tagged using @ in linkedin takes to twitter
$status_text = preg_replace(
‘/(^|\s)@(\w+)/’,
‘\1@<a target="_blank" href="http://twitter.com/\2">\2</a>’,
$status_text
);
// linkify hash tags
$status_text = preg_replace(
‘/(^|\s)#(\w+)/’,
‘\1#<a target="_blank" href="http://www.linkedin.com/signal/?keywords=%23\2">\2</a>’,
$status_text
);
return $status_text;
}
[/code]