custom page url slug needs illegal ?id=1 for javascript

Here’s a potential solution using the page_link filter and testing for the presence of a meta key to add a query arg: function wpa84303_page_query_arg( $permalink, $page, $sample ) { if( $query_arg = get_post_meta( $page, ‘query_arg’, true ) ) $permalink = add_query_arg( ‘id’, ‘0’, $permalink ); return $permalink; } add_filter( ‘page_link’, ‘wpa84303_page_query_arg’, 10, 3 ); Add … Read more

finding out the top 5 source ( source is a custom taxonomy ), in a given category

Thanks to some leads from the wp-hackers list on this very question and some googling around, here is the answer to my problem $sql = “SELECT count(*) as count,terms2.name as tag FROM wp_posts as p1 LEFT JOIN wp_term_relationships as r1 ON p1.ID = r1.object_ID LEFT JOIN wp_term_taxonomy as t1 ON r1.term_taxonomy_id = t1.term_taxonomy_id LEFT JOIN … Read more

Custom loop page with post navigation

I ended up creating two loops and utilizing anchors. I’m not sure if it’s the most efficient way of doing things, however, it works. add_action( ‘genesis_post_content’, ‘child_do_content’ ); // Adds your custom page code/content function child_do_content() {?> <ul class=”multicol”> <?php $custom_query = new WP_Query(array(‘orderby’ => ‘title’, ‘order’ => ‘ASC’,’cat=5′)); while($custom_query->have_posts()) : $custom_query->the_post();?> <li><a href=”#<?php the_title(); … Read more

Show last post of employee in his profile page

You can use the following code to get the most recent post by a given Author, just un-comment one of the two lines as appropriate. See the Codex for more info on WP_Query. The Codex entry is pretty long, so scroll down to the Parameters section for more info on the various options you can … Read more

How to back-up a database on IIS

I was able to find the name of the database in word-press’s wp-config.php file under the and was able to create a back-up of the file using MSQL workbench and the tutorial found here http://community.discountasp.net/showthread.php?t=11972.

Static pages not being allowed

There are many things to check for. It sounds like you are not doing anything ‘complex’ so I’d start by looking at the theme you are using to see if it has its own custom settings for ‘front page’ type features. Maybe those are getting in the way? Sorry, without any more detailed information, it’s … Read more