Define specific category name in PHP

I would advise against query_posts for readability purposes as its easier to make mistakes and you can end up muddled when you nest them. ( You also missed out an equals sign in your syntax. Instead use WP_Query, and check for when no posts are found, e.g. this code: <div class=”category-section”> <h2><?php the_category(); ?></h2> <div … Read more

Custom PHP App with a wordpress site

Assuming you have a page with the slug “teaching-portal”, this plugin adds a rewrite rule for that page that allows one part to be added after it in the URL, what you refer to as “mygetdata”. I’ve called it “lesson”. <?php /** * Plugin Name: Custom PHP app on teaching-portal page * Plugin URI: http://wordpress.stackexchange.com/questions/75991 … Read more

Filtering a Database Query

The table wp_options can normally be queried using get_option() So you can use something like $testimonial_settings = get_option(‘testimonial_settings’); to retrieve the values of testimonial_settings. If the stored value is serialized, it will be retrieved as an array.

How to make widget title accept php?

You can use the filter widget_title and a “virtual” shortcode. Of course, as One Trick Pony points out, the “why” (and the “what”) is essential to find a proper solution… Supposing the widget title was Title [php] More Title: add_filter( ‘widget_title’, ‘pseudo_php_wpse_90360’, 10, 3 ); function pseudo_php_wpse_90360( $title, $instance, $id_base ) { if( FALSE === … Read more