Wednesday 15 April 2015

create custom loader in jquery and css

<script type="text/javascript">
$(document).ready(function(){
   
     jQuery('#link').click(function(){
       
     var link_value =  jQuery(this).attr('value');
     //alert(link_value);
     pagination(link_value);
     
});
   
});

function pagination(link_value){
   
    jQuery("#ldr").show();
    jQuery.ajax({
    type: "GET",
    url: "http://example.com/",
    dataType : "html",
    data: {link_value: link_value},
    success: function(response){
    jQuery('.gallery').html(response);
    jQuery("#ldr").hide();
    },
});
     
   
}
</script>
<div id="ldr" style="z-index: 99999999;display: none; position: fixed; height: 100%; width: 100%; background: url("http://www.example.com/image/ajax_loader_blue_512.gif") no-repeat scroll center center rgba(0, 0, 0, 0.5);">
</div>
<label value="20" id="link">20
<div class="gallery"></div>

Monday 13 April 2015

Set your custom temple in your cms page or using xml file magento

Set your custom temple in your cms page or using xml file

Hello

In Cms Page

Step 1: Goto Cms -> Pages

In add new page or edit your page

Step 2 : In cms page goto -> Design tab

in layout upadate




step3. save

page







cms page tempalte

Friday 3 April 2015

How to add static block call in phtml,xml and cms page in magento

How to add static block call in phtml,xml and cms page in magento


Hello Here sample code add static block in phtml,xml  and cms page.

In your Phtml File in magento


<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('set your block id')->toHtml() ?>

herer set i am setting my block

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('block-header-top1')->toHtml() ?>

In your xml file

  <reference name="content">
    <block type="cms/block" name="home-page-block">
      <action method="setBlockId">add your block id
    </block>
  </reference>

In Your cms page

{{block type="cms/block" block_id="add your block id "}}

I hope this blog help you to add static block in your magento  any suggetion for me please comment it.


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.