WordPress excluding category from pagination the loop
Past below code snippet right before loop and change category ID!
Past below code snippet right before loop and change category ID!
Withing the loop – it will display the post tags $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { echo ''.$tag->name .' '; }
Redirect 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() {
function 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',
function titleLimitChar($title){ if(strlen($title) > 55 && !(is_single()) && !(is_page())){ // not in single post page and page. $title = substr($title,0,55) . ".."; } return $title;
<?php query_posts('cat=-1'); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <h3></h3> <p><?php the_time('F jS,