WordPress: How to fix the “Site address” during publication

wordpress

How many times happens that, after developing a WordPress website on you local environment, after publishing the new shining website to live, something is broken!?!

What is that? Well, after building all the structure, articles etc on localhost (or anywhere else) nothing works?

Yes, this is due to a Site Address reference stored into the database. Actually, there are really many references to http://localhost/ and changing everything by hand is just a nightmare. Just think about all the internal links between posts / articles, images and so on.
Continue reading

Advertisements

WordPress Page Views Counter

wordpress

Inspired to Author Page Views, this WordPress plugin keeps track of every single view of every single post of the blog. The home page and the single pages will be ignored.

Created for WordPress v 3.8.1

On every post are incremented the user views count for that post and stored the user IP address with a custom expiration datetime (default: 1 day).
On the Dashboard there is a new option that allows the admin to view a complete report per page (Post ID, Post Title, Views), filter per date range and export as a .CSV file.

Is also available an internal function (added as WordPress function) to get the most popular (the most viewed) posts.
The number of popular posts is customizable and you are free to format the returned array as you prefer in your template.

The function is the following

DNDCounter::get_popular_posts(number_of_posts); 

where number_of_posts is 3 by default. It returns an associative array with the following structure

$popular_posts[post_id]['image'] // post thumbnail image 
$popular_posts[post_id]['title'] // post title 
$popular_posts[post_id]['link'] // post link 
$popular_posts[post_id]['count'] // views count