Showing posts with label wordpress. Show all posts
Showing posts with label wordpress. Show all posts

Wednesday 1 April 2015

How to add custom sidebar in wordpress

How to add custom sidebar in wordpress


Hello

Here Example of add custom sidebar in wordpress

please check it below code.

here example to add custom sidebar.

function theme_slug_widgets_init() {

register_sidebar( array(
        'name' => __( 'Header Sidebar', 'theme-slug' ),
        'id' => 'home-header-1',
        'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'theme-slug' ),
        'before_title' => '

',

        'after_title' => '
',
    ) );

}
add_action( 'widgets_init', 'theme_slug_widgets_init' );

here to add custom sidebar in wordpress
name : you can add your sidebar name
id : it can use to uniq and call siderbar in wordpress
description: it can be what can be added in siderbar 
and what to add for this just description for end user
knowledge where to add this sidebar
before_title and after title: here name display h1 tag in you can change in tag. or html of before title and after title.

if you want to add this siderbar check below code

if ( is_active_sidebar( 'home-header-1' ) ) : 
 dynamic_sidebar( 'home-header-1' )
endif

here dynamic_sidebar add siderbar id if sidebar is active then
it will call

How To remove default jquery in wordpress

How To remove default jquery in wordpress


Hello

If you want to remove the WordPress default jquery in wordpress

just check below code you can understand how to remove that add your js.

How to add Jquery in footer in wordpress

How to add Jquery in footer in wordpress

Hello

here the if you want add jquery file (js file) in footer then 
check it below code.

How To add jquery and css in child theme or theme Wordpress

How To add  jquery and css in child theme or theme Wordpress


Hello 

Here We learn that how to add js and css in your theme or child theme.

When you want to add jquery and css using code then fist open your functions.php file

Here add this code for add jquery.

Friday 6 March 2015

create slider plugin in wordpress

Create slider plugin in WordPress



here Simple Code 

Step create plugin plugin folder, create folder and 
create country.php file.(wp-content\plugins\country\contry.php)


<?php
/**
* Plugin Name: Country slider
* Plugin URI: http://myphpinformation.blogspot.in//
* Description: A brief description of the plugin.
*/
?>

Sunday 1 March 2015

How To create shortcode in Wordpress

How To create shortcode in Wordpress

The shortcode API in wordpress allows you to create your own shortcodes by adding functions to your theme functions.php template (this is located at www.example.com/wp-content/themes/yourtheme/).

You can also create shortcode for plugin. it can be use in your wordpress page.

Here simple shortcode Example for Wordpress

Friday 13 February 2015

How to Replace ‘Enter Title Here’ Text in WordPress


How to Replace ‘Enter Title Here’ Text in WordPress 



If you want to text of wordpress post placeholder "Enter Title here"

please check below code.


Thursday 12 February 2015

Adding a logo uploader to your WordPress theme with the Theme Customizer



Adding a logo uploader to your WordPress theme with the Theme Customizer

Here Simple code of adding logo in wordpress theme 

i am write this code.

some refrence site for it more detail 

2)http://themefoundation.com/wordpress-theme-customizer/