Wednesday, March 26, 2014

Change the Wordpress Logo in wp-admin login page

User hook login_head

Example

function custom_login_logo() {
echo '<style type="text/css">
h1 a { background-image: url('/images/cutompath.png') !important; background-size:100% !important;width:100% !important;}

</style>';
}
add_action('login_head', 'custom_login_logo');


Friday, March 21, 2014

New Function in wordpress 3.8 (wp star rating)

Description
____________________________________

Outputs a HTML element with the star rating exposed on a 0-5 scale in half star increments (i.e. 1, 1.5, 2 stars). Optionally, if specified, the number of ratings may also be displayed in the title attribute by passing the $number parameter.

By default, only works in admin screens.

<?php wp_star_rating( $args ); ?>

 $args
    (array) (optional) array of arguments
Default: 0 stars

Example
_______________________________________

<?php
$args = array(
  'rating' => 3.5,
  'type' => 'rating',
  'number' => 1234,
);
wp_star_rating( $args );
?>


In order to use this function on the front end, your template must include the wp-admin/includes/template.php file and enqueue the appropriate dashicons CSS font information. Example CSS: 

@font-face {
font-family: "dashicons";
src: url("../fonts/dashicons.eot");
}

@font-face {
font-family: "dashicons";
src: url(data:application/x-font-woff;charset=utf-8;base64,/* !! Large amount of data removed, see wp-includes/css/dashicons.css for complete data !! */) format("woff"),
url("../fonts/dashicons.ttf") format("truetype"),
url("../fonts/dashicons.svg#dashicons") format("svg");
font-weight: normal;
font-style: normal;
}

.star-rating .star-full:before {
    content: "\f155";
}

.star-rating .star-half:before {
    content: "\f459";
}

.star-rating .star-empty:before {
    content: "\f154";
}

.star-rating .star {
    color: #0074A2;
    display: inline-block;
    font-family: dashicons;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    height: 20px;
    line-height: 1;
    text-align: center;
    text-decoration: inherit;
    vertical-align: top;
    width: 20px;
}

Note the font data in the above CSS has been omitted for clarity. This data must be included in working code. Refer to wp-admin/css/dashicons.css

Thursday, March 20, 2014

Adding Payment Method To Order Email In WooCommerce

This is the method I would use since it doesn’t require editing any of WooCommerce e-mail templates, all you have to do is add a few lines of code to your functions.php file.

add_action( 'woocommerce_email_after_order_table', 'iwc_display_payment_method_email_order' );
function iwc_display_payment_method_email_order( $order, $is_administrator_email ) {
    if( $is_administrator_email ) {
        echo '<h3>Payment Method:</h3><p>' . $order->payment_method_title . '</p>';
    }
}

Try removing the if ( $is_admin_email ) { check, and the corresponding }. That if statement was limiting the output to the admin emails only, removing it should add the content to all emails.

Tuesday, March 18, 2014

Levels and Users for WordPress

The WordPress User Levels range from 0 to 10. A User Level 0 (zero) is the lowest possible Level and User Level 10 is the highest Level--meaning User Level 10 has absolute authority (highest permission level). Generally, a given User Level allows the user to edit or modify postings for users that are at a "lower" User Level than themselves. Some User Levels can also add, delete, edit, and change the User Levels of other "lower" Level users. For discussion purposes, all visitors who register and login to a WordPress blog are called users.

The user assigned User Level 10 is the administrative user and is referred to as the admin user in this article. During the WordPress installation process, the install script automatically creates the admin user and assigns User Level 10. Normally, only one user should be permitted the User Level 10 privilege since that Level grants absolute power to control all others.

Tuesday, January 10, 2012

Create custom Wiget

Hello,
For that one follow these steps -

Step 1 - Go in current themes/function.php and search for register_widget register_widget.

Step 2 - Add these lines of code
register_sidebar(array(
'name' => 'Header wiget',
'id' => 'header_wiget',
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '

',
'after_title' => '

',
));

Step 3 - You see your custom wiget in admin of wordpress with name Header Wiget

Step 4 - On what place you want to call your wiget just put these lines

header_wiget is an id which is called in functions.php

Enjoy

Thursday, October 13, 2011

Change of particular node id design

Hi Friends,
Today I am giving tips for particular druapl node id design.
Step 1 - Go to your current theme folder
Step 2 - Then copy page.tpl.php
Step 3 - Paste the file and rename file as page--node--[id].tpl.php
Step 5 - Change your design in following page and save.
Step 6 - Then Clear cache from admin.
That it dear try and enjoy this. and give me your valuable feed back

Tuesday, September 27, 2011

Smothly Go On Top With Hep of Jquery

Hello Friends

Today I bring for you how could you go on top of the page smoothly.
here is small piece of code just put it in head of your page and call the function.
{ src="http://code.jquery.com/jquery.js">}{/script>}
{ language="javascript">}{ function gotop(){ < $('html,body').animate({ scrollTop: $("#demo").offset().top}, 1000);}


after that just call that function on click event of the anchor link or button

Note - Here #demo is the div id. Write the bigger test inside of this div including id put link out side of the div and just see the MAGIC. Replace {} with <>