How to change/ overwrite wordpress backend footer message

Here is code for change/ overwrite wordpress backend thankyou message. Put this code into your current theme function.php file

// Custom WordPress Footer
function remove_footer_admin () {
	echo '© 2012 - WordPress Channel, Aurélien Denis';
add_filter('admin_footer_text', 'remove_footer_admin');

How to change wordpress backend login logo

Here is code to change wordpress backend login logo. Put this code into your current theme function.php file.

function custom_login_logo() {
	echo '<style type="text/css">
	h1 a { background-image: url( !important;width:397px !important;height:75px !important;background-size:397px 75px !important; }
	#login {width:400px !important}
add_action('login_head', 'custom_login_logo');

How to disable wordpress update notification

here is code to disable wordpress backend update notification. put this into your current theme function.php file

function wphidenag() {
remove_action( 'admin_notices', 'update_nag', 3 );

How to add own style css into wp-admin backend using theme function hook

Here is snippet to add own style css into wp-admin backend using theme function hook.

function my_custom_admin_head(){
echo '<style>.yourclass {display: none !important;}</style>';
add_action('admin_head', 'my_custom_admin_head');

How to remove empty lines using regular expression in notpad++

I hope this tips will help you as wed designer to reduce files size by removing empty lines from file using notepadd++

Just Write “^s*” in Find Text box and replace with blank.

Server side responsive with cookies

here is code which i done after searching over google with help of different website.

<script type="text/javascript">
		function setCookie(cname,cvalue,exdays)	{
			var d = new Date();
			var expires = "expires="+d.toGMTString();
			document.cookie = cname+"="+cvalue+"; "+expires;
		windowwidth = document.body.clientWidth;
		var user1=getCookie("wwidth");
		<?php $screenWidth = $_COOKIE['wwidth'] ?>

Condition php code

<?php if ($screenWidth <= 660) { ?>
		<div class="class1" id="content">
	<?php } else { ?>
		<div class="class2" id="content">
	<?php } ?>

How Separate First post from Other in wordpress loop

As wordpress freelancer i found way to first post from Other in wordpress loop. Below is php code for same.

$latest_post = new WP_Query("post_type=post&posts_per_page=5&orderby=date&order=DESC");
if ( $latest_post->have_posts() ) :  $i = 0; while ( $latest_post->have_posts() ) : $latest_post->the_post();
if ( $i == 0 ) { ?>
<?php }else{ ?>
<?php }  

jQuery Get every third/ specific level of element

Here is jquery code to third/ specific level of element

jQuery('#portfolioItem li:nth-child(3n+3)').css({ marginRight: '0px' });

How to get bbpress Topic author id and current user id

Here is code which will show you wordpress bbpress topic author ID and wordpress current user id.

$author_id = get_the_author_meta('ID') ;
$currentuserID = bbp_get_current_user_id();
echo 'Author ID '. $author_id .'';
echo 'Current User Id' .$currentuserID.'';

How to Create wordpresss breadcrumb without plugin

Here is code to show how you can create wordpress breadcrumb feature without installing any plugin.

Open your functions.php and paste the code below in it:

function the_breadcrumb() {
                echo '<ul id="crumbs">';
        if (!is_home()) {
                echo '<li><a href="';
                echo get_option('home');
                echo '">';
                echo 'Home';
                echo "</a></li>";
                if (is_category() || is_single()) {
                        echo '<li>';
                        the_category(' </li><li> ');
                        if (is_single()) {
                                echo "</li><li>";
                                echo '</li>';
                } elseif (is_page()) {
                        echo '<li>';
                        echo the_title();
                        echo '</li>';
        elseif (is_tag()) {single_tag_title();}
        elseif (is_day()) {echo"<li>Archive for "; the_time('F jS, Y'); echo'</li>';}
        elseif (is_month()) {echo"<li>Archive for "; the_time('F, Y'); echo'</li>';}
        elseif (is_year()) {echo"<li>Archive for "; the_time('Y'); echo'</li>';}
        elseif (is_author()) {echo"<li>Author Archive"; echo'</li>';}
        elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {echo "<li>Blog Archives"; echo'</li>';}
        elseif (is_search()) {echo"<li>Search Results"; echo'</li>';}
        echo '</ul>';

Once done, open header.php and call the function:

<?php the_breadcrumb(); ?>

How to add Custom field in custom portfolio type post

Here is solution to add custom field in your custom portfolio entries, for this you must activate the “custom fields” manually.
Open up portfolio.php OR php function where you registering post type “portfolio. portfolio_register() and search for:

'supports' => array('title','thumbnail','excerpt','editor','comments')

Replace it with

'supports' => array('title','thumbnail','excerpt','editor','comments','custom-fields')

How to check post or page has an attachment in wordpress

Here is code to check post or page has an attachment in wordpress. You have to in wordpress loop.

if ( is_attachment() ) {
	echo 'Has an Attachment';
} else {
	echo 'Not has an Attachment';

How to Check the_content is empty in wordpress

Here is code to check the_content is or not empty in wordpress.

 $content = get_the_content();
 if(trim($content) == "") {
 echo '<p>Empty Content</p>'
 } else {
 echo '<p>NOT Empty Content</p>';
} ?>

How to Get a Custom URL for Your Facebook Page in Five Easy Steps

Does your Facebook page’s URL look something like this?

By default, your Facebook page’s URL is made up of your page’s name plus a long number. If you want to put the URL on your business card, or spell it out over the phone, this is obviously not ideal.

The good news is that you can create a custom URL (sometimes called a “vanity URL”) with a username and no number, like this:

In the past, you needed 25 likes to do this, but you can now do this at any time – even when you’re setting up your page.

It only takes a couple of minutes to secure your custom URL, so do it today if at all possible: the longer you delay, the higher the chance that someone will take the username that you want!

1. Login to Facebook and go to your page. (You can find it in the left-hand column of your Facebook home page, under Pages.)

2. At the top of your admin panel, click “Edit page” and select “Update Page Info”, as shown in the screenshot below:

facebook page custom url

You’ll then see this at the top of the Page Info tab:

facebook page custom url

3. Under “Page Address”, click the “Enter a Facebook web address” link, then click the new link that appears – “Create a web address for this Page?”

4. Your page should be automatically selected from the drop-down menu. Enter the username you want and click “Check availability”. You’ll need to make sure your username fits Facebook’s guidelines.

facebook page custom url

5. Make sure you’re happy with your username (and double-check the spelling) before confirming it. Once you’re sure you’re happy, click “Confirm”.

facebook page custom url

And that’s it! You should see this confirmation message:

facebook page custom url

Your old URL will redirect to the new one, so you don’t need to worry about updating your previous links.

Have you had a custom Facebook page URL for ages, or did this post prompt you to get yours? Let us know in the comments.

How to Redirect User to a custom page after registration

Below is code to redirect User to a custom page after registration

function __my_registration_redirect(){
    return home_url( '/my-page' );
add_filter( 'registration_redirect', '__my_registration_redirect' );

Thanks TheDeadMedic for the tip!

how to extract number only for php variable

Here is code to extract number only for php variable

<?php $str = get_comment_author_url();
      $str1 = preg_match('/d+/', $str23);
      echo $str1;
Page 1 of 1112345...10...»

Wordpress Freelancer, Joomla Freelancer Web designer Mumbai india, Wordpress web developer India, Joomla Web developer india, Outsourcing web project india mumbai

By Santosh Kori Published: October 10, 2012 Professional Freelance Website developer 5 stars based on 65 reviews Total time: 24 hour 00 min Wordpress Joomla XHTML CSS jQuery HTML5 eCommerce CSS3 ☞ Offers low cost freelance web designing, asp php web development services from Mumbai India. Freelance web designer & developer Mumbai India.