Shortcodes can only be used in Pages, not Posts

You can do this easily with a custom query. Try something like this (I haven’t tested this code, but it should be fine): (EDIT: Changed below to “get_the_post_thumbnail”, also added $post->ID) <ul> <?php $args = array( ‘cat’ => ’17’, ‘posts_per_page’=>20 ); $sponsors_query = new WP_Query( $args ); while ( $sponsors_query->have_posts() ) : $sponsors_query->the_post(); echo ‘<li>’ … Read more

Is there a plugin that will override the “Error establishing a database connection” message? [closed]

http://yoast.com/custom-wordpress-database-error-pages/ You can make your own Database Error page by adding a db-error.php to your wp-content folder (/wp-content/db-error.php). You can find a good example of such a page in the link above. Don’t forget adding header(“HTTP/1.0 500 Internal Server Error”); in that file so it get a proper header message.

Capturing POST data

It points to options.php because it uses the Settings API. Well, not completely, but that’s not the point now. You should not change that. What you can do, to add your own logic: hook into the save process for that option: add_filter( “sanitize_option_webweb-member-status-group”, “your_extra_handler” ); function your_extra_handler( $input ) { if ( isset ( $_POST[‘your_extra_post_field’] … Read more

Editing “Kahi’s Highlight Used Categories” plugin code – highlighting parent and child category in post page

Use the category ID: class KHUC { function wp_list_categories ($text) { global $post; if (is_singular()) { $categories = wp_get_post_categories($post->ID); foreach ($categories as $category_id) { $category = get_category($category_id); $category_parent = get_category($category->category_parent); $text = preg_replace( ‘#class=”([^”]*cat-item-‘.$category->cat_ID.'[^”0-9]*)”#’, ‘class=”$1 used-cat”‘, $text); $text = preg_replace( ‘#class=”([^”]*cat-item-‘.$category_parent->cat_ID.'[^”0-9]*)”#’, ‘class=”$1 used-cat-parent”‘, $text); } } return $text; } } add_filter(‘wp_list_categories’, array(‘KHUC’, ‘wp_list_categories’));

A simple script/plugin to display specific page upon hierarchy of selections

Well, you already have the two particular category IDs, so list the sub-categories. Like so: $cat_list_1 = wp_list_categories(array( ‘echo’ => 1, ‘child_of’ => FIRST_CAT_ID_HERE, ‘title_li’ => ‘A Name for This’, ‘depth’ => 2, // or whatever you like )); $cat_list_2 = wp_list_categories(array( ‘echo’ => 1, ‘child_of’ => SECOND_CAT_ID_HERE, ‘title_li’ => ‘Another Name for This’, ‘depth’ … Read more