Scaling a WP eCommerce site

I’ve developed a 55k product ecommerce site using WordPress with the Shopp plugin and can share what I’ve done to MySQL to eke out better performance, YMMV and some (or all) of these may not apply to your situation. Determine how much you need to increase buffers/caches by by looking at the output from a … Read more

get_pages() not ordering as it should

This is indeed an error, and probably caused by the child_of argument. Because child_of requests the whole subtree of the given page (not only the direct children, but also children of those children and so on), WordPress first queries for all the pages and then selects a subset of those pages. The first query respects … Read more

Change admin bar to default:off

add_action(“user_register”, “set_user_admin_bar_false_by_default”, 10, 1); function set_user_admin_bar_false_by_default($user_id) { update_user_meta( $user_id, ‘show_admin_bar_front’, ‘false’ ); update_user_meta( $user_id, ‘show_admin_bar_admin’, ‘false’ ); } Place in theme functions file or you can make into a plugin. Once user registers it will go and set the users admin bar prefs to false. The user can then, once logged in, set this to … Read more

wp_nav_menu remove class and id from li

If you look in the wp_nav_menu() function, you see the items are written by walk_nav_menu_tree(), which calls Walker_Nav_Menu to do the work (unless you specified your own walker class). This class contains a method start_el() that is called for each menu item. In this function, you see that the classes are filtered through nav_menu_css_class and … Read more

What are the ADVANTAGES of ORIGINAL wordpress template structure?

First, as @Toscho implies, the get_header() and get_footer() template tags simply include files named header.php and footer.php, respectively. Both template tags are called from within template files, and you can separate content between template file (index.php) and template part file (header.php, footer.php) any way you want. So, WordPress certainly can accommodate your latter example. That … Read more

How can I add title attributes to next and previous post link functions?

Update As I deleted the Repo on GitHub, here’s a new answer. add_filter( ‘previous_post_link”https://wordpress.stackexchange.com/questions/13044/,”wpse13044_adjacent_post_link_tooltip’, 10, 2 ); add_filter( ‘next_post_link”https://wordpress.stackexchange.com/questions/13044/,”wpse13044_adjacent_post_link_tooltip’, 10, 2 ); function wpse13044_adjacent_post_link_tooltip( $format, $link ) { $previous=”previous_post_link” === current_filter(); // Get the next/previous post object $post = get_adjacent_post( false ,” ,$previous ); // Copypasta from cores `get_adjacent_post_link()` fn ” === $title = get_the_title( … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)