Support » Plugin: WordPress Popular Posts » Consulta

  • Resolved cristianfloyd


    Hola Hector, necesito hacer una modificación al plugin, es lo siguiente: el plugin crea una tabla en sql guarda la cantidad de visitas en el campo “pageviews”. Actualmente uso un plugin que se llama “wp post views” que almacena las impresiones en otra tabla. La pregunta es si existe la posibilidad de actualizar el campo pageviews con el valor del campo de otra tabla + 1, asi podria ordenar los mas vistos por visitas y se corresponderia con la otra tabla.
    Yo vi que actualizas el campo de la siguiente manera: “pageviews = pageviews + 1”, la idea seria que se actualice por cada impresion del post con un valor algo asi: “pageviews = $wpdb->prefix . ‘postviews’ . views + 1”, claro que usando un condicional por si no existe el plugin “post_views()”. Yo no entiendo mucho de sql y no me doy cuenta de como hacerlo.
    Aca este link “” modifique el plugin y muestra la cantidad de visitas del plugin wp_post_views(), pero no estan en el orden de visitas, obvio porque este valor no es el de pageviews.

    Espero tu respuesta saludos.

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi


    Forum Moderator

    These are English language forums. Please use English.

    Sorry, I post translation.

    Hi Hector, I need to make a modification to the plugin, is the following: the plugin creates a table in sql saves the number of visits in the “pageviews”. I currently use a plugin called “wp post views” that stores the impressions in another table. The question is whether it is possible to update the field pageviews with another field value table + 1, so you could order the most viewed by visitors and would match the other table.
    I saw you update the field as follows: “pageviews = pageviews + 1”, the idea would be updated for each impression of the post with a value something like: “pageviews = $ WPDB-> prefix. ‘Postviews’. Views + 1 “, using a conditional clear that if there is no plugin” post_views () “. I do not know much about SQL and I realize how.
    Here this link “” modify the plugin and displays the number of visits wp_post_views plugin (), but are not in the order of visits, obviously because this value is not the of pageviews.

    I hope your answer greetings.

    Plugin Author Héctor Cabrera


    Hi Cristian,

    This would involve some heavy modifications on the DB queries to get it working as WPP would need to join an additional table to extract the data from the WP Post Views plugin. WPP is already joining at least three DB tables, another one would have performance impacts on your site.

    I’ll try to think of another solution for you later, but at the time there’s not much I can do.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Consulta’ is closed to new replies.