Tag Archives: WordPress

Custom Paging in WordPress

It is sometimes required in WordPress that you need to include your own paging.This is how i have done it. $rss = fetch_feed($feed_url); if (!is_wp_error( $rss ) ) { $limit = 15; $page = $_GET[‘page’]; if ((!$page) || (is_numeric($page) == … Continue reading

Posted in WordPress | Tagged , | Leave a comment

WordPress disable parent menu using jquery

<script language=javascript> jQuery(“#menu-firstmenu li:has(ul.sub-menu)”).hover(function () { jQuery(this).children(“a”).click(function () { return false; }); }); </script> 

Posted in jquery, WordPress | Tagged , , | 7 Comments

WordPress Posts Counter Widget

I have created a small widget to show total no of posts on your blog.You just need to copy this code and save the file in plugins folder and activate plugin. After that you can drag and drop widget in … Continue reading

Posted in WordPress | Tagged , | 13 Comments

Add read more link in excerpt

By default wordpress adds [..] after every excerpt.I have created a function to remove this sign add your own text. You just need to add this in your functions.php file add_filter(‘wp_trim_excerpt’, custom_excerpt); function custom_excerpt($text) { $text = str_replace(‘[…]’, ‘<a href=”‘ … Continue reading

Posted in WordPress | Tagged , | Leave a comment

WordPress 3.0 features.

(1) Merging of wordpress and wordpress mu. (2)Custom Post and Custom Taxonomies. (3) Featured image on Posts page. (4) Custom menu management feature. (5) Custom header and background APIs. (6) Custom Username and password. (7) Shortlinks. (8) New login form … Continue reading

Posted in WordPress | Tagged | Leave a comment

wordpress disable/remove menu submenus

<?php add_action( ‘_admin_menu’, ‘disable_category_menu’); function disable_category_menu () { global $submenu; if (is_site_admin()) { return; } elseif(!empty($submenu[‘edit.php’])) { foreach($submenu[‘edit.php’] as $key => $sm) { if(__($sm[0]) == “Categories” || $sm[2] == “categories.php”) { unset($submenu[‘edit.php’][$key]); break; } } } if (!empty($submenu[‘themes.php’])) { foreach($submenu[‘themes.php’] … Continue reading

Posted in WordPress | Tagged | 18 Comments

Remove wordpress dashboard widgets.

Very good hack to remove wordpress dashboard widgets. add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’ ); function remove_dashboard_widgets() { global $wp_meta_boxes; // Remove the incomming links widget unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_incoming_links’]); // Removes right now unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_right_now’]); // Removes  primary dashboard unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_primary’]); // Removes secondary dashboard unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_secondary’]); }

Posted in WordPress | Tagged | 10 Comments