How get the 10 most viewed pages (not post)

If you want to query pages you have to choose post_type=page – of course. Another “problem” is that the commen count isn’t exactly representing post/page views. If you really want page views – not comment count – try something like the function below – I got that from here: http://wpsnipp.com/index.php/functions-php/track-post-views-without-a-plugin-using-post-meta/. function getPostViews($postID){ $count_key = ‘post_views_count’; … Read more

Theme automatically inserting “more” tag on every post

In your archive.php file, you would want to replace this: <div class=”entry-content”> <?php colabs_custom_excerpt(); ?> <p class=”more”> <a href=”https://wordpress.stackexchange.com/questions/105195/<?php the_permalink() ?>”> <?php _e(“More”,”colabsthemes”); ?> </a> </p> With this <div class=”entry-content”> <?php the_excerpt(); // or the_content(); ?> </div><!– .entry-content –> The theme creator is MANUALLY inserting the more button (as you can see). You could just … Read more

Unable to convert all css and js features to WP theme

I prefer changing all: <?php bloginfo(‘template_url’); ?> and <?php bloginfo(‘stylesheet_directory’); ?> into: <?php echo get_template_directory_uri(); ?> For connection to default style.css I prefer to change: <link rel=”stylesheet” href=”https://wordpress.stackexchange.com/questions/105303/<?php bloginfo(“stylesheet_url’); ?>” type=”text/css”> into: <link rel=”stylesheet” type=”text/css” media=”all” href=”https://wordpress.stackexchange.com/questions/105303/<?php bloginfo(“stylesheet_url’ ); ?>” /> I found no script type is defined in any of the scripts: <script src=”https://wordpress.stackexchange.com/questions/105303/<?php … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)