Office Address

41/D, West Brahmondi, Narsingdi

Phone Number

+880-1975374887

Email Address

[email protected]

Add logo to wordpress dashboard login without plugin

If you want to change the WordPress dashboard login logo then this piece of code can meet your requirement. Just paste this code in the your theme functions.php [php] function custom_login_logo() { echo ‘<style type="text/css"> h1 a { background-image:url(‘.get_bloginfo(‘template_directory’).’/images/custom-login-logo.png) !important; } </style>’; } add_action(‘login_head’, ‘custom_login_logo’); [/php]

Read More

wpml language switcher shortcode

The do_action('wpml_add_language_selector'); action outputs the language switcher based on the options set in the Custom Language Switchers section in WPML ? Languages. You can use it like this [language_switcher_shortcode]

Read More

Include category id in body_class() and post_class()

Use this code on your themes functions.php to add current category id on body and post [php] function category_id_class($classes) { global $post; foreach ((get_the_category($post->ID)) as $category) $classes[] = ‘cat-‘ . $category->cat_ID . ‘-id’; return $classes; } add_filter(‘post_class’, ‘category_id_class’); add_filter(‘body_class’, ‘category_id_class’); [/php]

Read More

Set a maximum upload count for users on a specific user role

Use the following code to limit 10 upload for specific role [php] add_filter( ‘wp_handle_upload_prefilter’, ‘limit_uploads_for_user_roles’ ); function limit_uploads_for_user_roles( $file ) { $user = wp_get_current_user(); // add the role you want to limit in the array $limit_roles = array(‘contributor’); $filtered = apply_filters( ‘limit_uploads_for_roles’, $limit_roles, $user ); if ( array_intersect( $limit_roles, $user->roles ) ) { $upload_count = […]

Read More
  • April 10, 2013
  • CSS

Best ways to detect IE browser

IE6 is a worse dream for every web developers. Good news is that Software giant Microsoft has released a new website with the expressed aim of killing off its Internet Explorer 6 browser. ie6countdown.com Still we have to deal with IE7 to IE9 Here is some way to cut down your development time by easily […]

Read More

Hidden elements using HTML5

HTML5 introduce the hidden attribute, which will allow you to hide a specific element. So no need to use css display:none anymore! [php]<div hidden>You can’t see this text.This is hidden by HTML5 hidden attribute.</div>[/php] Source: http://html5demos.com/hidden

Read More
  • March 25, 2013
  • CSS

css only tooltip

Here is the html structure for tooltip [php][/php] Lorem ipsum dolor sit [php][/php] And here is the css styles [php][/php]/* base CSS element */ .tip { background: #eee; border: 1px solid #ccc; padding: 10px; border-radius: 8px; box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); position: relative; width: 200px; } /* arrows – :before and :after […]

Read More

Add logo to wordpress dashboard login without plugin

If you want to change the WordPress dashboard login logo then this piece of code can meet your requirement. Just paste this code in the your theme functions.php [php] function custom_login_logo() { echo ‘<style type="text/css"> h1 a { background-image:url(‘.get_bloginfo(‘template_directory’).’/images/custom-login-logo.png) !important; } </style>’; } add_action(‘login_head’, ‘custom_login_logo’); [/php]

Read More