How to display a widget on a page with no theme?

You should read this. It’s completely possible, but you have to go through the right process. First you should register a new “sidebar” and call it whatever you want to call that page you want the widget to display on. Then you need to call that sidebar into the page’s template file, after which you … Read more

Quick press publish post hook

As Wyck said, it’s just a form that uses post.php. To check if QuickPress is the one making the call use: add_action( ‘publish_post’, ‘check_for_quickpress_wpse_109961’ ); function check_for_quickpress_wpse_109961( $post_id ) { if( ‘post-quickpress-publish’ == $_POST[‘action’] ) { // do_something(); } }

insert an html tag using php plugin

You shouldn’t edit the WP Core because it will break at the next update. I believe the easiest way is to use jQuery. Use a filter to add the jQuery code to the page. function cystom_jquery_code() { echo ‘<script> jQuery(“body”).after(“div class=”myClass”></div>”); jQuery(“#wpwrap”).before(“<div class=”beforeClass”></div>”); </script>’; } add_action(‘admin_head’, ‘cystom_jquery_code’);

display unique post per category

Track your post IDs. $cat_args = array( ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘exclude’ => ‘17,1’, ‘number’ => ‘6’ ); $fcategories = get_categories($cat_args); $used_ids = array(); foreach($fcategories as $fcategory) { $post_args = array( ‘posts_per_page’ => 1, ‘cat’ => $fcategory->cat_ID ); if (!empty($used_ids)) { $post_args[‘post__not_in’] = $used_ids; } $fposts = new WP_Query($post_args); if ($fposts->have_posts()) { while($fposts->have_posts()) … Read more

Table appears in Visual mode of editor but not in preview or after publish

Whenever $results_desc->feed_product_desc is empty, the post content is used. Otherwise the content is never used. if (!empty($results_desc->feed_product_desc)){ $content = $results_desc->feed_product_desc; } else { $content = get_the_content(); $content = strip_tags($content); } Whenever the post content is used, all HTML tags are stripped. $content = get_the_content(); $content = strip_tags($content); To get the full content with all the … Read more