Auto create description in post

You need to use save_post_post hook and use $wpdb->update() method. The code – add_action( ‘my_save_post_post’, ‘save_post_post’ ); function my_save_post_($post_ID, $post ) { global $wpdb; $post_content=”You are viewing “. $post->post_title .’! These are great hairstyle designs in our ‘. get_the_category_list( ‘, ‘, ”, $post_ID ) .’ section. Hope you try this look and feel on your … Read more

if is_bbPress register jquery

Completely out of any context (since it’s really not specified in the question), the correct method to enqueue jQuery only in the context of bbPress is to add an appropriate conditional inside of a callback, hooked into wp_enqueue_scripts. For example, the following would be defined in functions.php (i.e. not in a template or template-part file): … Read more

Template setting is not saving in wordpress

Try naming the file page-template-articles.php but leave the file contents and header name – “Template Name: Articles” the same. Right now, you might be running into a reserved naming collision within WP with how Custom Post Type templates are named, i.e. articles-page.php is a page template name for a CPT called articles.