Past below code snippet right before loop and change category ID!
Leave a CommentCategory: WordPress Snippets
Withing the loop – it will display the post tags $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { echo ”.$tag->name .’ ‘; }…
Leave a CommentRedirect to different landing page after successful login on wordpress admin panel, if user not a super admin. In your theme’s functions.php: function your_login_redirect() {…
1 Commentfunction titleRestrictionFilter($title){ global $post; $title = $post->post_title; $restrictedWord = “forbidden”; if (stristr( $title, $restrictedWord)) wp_die( __(‘Error: This title is containing restricted word’) ); } add_action(‘publish_post’,…
Leave a Commentfunction titleLimitChar($title){ if(strlen($title) > 55 && !(is_single()) && !(is_page())){ // not in single post page and page. $title = substr($title,0,55) . “..”; } return $title;…
Leave a Comment<?php query_posts(‘cat=-1’); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <h3></h3> <p><?php the_time(‘F jS,…
Leave a Comment