how to make an email address clickable in wordpress

wordpress tutorial, how to make an email address linkable in wordpress. Here we given very simple and short code which you can add in theme.

When ever we insert the URL , email  in post we need to put the link manually. WordPress provided the way to automatically make the URL and Email clickable in wordpress post.

how to make an email address clickable in wordpress

how to make an email address clickable in wordpress

You just need to add following code in your wordpress theme’s functions.php file.

add_filter('the_content', 'make_clickable');

For more help you can check following URL:
http://codex.wordpress.org/Function_Reference/make_clickable

how to use wordpress shortcode in text widget

wordpress tutorial, how to use wordpress shortcode in text widget. In your shortcode in your wordpress widget section you need to use only following code. From wordpress 2.5 version shortcode method is included in wordpress.

how to use wordpress shortcode in text widget

add_filter('widget_text','do_shortcode');
use wordpress shortcode in widget
use wordpress shortcode in widget

If you need the more information about using the wordpress short code then refer the following article
https://purabtech.in/use-the-wordpress-shortcode-api-in-wordpress-pages/

download wordpress logo font

Many wordpress theme developers need to download wordpress logo font or similar font. From following links you can download the wordpress font.

I found some fonts which are similar to wordpress logo font. On following URLs you will find the wordpress fonts.

http://www.myfonts.com/fonts/linotype/dante-mt/

http://www.fontyukle.com/listele.php?sayfa=7&harf=D

http://new.myfonts.com/fonts/emigre/mrs-eaves/

download wordpress logo font
download wordpress logo font
download wordpress logo font2
download wordpress logo font2

convert the wma files through php script in linux

When we use the mobile download we always get the wma files as song file. If you want to convert wma files to mp3 file. For that I written the simple PHP sciprt for converting the wma files through php scirpt.

convert the wma files through php script in linux

Use the following scirpt.

<?php
// Script made for convertion of  .wma to .M3 Converter (media conversion) in Linux
//You need the  mplayer and lame installted in your linux OS

set_time_limit(0);
ReadDirs('/var/www/html/songs/wmamp3/');
function ReadDirs($dir){
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." &amp;&amp; $file != ".." &amp;&amp; $file != "Thumb.db") {
$info = pathinfo($file);
if($info['extension']=='wma') {
$mp3_file = str_replace('.wma','',$file);
$cmd = "mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader '".$dir.$file."';lame -m s -V 3 audiodump.wav;mv audiodump.wav.mp3 '".$dir."mp3/".$mp3_file.".mp3';rm -f audiodump.wav";
system($cmd);
}

}
}
closedir($handle);
}
}
?>

Above script will take wma files from folder and convert all files to mp3 files.

convert the wma files through php script in linux
convert the wma files through php script in linux

 

execute shell script daily through cron

Normally running the shell script we will use the following command. If shell script not running then you need to do shell script executable. using following command

execute shell script daily through cron

#./shell_script.sh
If shell script not running then you need to do shell script executable. using following command

#chmod +x shell_script.sh

for running the shell scirpt daily through use the following command

#su
#PASSWORD
#crontab -e

Put following lines in cron file.
* * 1 * * /bin/sh /home/myuser/shellscript/shell_script.sh

 

execute shell script daily through cron
execute shell script daily through cron

Using custom sql query in wp_query function

People asked me fetching data from wordpress database with simple database query. You can use get_results() method for custom sql query in wp_query function.

Using custom sql query in wp_query function

Is this facility provided by wordpress API. Yes, that is provided by wordpress api. You just need to use the get_results() method. Here I am going to give some example about using the custom sql query in wp_query method.

You need to define the gobal $wpdb variable that important in your code. here is working example for fetching the posts.


global $wpdb;

$querystr = "SELECT wp_posts.* FROM $wpdb->posts wp_posts, $wpdb->postmeta
WHERE wp_posts.post_status = 'publish' AND wp_posts.post_type = 'post'
ORDER BY wp_posts.post_date DESC LIMIT 10";
$pageposts = $wpdb->get_results($querystr, OBJECT);

