{"id":186,"date":"2011-09-20T14:44:39","date_gmt":"2011-09-20T21:44:39","guid":{"rendered":"http:\/\/www.dognmonkey.com\/techs\/?p=186"},"modified":"2018-01-30T14:48:06","modified_gmt":"2018-01-30T22:48:06","slug":"wp-postviews","status":"publish","type":"post","link":"https:\/\/www.dognmonkey.com\/techs\/wp-postviews.html","title":{"rendered":"WP-PostViews"},"content":{"rendered":"<p><em>One of the plugins I want to add to the blogs is WP-PostViews, this one shows the page view counts on the title index and single pages. The set up is pretty straight forward, although we have to edit the index.php and single.php of our theme. We can download WP-PostViews from the plugins page or just use the add plugins from the admin page. We used the admin page.<\/em><\/p>\n<div class=\"igallery\">\n<p style=\"text-align: center;\"><a class=\"preview\" title=\"get wp_postviews plugin\" href=\"\/media\/wpplugins\/wppostviews\/sm_wp_postview_get.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"vertical-align: baseline; border: 3px solid black;\" title=\"get wp-postviews plugin\" src=\"\/media\/wpplugins\/wppostviews\/tn_wp_postview_get.jpg\" alt=\"get wp-postviews plugin\" width=\"250\" height=\"114\" \/><\/a> <a class=\"preview\" title=\"install wp-postviews\" href=\"\/media\/wpplugins\/wppostviews\/sm_wp_postview_install.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"vertical-align: baseline; border: 3px solid black;\" title=\"wp-postviews installation\" src=\"\/media\/wpplugins\/wppostviews\/tn_wp_postview_install.jpg\" alt=\"wp-postviews installation\" width=\"250\" height=\"64\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><a class=\"preview\" title=\"activate plugin\" href=\"\/media\/wpplugins\/wppostviews\/sm_wp_postview_activate.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"vertical-align: baseline; border: 3px solid black;\" title=\"activate plugin\" src=\"\/media\/wpplugins\/wppostviews\/tn_wp_postview_activate.jpg\" alt=\"activate plugin\" width=\"250\" height=\"107\" \/><\/a> <a class=\"preview\" title=\"wp_postviews settings\" href=\"\/media\/wpplugins\/wppostviews\/sm_wp_postview_settings.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"vertical-align: baseline; border: 3px solid black;\" title=\"wp-postviews settings default\" src=\"\/media\/wpplugins\/wppostviews\/tn_wp_postview_settings.jpg\" alt=\"wp-postviews\" width=\"139\" height=\"250\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><a class=\"preview\" title=\"wp-postviews default settings\" href=\"\/media\/wpplugins\/wppostviews\/sm_wp_postview_default.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"vertical-align: baseline; border: 3px solid black;\" title=\"wp-postviews settings default\" src=\"\/media\/wpplugins\/wppostviews\/tn_wp_postview_default.jpg\" alt=\"wp-postviews settings default\" width=\"250\" height=\"176\" \/><\/a> <a class=\"preview\" title=\"edit index.php\" href=\"\/media\/wpplugins\/wppostviews\/sm_wp_postviews_index.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"vertical-align: baseline; border: 3px solid black;\" title=\"edit index.php\" src=\"\/media\/wpplugins\/wppostviews\/tn_wp_postviews_index.jpg\" alt=\"edit index.php\" width=\"250\" height=\"12\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><a class=\"preview\" title=\"edit single.php\" href=\"\/media\/wpplugins\/wppostviews\/sm_wp_postviews.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"vertical-align: baseline; border: 3px solid black;\" title=\"edit single.php\" src=\"\/media\/wpplugins\/wppostviews\/tn_wp_postviews.jpg\" alt=\"edit single.php\" width=\"250\" height=\"8\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><a class=\"preview\" title=\"add codes in page.php\" href=\"\/media\/wpplugins\/wppostviews\/pageadd.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"vertical-align: baseline; border: 3px solid black;\" title=\"add codes in page.php\" src=\"\/media\/wpplugins\/wppostviews\/tn_pageadd.jpg\" alt=\"add codes in page.php\" width=\"250\" height=\"67\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>The codes that we need to add in the index.php (to display at the main page) and the single.php (to display at single page) and page.php after the &#8220;category&#8221;, before &#8220;edit&#8221; are below.<\/em><\/p>\n<\/div>\n<blockquote>\n<p style=\"text-align: center;\">&lt;?php the_views() ; ?&gt;<\/p>\n<\/blockquote>\n<p style=\"text-align: center;\"><em>If everything is done correctly, we should have the views displayed on both main page and single page after the title.<\/em><\/p>\n<ul class=\"lcp_catlist\" id=\"lcp_instance_0\"><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>One of the plugins I want to add to the blogs is WP-PostViews, this one shows the page view counts on the title index and single pages. The set up is pretty straight forward, although we have to edit the index.php and single.php of our theme. We can download WP-PostViews from the plugins page or <a href=\"https:\/\/www.dognmonkey.com\/techs\/wp-postviews.html\" class=\"more-link\">&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,20],"tags":[211],"class_list":["post-186","post","type-post","status-publish","format-standard","hentry","category-plugins","category-wordpress","tag-wp-postviews-wordpress"],"views":1321,"_links":{"self":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/comments?post=186"}],"version-history":[{"count":3,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/186\/revisions"}],"predecessor-version":[{"id":6752,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/186\/revisions\/6752"}],"wp:attachment":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/media?parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/categories?post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/tags?post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}