Ayuda con Plugin WP-PostViews

  • Autor Autor Alexander
  • Fecha de inicio Fecha de inicio
A

Alexander

Saludos a todos.

No se si alguien tenga instalado este plugin en su web, resulta que lo instale, pero no logro ver el numero de visitas por cada post, y segui los pasos segun indica el autor de la web WP-PostViews 1.50 Readme

Saludos y gracias.
 
Por lo general al editar el single.php agregando la linea de codigo quete indica puedes hacerlo =)
 
Usa tu ingles o tu traductor:

  1. Open wp-content/themes/<YOUR THEME NAME>/index.php You may place it in archive.php, single.php, post.php or page.php also.
  2. Find:
    <?php while (have_posts()) : the_post(); ?>​
  3. Add Anywhere Below It:
    <?php if(function_exists('the_views')) { the_views(); } ?>​
  4. Go to 'WP-Admin -> Settings -> PostViews' to configure the plugin.
View Stats (With Widgets)

  1. Go to 'WP-Admin -> Appearance -> Widgets'
  2. The widget name is Views.
View Stats (Outside WP Loop)

  • To Display Least Viewed Posts
  • Use:
    <?php if (function_exists('get_least_viewed')): ?>
    <ul>
    <?php get_least_viewed(); ?>
    </ul>
    <?php endif; ?>​
    The first value you pass in is what you want to get, 'post', 'page' or 'both'.
    The second value you pass in is the maximum number of post you want to get.
    Default: get_least_viewed('both', 10);
  • To Display Most Viewed Posts
  • Use:
    <?php if (function_exists('get_most_viewed')): ?>
    <ul>
    <?php get_most_viewed(); ?>
    </ul>
    <?php endif; ?>​
    The first value you pass in is what you want to get, 'post', 'page' or 'both'.
    The second value you pass in is the maximum number of post you want to get.
    Default: get_most_viewed('both', 10);
  • To Display Least Viewed Posts By Tag
  • Use:
    <?php if (function_exists('get_least_viewed_tag')): ?>
    <ul>
    <?php get_least_viewed_tag(); ?>
    </ul>
    <?php endif; ?>​
    The first value you pass in is the tag id.
    The second value you pass in is what you want to get, 'post', 'page' or 'both'.
    The third value you pass in is the maximum number of post you want to get.
    Default: get_least_viewed_tag(1, 'both', 10);
  • To Display Most Viewed Posts By Tag
  • Use:
    <?php if (function_exists('get_most_viewed_tag')): ?>
    <ul>
    <?php get_most_viewed_tag(); ?>
    </ul>
    <?php endif; ?>​
    The first value you pass in is the tag id.
    The second value you pass in is what you want to get, 'post', 'page' or 'both'.
    The third value you pass in is the maximum number of post you want to get.
    Default: get_most_viewed_tag(1, 'both', 10);
  • To Display Least Viewed Posts For A Category
  • Use:
    <?php if (function_exists('get_least_viewed_category')): ?>
    <ul>
    <?php get_least_viewed_category(); ?>
    </ul>
    <?php endif; ?>​
    The first value you pass in is the category id.
    The second value you pass in is what you want to get, 'post', 'page' or 'both'.
    The third value you pass in is the maximum number of post you want to get.
    Default: get_least_viewed_category(1, 'both', 10);
  • To Display Most Viewed Posts For A Category
  • Use:
    <?php if (function_exists('get_most_viewed_category')): ?>
    <ul>
    <?php get_most_viewed_category(); ?>
    </ul>
    <?php endif; ?>​
    The first value you pass in is the category id.
    The second value you pass in is what you want to get, 'post', 'page' or 'both'.
    The third value you pass in is the maximum number of post you want to get.
    Default: get_most_viewed_category(1, 'both', 10);
  • To Sort Most/Least Viewed Posts
  • You can use:
    <?php query_posts('v_sortby=views&v_orderby=desc') ?>​
    Or pass in the variables to the URL:
    You can replace desc with asc if you want the least viewed posts.

Lo veo todo muy claro y ovbio.
 
Gracias crystaldream, se ve un poco complicadito 😀 pero ai vamos...
 
Atrás
Arriba