Content Views with Gutenberg

WordPress 5.0 is coming around the corner was released on December 6th, 2018 with one of the biggest change to the editor, it replaces the Classic editor with Gutenberg, a block-based editor which provides a new interface for adding, editing, and manipulating content. It aims to help to create rich and flexible layouts easily.

As a Content Views user, you might put many Content Views shortcodes on your sites. You can be confident that all Content Views shortcodes will continue to work with Gutenberg and WordPress 5.0. Let’s do a quick overview about how the old content is presented in Gutenberg, and how you can prepare your website for Gutenberg.

Continue reading “Content Views with Gutenberg”

Version 4.8 beta released – Faceted search

Live Filter

Update: Version 4.8.0 with the faceted search feature has been released officially on October 5th 2017 (see the release notice)

After months in development, we are excited to share the new feature in the upcoming 4.8 version of Content Views Pro. The beta version has been built and ready to be downloaded on this page or in the Downloads section of your profile page. To help ensure that there are no problems with 4.8, we would like to invite all Pro customers to help test the beta version.

The 4.8 version includes a very new feature “Live Filter”, which supercharges the frontend search & filter functionality of Content Views Pro. It helps you to show faceted search to your site visitors easily without any line of code. Let’s take a look at some benefits of Live Filter.

Continue reading “Version 4.8 beta released – Faceted search”

Content Views Pro is officially WPML compatible!

Dear all customers and friends,
Content Views Pro has supported WPML (the WordPress multilingual plugin) from initial versions. But we didn’t work with WPML team officially yet. Until recently, we had time & chance to work with friends at WPML.

Today we are pleased to announce that we’ve received the official certificate of WPML compatibility for Content Views Pro. This certifies that our plugin as officially WPML compatible and it is multilingual-ready.


content-views-pro

Thank all friends at WPML team for setting up the environment, testing Content Views Pro to confirm it as WPML compatible. Especially, we want to say big thank to all customers, you are the only reason to encourage us to archive this.

Best regards,

How to display WordPress posts in Grid layout: The Easiest Way

You can create as many posts as you want on your WordPress site. And these posts can be shown on the blog page, categories pages, archives pages and search page.

Have you ever wanted to display some WordPress posts in a beautiful grid layout to engage your site visitors?

Unfortunately, displaying some posts in grid layout is not a built-in feature of WordPress core and themes. This article will introduce you the easiest way to display grid of WordPress posts in any theme without coding & hassle.

Grid posts for WordPress
Posts grid for WordPress

Continue reading “How to display WordPress posts in Grid layout: The Easiest Way”

How to display most popular WordPress posts with Content Views Pro?

A popular post has many number of views (visits). As a website owner, you might want to display the most popular WordPress posts in a beautiful layout.
WordPress doesn’t have a built-in feature to count the number of views of each post. There are some WordPress plugins were created to implement this feature, one of them is WP-PostViews.

Here are some easy steps to show your most popular WordPress posts in a beautiful layout, with Content Views Pro:

  • Install & activate the WP-PostViews plugin (*)
  • In Admin area, click Content Views > Add New to start showing the most popular posts.
  • Select the Sort by option in the Filter Settings tab, Advance section of the View
  • In the “Sort by” group, click Add New button, then select options as below image:
     
    CVP - show most popular posts

Notice:

  • This feature is very limited. It is NOT able to show most popular posts by time frame (today, last week, last month, etc.)
  • At the beginning, the View will return no posts found. Because of there are no posts have the views custom field. When someone visits your posts, the views custom field will be created and updated, and you will start seeing the popular posts.
  • (*) In case you want to make it work without an extra plugin, please add this code to file functions.php in the theme’s folder (or install this plugin Code Snippets then add this code to the “Code” textarea):
    /** Enqueue script to count views, support cache plugin */
    add_action( 'wp_enqueue_scripts', 'cv_theme_count_pviews_js', PHP_INT_MAX );
    function cv_theme_count_pviews_js() {
    	if ( !is_singular() ) {
    		return;
    	}
    
    	if ( !wp_script_is( 'jquery', 'done' ) ) {
    		wp_enqueue_script( 'jquery' );
    	}
    
    	// Must use "jquery-migrate"
    	wp_add_inline_script( 'jquery-migrate', 'jQuery(document).ready(function(){	jQuery.ajax({type:"GET",url:"' . admin_url( 'admin-ajax.php' ) . '",data:"post_id=' . $GLOBALS[ 'post' ]->ID . '&action=cv_count_pviews",cache:0});});' );
    }
    
    /** Count views */
    add_action( 'wp_ajax_cv_count_pviews', 'cv_theme_count_pviews_php' );
    add_action( 'wp_ajax_nopriv_cv_count_pviews', 'cv_theme_count_pviews_php' );
    function cv_theme_count_pviews_php() {
    	if ( !isset( $_GET[ 'post_id' ] ) )
    		return;
    
    	$post_id = intval( $_GET[ 'post_id' ] );
    	if ( $post_id > 0 ) {
    		update_post_meta( $post_id, 'views', (int) get_post_meta( $post_id, 'views', true ) + 1 );
    		exit();
    	}
    }
    

Best regards,

Random order doesn’t work on WP Engine Hosting

If you are using WP Engine, you can face a problem: random order doesn’t work.

The reason is ORDER BY RAND() (the MySQL function used to order items randomly) was disabled by WP Engine by default.

WP Engine order randomly issue

If you are using WP Engine, please enable it if you want to order posts randomly.

Best regards,