v2

Configure SMTP AUTH for mail servers

Create a text file as follows:# P=/etc/postfix/password# vi $PThe format of the client password file is as follows: #smtp.isp.com username:password smtp.vsnl.in vivek@vsnl.in:mySecretePassword Save and close the file. Set permissions:# chown root:root $P# chmod 0600 $P# postmap hash:$P Enable SMTP AUTH Open main.cf file, enter:# vi /etc/postfix/main.cfAppend following config directives: relayhost = smtp.vsnl.in smtp_sasl_auth_enable = yes […]

v2

Building collapsible plugin

$ WP_Widget_Archives = new WP_Widget_Archives ();// use class methods Methods __construct ()Installs an instance of the widget.form ($ instance)Displays a form with the input of the widget settings (in the admin panel).update ($ new_instance, $ old_instance)Controls updating of the widget settings.widget ($ args, $ instance)Displays the content of the widget (in the front of the […]

v2

Coding random posts widget

You can add the code below to your theme’s functions.php file between the PHP tags. The PHP tags look like this: <?php…..?>   function wpdean_rand_posts() { $args = array( ‘post_type’ => ‘post’, ‘orderby’=> ‘rand’, ‘posts_per_page’ => 5, );   $the_query = new WP_Query( $args ); if ( $the_query->have_posts() ) { $string .= ‘<ul>’;   while […]

v2

Import blogger beta to WordPress

A common situation: you create a new business and attach a small blog to it, without looking ahead and not counting on a serious increase in consumed resources and capacities in the future. And then such a day happened – your current blog on special services, such as Blogger, needs a larger platform. A logical […]