-
Recent Posts
Recent Comments
Archives
Categories
Meta
Tag Archives: wordpress
Filter WordPress menu
// Filter wp_nav_menu() to add additional links and other output function new_nav_menu_items($items) { // gets passed a string of <li>’s $homelink = ‘<li><a href=”‘ . home_url( ‘/’ ) . ‘”>’ . __(‘Home’) . ‘</a></li>’; $items = $homelink . $items; return … Continue reading
Find and replace in MYSQL
Updating Data in MYSql update [table_name] set [field_name] = replace([field_name],’[string_to_find]‘,’[string_to_replace]‘); For moving wordpress installs to repair the guid UPDATE wp_posts SET guid = replace( guid, ‘web/’, ” ) ;
Posted in MySQL, Wordpress
Tagged data manipulation, data transfer, mysql, sql, wordpress
Comments Off
WordPress Super Loop
// if everything is in place and ready, let’s start the loop <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> // to display ‘n’ number of posts, we need to execute the loop ‘n’ number … Continue reading
List all hooked functions
10. List All Hooked Functions The problem. When things go wrong, listing all hooked functions can be very useful for debugging. The solution. As with the others, this code has to be pasted in your functions.php file. When you have … Continue reading
get the title of a post
A gemn of a function found of the wordpress codex, very useful is get_the_title(ID) find it here: http://codex.wordpress.org/Function_Reference/get_the_title
WordPress Plugin Query
I am often cutting and pasting this in wordpress plugins $query = “SELECT id, post_title FROM ” . $wpdb->prefix . “posts WHERE post_type = ‘wpf_venue’ AND post_status=’publish’”; $venues = $wpdb->get_results ( $query, ARRAY_A );
Speed up WordPress
After a bit of digging around inside wp-ecommerce the category images were loading like a 300 k progressive jpg on a 5.6k modem – not cool. So after a forum search on getshopped.org this plugin was recommened http://wordpress.org/extend/plugins/w3-total-cache/

