Al142
Forum Replies Created
-
Forum: Plugins
In reply to: [WP-PostViews] Views count algorithm, you could explain a bit. Thanks.Thanks
Forum: Themes and Templates
In reply to: [Carton] style in the id="boxes" missingGreat. Thank very much for your reply.
Is it okay to change it this way? Another word, if I move code out of the elseif() section, will it accidentally cause problems to other section?
Here is the code excerpt from functions.php
function bavotasan_add_js() { $bavotasan_theme_options = bavotasan_theme_options(); $var = array(); if ( is_singular() ) { if ( get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } elseif ( !is_page() ) { //$var['loader'] = BAVOTASAN_THEME_URL . '/library/images/ajax-loader.gif'; //$var['more_text'] = '<em>' . __( 'No more posts.', 'carton' ) . '</em>'; //wp_enqueue_script( 'masonry', BAVOTASAN_THEME_URL .'/library/js/masonry.js', '', '3.1.1', true ); } // move code here $var['loader'] = BAVOTASAN_THEME_URL . '/library/images/ajax-loader.gif'; $var['more_text'] = '<em>' . __( 'No more posts.', 'carton' ) . '</em>'; wp_enqueue_script( 'masonry', BAVOTASAN_THEME_URL .'/library/js/masonry.js', '', '3.1.1', true ); //end move code
Thanks again for your help.
Sincerely,
-Al
Forum: Plugins
In reply to: [WP-PostViews] Views count algorithm, you could explain a bit. Thanks.Lester – Thanks again for fast response.
Just to clarify: if I remove is_page(), from the following line
if ( !wp_is_post_revision( $post ) && ( is_single() || is_page() ) ) {
Is it correct to assume that the view value will be counted only when user open single.php?
Thank you very much for your time.
Sincerely,
-Al
Forum: Plugins
In reply to: [WP-PostViews] Views count algorithm, you could explain a bit. Thanks.Thanks Lester for a quick reply.
Do you mean the view value only get count when visitor view single post page (can filter by if is_single() )
or it get count when visitor view any pages? i.e. home page, archive page etc. (can filter by if is_page())
If I would like to have the view count only when visitors see Single post page, where should I change in plugin code?
Thanks again for your time and consideration.
-Al
Forum: Plugins
In reply to: [WP-PostViews] how to clear previous view count value?Thanks
Forum: Plugins
In reply to: [WP-PostViews] Track views with cookie/ipHi Swennet,
May I also have code you mentioned above? Thanks very much.
-Al