Posts Tagged ‘wordpress’

Features :-

1. You can display weather and time of multiple cities.

2. The front-end display is simple and flexible. So you can style the front-end easily based on your theme.

3. There are several options in plug-in admin. So you can easily manage the plug-in.

Download Plug-in

Installation and Usage :-

1. Download and install the plg-in
2. Use <?php weather_time(); ?> or <?php weather_time(array(‘city’ => ‘Your City’,’zone’ => ‘Your Time Zone’)); ?> .
3. You can use the shortcode [weather_time] or [weather_time city=”Your City” zone=”Your Time Zone”] .
4. You can also use the widget “Weather & Time” for widget area.

Screenshots :-

Comment here if you have any queries..

function replace_howdy( $wp_admin_bar ) {
    $newtitle = str_replace( 'Howdy,', 'Logged in as', $my_account->title );
    $wp_admin_bar->add_node( array(
        'id' => 'my-account',
        'title' => $newtitle,
    ) );
add_filter( 'admin_bar_menu', 'replace_howdy',25 );

use following code to show the admin bar only for the admin of your website


if (!current_user_can('manage_options')) {
	add_filter('show_admin_bar', '__return_false');

To show any warning message or notices in your wordpress admin panel/ dashboard use below code in your theme function.php file


function showMessage($message, $errormsg = false)
	if ($errormsg) {
		echo '<div id="message">';
	else {
		echo '<div id="message">';
	echo "<p><strong>$message</strong></p></div>";

function showAdminMessages()
    showMessage("Working on Theme's function.php, Do not touch it till further notice.", true);
add_action('admin_notices', 'showAdminMessages');

If you like to remove the functionality of dragging of metaboxes within the admin area and dashboard  Go to functions.php in your theme folder and add following code.

function disable_drag_metabox() {
add_action( 'admin_init', 'disable_drag_metabox' );

You can hide admin menu items of wordpress using following code.


function remove_menus () {
global $menu;
	$restricted = array(__('Dashboard'), __('Posts'), __('Media'), __('Links'), __('Pages'), __('Appearance'), __('Tools'), __('Users'), __('Settings'), __('Comments'), __('Plugins'));
	end ($menu);
	while (prev($menu)){
		$value = explode(' ',$menu[key($menu)][0]);
		if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}
add_action('admin_menu', 'remove_menus');

Build a responsive WordPress theme from your existing WordPress theme; using CSS3 Media Queries.

A responsive design means a layout that responds well to different screen sizes based on the view-port. Such as iPad, tablets, Smart Phones and Desktop. This tutorial explains how to make responsive theme from your existing wordpress theme css.

What you should already know:
1. How to build a wordpress theme
2. CSS knowledge

To make the theme responsive using CSS media query you have to use the css link tag media attribute value as “screen”.

Please check below example

<link rel="stylesheet" href="{Your css URl}" type="text/css" media="screen" />

and also use the view-port meta tag

<meta name="viewport" content="width=device-width">

And then use the media queries in your css

/* iPad Portrait */

@media only screen and (max-width: 768px) {
 Your Style here

/* iPad Landscape */

@media only screen and (max-width: 1024px) {
Your Style here
@media only screen and (max-width: 940px) {
Your Style here

/*layouts smaller than 600px, iPhone and mobiles*/
@media only screen and (max-width: 480px), screen and (max-device-width: 480px), screen and (max-width: 600px)  {
Your Style here

/* iPhone Landscape */
@media screen and (max-width: 480px) and (orientation: landscape) {
Your Style here

/* iPhone Portrait */
@media screen and (max-width: 480px) and (orientation: portrait) {
Your Style here