Wednesday, April 13, 2016

How to use Custom logo Feature in your Theme using wordpress 4.5

Custom Logo is a powerful Feature added in WordPress 4.5. Using this features helps you to easily change logo by simple uploading a logo image. if you are using theme option or WP customizer previously for custom logo then it saves your time..

To use custom logo feature in your Theme, you first need to conform that you are updated to WordPress 4.5.

Here are the steps to Implement custom logo

custom logo is wordpress core feature, you need to define support for custom logo. To define support for custom logo. Paste below code to your function.php

Enable support for custom logo in function.php
// Enable support for custom logo.
add_theme_support( 'custom-logo');


you can also define image size and other parameter like width, height
// Enable support for custom logo.
add_theme_support( 'custom-logo', array(
'height' => 80,
'width' => 360,
'flex-width' => true, (Whether to allow for a flexible width.)
'flex-height' => true, (Whether to allow for a flexible height.)
) );

Now you can see custom logo in customizer's Site Identity section

To Retrieve Logo in your themes front end, you can use three themplate

get_custom_logo( $blog_id = 0 )
Returns markup for a custom logo.
the_custom_logo( $blog_id = 0 )
Displays markup for a custom logo.
has_custom_logo( $blog_id = 0 )
Returns a boolean true/false, whether a custom logo is set or not.

for Example I've created a function to retrieve logo and call function in header.php

// retrive logo from customizer
function griffion_custom_logo() {
if ( function_exists( 'the_custom_logo' ) ) {
the_custom_logo();
}
}
call function to display logo
<?php griffion_custom_logo(); ?>


Thank you for Visiting My Blog. Thank you. Have good time 

Friday, November 28, 2014

Kathmandu city in Picture

Kathmandu City During 18th SAARC Submit

Nepal, country of World Highest Peak, Mount Everest and country of Lord Gautam Buddha is a paradise on earth. Nepal has 8 out of 10 of the world's tallest mountain.

 Nepal has tremendous geographic diversity. It rises from as low as 59 metres (194 ft) elevation in the tropical Terai—the northern rim of the Gangetic Plain, beyond the perpetual snow line to some 90 peaks over 7,000 metres (22,966 ft) including Earth's highest 8,848 metres (29,029 ft) Mount Everest or Sagarmatha.

Nepal is Divided into three Geographical Region. Terai, Hill, and Mountain. Farming. Tourism, Hydro-electricity may be the great prospect for Nepal and the largest source of Foreign Exchange. There are many eye-catching places in Nepal that makes visitor gazed for long time. some of the places includes Nagarkot, Tea Estate Illam, Pokhara, Birth place of lord Buddha Lumbini, various Mountain ranges etc. 

Below are some of the pictures of Kathmandu city..

Image taken from different online news site

New baneshwor
New Baneshwor

constitutional assembly
Constitutional Assembly

Bhadrakali-singhdurbar road
Bhadrakali

maitighar - way to bhadrakali
Maitighar

Babarmahal
Babarmahal

Singhdurbar
Singhdurbar

Babarmahal
Babarmahal

clock Tower
Clock Tower

Rastriya Sabha Ghriha
National Conference Hall

Tinkune-Maitigahr Road
Tinkune-Maitighar Road

kathmandu
Kathmandu

Rani pokhari
Rani Pokhari

Rani pokhari
Rani pokhari

Durbar Marga
Kings Road