For fetching the Admin or user information thorough query use following code. following code is useful for fetching the single record or row.


$querystr = "SELECT wp_users.* FROM $wpdb->users
WHERE wp_users.user_email = 'info@domain.com' ";
$userinfo = $wpdb->get_row($querystr);

For detail information you should use the following URL:

http://codex.wordpress.org/Function_Reference/wpdb_Class

Using custom sql query in wp_query function
Using custom sql query in wp_query function

How to set post first image as featured image automatically

So using or choosing the image as featured image for post is another manual work we need to do. Info about. how to set post first image as featured image. We have SQL query for this.

From wordpress 3.0 version wordpress launched the feature called featured image. Many new wordpress themes are compatible with new wordpress version. So using or choosing the image as featured image for post is another manual work we need to do.

Many old wordpress website holder or blogger is having issue with this functionality. What they want is when they create the post they haven’t set the featured image, but they would like the featured image to default to the image that has been included in the post.

Some wordpress always use the first image as featured image but old post was not updated with featured image. They need to do manual work to set the featured image. I also faced same issue.

After doing some R&D I found the solution. If you want to set the your posts first image as featured image then use my following code.

For using the code you need to open your mysql database command prompt or phpmysqladmin program and select your wordpress database and execute the following query in that.

insert into wp_postmeta (meta_value, meta_key, post_id) select DISTINCT(ID), post_type , post_parent from wp_psts where post_type= 'attachment' and post_parent !=0 and post_status='inherit';<br /><br />update wp_postmeta set meta_key = '_thumbnail_id' where meta_key='attachment'

Using above sql query you will be able to set the featured image to your old and new post from post content. If you are having any issues with using this sql then write to me.

How to set post first image as featured image automatically
How to set post first image as featured image automatically

Use WordPress Update Services for better SEO

WordPress is having great setting for SEO purpose but many wordpress blogger did not know about that feature. WordPress has feature called update services. This service will ping when your blog is updated with new post or article.

Use WordPress Update Services for better SEO

This feature is very useful to reach the internet user faster than major search engine. WordPress provide the default http://rpc.pingomatic.com/ service to ping or update the content. Pingomatic is very power server for your wordpress blog.

Use WordPress Update Services for better SEO
Use WordPress Update Services for better SEO

For changing the Update services, Login to Admin panel. Go to Settings->Writing->Update Services section from using admin panel . When you see that text box you will only http://rpc.pingomatic.com/ link over there.

My advise to you is when you have good amount content in your blog or website then only use the multiple ping back services.

I used the following services in Update services option.

http://rpc.pingomatic.com/
http://rpc.technorati.com/rpc/ping
http://rpc.blogcatalog.com/
http://api.my.yahoo.com/RPC2
http://api.my.yahoo.com/rss/ping
http://ping.feedburner.com/
http://rpc.blogrolling.com/pinger/
http://blogsearch.google.com/ping/RPC2
http://api.feedster.com/ping
http://rpc.icerocket.com:10080
http://www.bloglines.com/ping
http://a2b.cc/setloc/bp.a2b
http://api.feedster.com/ping
http://api.moreover.com/ping
http://api.moreover.com/RPC2
http://api.my.yahoo.co.jp/RPC2
http://api.my.yahoo.com/ping
http://audiorpc.weblogs.com/RPC2
http://bitacoras.net/ping/

You can use the following ping back option as optional if you want.

