Bootstrap Templates Bundle

Sunday, May 12, 2013

How to change-the-wordpress-blog-text-editor-font-size in wordpress

Some one wants to change the font size of wordpress text editor for easy to see at time of posting. Here I tell you the procedure How to change-the-wordpress-blog-text-editor-font-size in wordpress
Go to  /wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css
on line 40 you can see that


/* WordPress styles */
body {
font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
font-size: 13px;
line-height: 19px;
color: #333;
margin: 10px;
}

Change the font size as your need. Change also line height, which will be greater than the font-size.

Visit my website: www.bestcareerbd.com

Tuesday, May 7, 2013

popular post by category or category.php


Add this on functions.php:


function getPostViews($postID){
    $count_key = 'post_views_count';
    $count = get_post_meta($postID, $count_key, true);
    if($count==''){
        delete_post_meta($postID, $count_key);
        add_post_meta($postID, $count_key, '0');
        return "0 View";
    }
    return $count.' Views';
}
function setPostViews($postID) {
    $count_key = 'post_views_count';
    $count = get_post_meta($postID, $count_key, true);
    if($count==''){
        $count = 0;
        delete_post_meta($postID, $count_key);
        add_post_meta($postID, $count_key, '0');
    }else{
        $count++;
        update_post_meta($postID, $count_key, $count);
    }
}

The add this when the loop starts within single.php:

<?php setPostViews(get_the_ID()); ?>

Add this where you want to show page view

<?php echo getPostViews(get_the_ID()); ?>



Popular post: for all categories
 <?php

query_posts('meta_key=post_views_count&orderby=meta_value_num&order=DESC&showposts=2&offset=4');
if (have_posts()) : while (have_posts()) : the_post(); ?>
               
                <li class="liHeadList"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
                <?php
endwhile; endif;
wp_reset_query();
?>



popular post: for all category.php 

<?php
$category = get_the_category();
query_posts('meta_key=post_views_count&orderby=meta_value_num&order=DESC&showposts=3&&category_name='.$category[0]->cat_name.'&cat=$category_id');
if (have_posts()) : while (have_posts()) : the_post(); ?>              
                <li class="liHeadList"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>              
                <?php
endwhile; endif;
wp_reset_query();
?>

Wokiee React eCommerce Template