http://blog.goo.ne.jp
http://blog.goo.ne.jp/XMLRPC
http://blogdb.jp
http://blogdb.jp/xmlrpc
http://blogdigger.com/RPC2
http://blogoole.com/ping/
http://blogoon.net/ping/
http://blogpeople.net/ping
http://blogsnow.com/ping
http://blogstreet.com/xrbin/xmlrpc.cgi
http://blogupdate.org/ping/
http://coreblog.org/ping/
http://effbot.org/rpc/ping.cgi
http://feedsky.com/api/RPC2
http://holycowdude.com/rpc/ping/
http://imblogs.net/ping/
http://lasermemory.com/lsrpc/
http://newsisfree.com/RPCCloud
http://packetmonster.net/xmlrpc.php
http://ping.amagle.com/
http://ping.bitacoras.com
http://ping.blo.gs/
http://ping.blogg.de/
http://ping.bloggers.jp/rpc/
http://ping.blogmura.jp/rpc/
http://ping.blogoon.net/
http://ping.blogs.yandex.ru/RPC2
http://ping.cocolog-nifty.com/xmlrpc
http://ping.exblog.jp/xmlrpc
http://ping.fakapster.com/rpc
http://ping.fc2.com/
http://ping.feeds.yahoo.com/RPC2/
http://ping.kutsulog.net/
http://ping.myblog.jp
http://ping.namaan.net/rpc
http://ping.rootblog.com/rpc.php
http://ping.snap.com/ping/RPC2
http://ping.syndic8.com/xmlrpc.php
http://ping.weblogalot.com/rpc.php
http://ping.weblogs.se/
http://ping.wordblog.de/
http://pinger.blogflux.com/rpc
http://pingoat.com/
http://pingoat.com/goat/RPC2
http://pingqueue.com/rpc/
http://popdex.com/addsite.php
http://r.hatena.ne.jp/rpc
http://rcs.datashed.net
http://rcs.datashed.net/RPC2/
http://rpc.blogbuzzmachine.com/RPC2
http://rpc.bloggerei.de/ping/
http://rpc.britblog.com/
http://rpc.newsgator.com/
http://rpc.reader.livedoor.com/ping
http://rpc.tailrank.com/feedburner/RPC2
http://rpc.technorati.jp/rpc/ping
http://rpc.twingly.com
http://rpc.weblogs.com/RPC2
http://rpc.wpkeys.com
http://services.newsgator.com/ngws/xmlrpcping.aspx
http://snipsnap.org/RPC2
http://syndic8.com/xmlrpc.php
http://thingamablog.sourceforge.net/ping.php
http://topicexchange.com
http://trackback.bakeinu.jp/bakeping.php
http://wasalive.com/ping/
http://weblogues.com/ping/
http://weblogues.com/RPC/
http://www.a2b.cc
http://www.a2b.cc/setloc/bp.a2b
http://www.bitacoles.net/ping.php
http://www.blogdigger.com/RPC2
http://www.blogoole.com/ping/
http://www.blogoon.net/ping/
http://www.blogpeople.net
http://www.blogroots.com
http://www.blogsdominicanos.com/ping/
http://www.blogshares.com/rpc.php
http://www.blogsnow.com/ping
http://www.blogstreet.com/xrbin/xmlrpc.cgi
http://www.catapings.com/ping.php
http://www.feedsky.com/api/RPC2
http://www.holycowdude.com/rpc/ping/
http://www.imblogs.net/ping/
http://www.lasermemory.com
http://www.mod-pubsub.org/ping.php
http://www.newsisfree.com/RPCCloud
http://www.newsisfree.com/xmlrpctest.php
http://www.popdex.com
http://www.popdex.com/addsite.php
http://www.snipsnap.org
http://www.snipsnap.org/RPC2
http://www.weblogues.com
http://www.weblogues.com/RPC/
http://www.xianguo.com/xmlrpc/ping.php
http://www.zhuaxia.com/rpc/server.php
http://xmlrpc.blogg.de
http://xping.pubsub.com/ping/
http://zhuaxia.com/rpc/server.php
http://zing.zingfast.com
http://blogsearch.google.ae/ping/RPC2
http://blogsearch.google.at/ping/RPC2
http://blogsearch.google.be/ping/RPC2
http://blogsearch.google.bg/ping/RPC2
http://blogsearch.google.ca/ping/RPC2
http://blogsearch.google.ch/ping/RPC2
http://blogsearch.google.cl/ping/RPC2
http://blogsearch.google.co.cr/ping/RPC2
http://blogsearch.google.co.hu/ping/RPC2
http://blogsearch.google.co.id/ping/RPC2
http://blogsearch.google.co.il/ping/RPC2
http://blogsearch.google.co.in/ping/RPC2
http://blogsearch.google.co.it/ping/RPC2
http://blogsearch.google.co.jp/ping/RPC2
http://blogsearch.google.co.ma/ping/RPC2
http://blogsearch.google.co.nz/ping/RPC2
http://blogsearch.google.co.th/ping/RPC2
http://blogsearch.google.co.uk/ping/RPC2
http://blogsearch.google.co.ve/ping/RPC2
http://blogsearch.google.co.za/ping/RPC2
http://blogsearch.google.com.ar/ping/RPC2
http://blogsearch.google.com.au/ping/RPC2
http://blogsearch.google.com.br/ping/RPC2
http://blogsearch.google.com.co/ping/RPC2
http://blogsearch.google.com.do/ping/RPC2
http://blogsearch.google.com.mx/ping/RPC2
http://blogsearch.google.com.my/ping/RPC2
http://blogsearch.google.com.pe/ping/RPC2
http://blogsearch.google.com.sa/ping/RPC2
http://blogsearch.google.com.sg/ping/RPC2
http://blogsearch.google.com.tr/ping/RPC2
http://blogsearch.google.com.tw/ping/RPC2
http://blogsearch.google.com.ua/ping/RPC2
http://blogsearch.google.com.uy/ping/RPC2
http://blogsearch.google.com.vn/ping/RPC2
http://blogsearch.google.de/ping/RPC2
http://blogsearch.google.es/ping/RPC2
http://blogsearch.google.fi/ping/RPC2
http://blogsearch.google.fr/ping/RPC2
http://blogsearch.google.gr/ping/RPC2
http://blogsearch.google.hr/ping/RPC2
http://blogsearch.google.ie/ping/RPC2
http://blogsearch.google.in/ping/RPC2
http://blogsearch.google.it/ping/RPC2
http://blogsearch.google.jp/ping/RPC2
http://blogsearch.google.lt/ping/RPC2
http://blogsearch.google.nl/ping/RPC2
http://blogsearch.google.pl/ping/RPC2
http://blogsearch.google.pt/ping/RPC2
http://blogsearch.google.ro/ping/RPC2
http://blogsearch.google.ru/ping/RPC2
http://blogsearch.google.se/ping/RPC2
http://blogsearch.google.sk/ping/RPC2
http://blogsearch.google.tw/ping/RPC2
http://blogsearch.google.us/ping/RPC2

Above services will submit your site content to major content ping back service. That will boost your site SEO and visitors of your site. After using above ping back urls your site content will be available to users throughout internet faster than google.

Use WordPress Update Services for better SEO
Use WordPress Update Services for better SEO

rsync copy files from remote server to other server

I always need to use this method for copy files one remote machine to another machine. there are many tool to do that. filezilla, winscp and many more. But I like command prompt.

rsync copy files from remote server to other server

scp is command is very useful for file transfer on remote machine.

To copy local file on remote machine use following command

#scp FILENAME  USERNAME@55.86.59.95:/home/USER/

To copy file from remote machine use following command

#scp USERNAME@55.86.59.95:/home/USER/FILENAME  .
or use
#scp USERNAME@55.86.59.95:/home/USER/FILENAME  *

To copy file from remote machin using scp command with port

#scp -P54 USERNAME@55.86.59.95:/home/USER/FILENAME  .
or use
#scp -P54 USERNAME@55.86.59.95:/home/USER/FILENAME  *

Above commands will execute faster than other tools.

rsync copy files from remote server to other server
rsync copy files from remote server to other server

apache redirect one domain to another site

Sometimes we need the redirection rule for your website. When you want to divert your website traffic to another site.

That is very easy to writing or putting the one site to another site redirection rule through apache.

apache redirect one domain to another site

You need to put entry in your virtual host section or if you are having shared hosting then open your .htaccess file and put following entry in that file

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

You just change newdomain.com to your new website name.

apache redirect one domain to another site
apache redirect one domain to another site