• Get In Touch
June 2, 2017

WordPress – Grid Design and Pagination

Using Wordpress? Get our lightening fast Wordpress Optimised Hosting.
Get Wordpress Hosting

Steve Jobs once said that design is not just about how something looks, but also how it works. While that’s true, the reality is that people think more of appearance when we talk about design than the inner workings of an object. “Woops that site has a really amazing design”, well, meaning it has an amazing appearance, not just that it works so well. “I need to hire a web designer not a web developer”, well, he means he is looking for someone to customize the visual aspects of the website, not tinker with how things run in the metal.

But design is not just something that only Steve Jobs or the recent generations have taken seriously. Complex designs have been present since antiquity. We majorly talk about Grid design today, and it’s tempting to think of it first being used in the web. However, we couldn’t be far from the truth. Grid design has been applied for a very long time.

Most information is often presented as a list of posts. This is very effective and quite common. However, there are alternatives which to some people like myself prefer. One such alternative is Grid design or it’s variations like Masonry.

I love using Grids in my blogs to display posts. I intuitively prefer it to lists, especially if you have lots of posts.

One very good example of where it’s implemented quite well is the WordPress plugins’ portal.

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/981838375.png” alt=”Grid Design” />

It’s much easier to browse through thousands of plugins via a grid than a list. In a single viewport, you can present more plugins than with lists. Lists would require a lot of scrolling. Grids always look more compact compared to lists. Say you want to search a plugin, you don’t have to scroll to the top to find search form, yet it displays more plugins per viewport than the lists. Grid design makes efficient use of space.

The majority of folk tend to use grids only with media files like images and videos. Sites like YouTube and Pinterest use a lot of grids to display galleries of videos or images. However, grids can be very good with posts as well.

Objectives

The objectives of this tutorial is to show how to:
– Employ Grids in showing of posts.
– Show posts in Collapsible list.
– Show posts in Scrollable list.
– Paginate posts, and navigate among pages via Ajax.

Installation

We are using the ‘Post Grid & List for WordPress – Content Views’ plugin. Let’s install it:

  1. Head over to WordPress plugins portal. Search ‘grid’.
    HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/990709421.png” alt=”Install Content Views” />
  2. Click ‘Install Now’ button to install our plugin.
  3. Click ‘Activate’ button to activate it.

Creating a Grid

You can create unlimited Grids with this plugin. Once the plugin is activated:

  • Click the ‘Add New’ menu item under the content views as shown below.

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/224090589.png” alt=”Add New Page” />

  • Type the Grid name then choose the content type. Leave the ‘Limit’ section blank as I have done below if you prefer to have all the posts available for display in the grid. Note that this is not pagination, we shall be able to page these posts later.

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/1969337695.png” alt=”Grid Name and Type” />

  • Select Filter and Sort methods.

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/1202227659.png” alt=”Filter and Sort Methods” />

  • Next let’s move over to the ‘Display Settings’ tab.

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/982980973.png” alt=”Display Settings” />

  • From the above you can see we have three types of layouts: Grid, Collapsible list and Scrollable list. Let’s choose grid, we’ll see a demo of the other two later.

  • Our grid is responsive, it will adjust appropriately to a device’s resolution. Choose the number of columns you would love to be shown per device. It’s only wise you show a single column in a mobile device.

  • Choose how you would like the image and text to be displayed.

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/826106672.png” alt=”Title and Thumbnail Settings” />

  • Choose the fields you would like shown per grid, e.g. title, content, categories etc.
    HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/670294499.png” alt=”Content and Meta Fields” />

  • Choose whether you would like the posts to be paginated. You can then navigate to the next page either via Ajax or by full page loading.

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/1425308421.png” alt=”Pagination Settings” />

RESULTS

Grid

Here’s our grid with images, text and categories.

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/954140997.png” alt=”Grid result” />

Collapsible List

You can also choose to display collapsible list instead of grid. Just choose it in the radiobutton as below:

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/944433154.png” alt=”Choose Collapsible” />

Here’s the result:
HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/613623019.png” alt=”Collapsible with pagination” />

Scrollable List

You can choose to display a scrollable list as below:

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/1589257359.png” alt=”Choose Scrollable” />

Then you get this as the result:

HP_NO_IMG/data/uploads/users/a4c0adcd-8650-4b65-9b01-9dd628e70757/1876983164.png” alt=”Scrollable Result” />

Conclusion

In this post we have seen how to use it to create grid posts, Ccollapsible lists as well as scrollable lists. Our plugin enables us implement numbered pagination. We could then navigate pages either via Ajax or full page loading.

A single grid could contain fields like title and content as well as an image. Moreover, we can easily set the number of columns to display per device. We have agreed that a mobile should in most cases have a single column. Let’s therefore go ahead and implement the grid design in our blogs.

Using Wordpress? Get our lightening fast Wordpress Optimised Hosting.
Get Wordpress Hosting

Share this Article!

Related Posts

Node.js Authentication – A Complete Guide with Passport and JWT

Node.js Authentication – A Complete Guide with Passport and JWT

Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will be avoided or at least […]

Node.js and MongoDB: How to Connect MongoDB With Node

Node.js and MongoDB: How to Connect MongoDB With Node

MongoDB is a document-oriented NoSQL database, which was born in 2007 in California as a service to be used within a larger project, but which soon became an independent and open-source product. It stores documents in JSON, a format based on JavaScript and simpler than XML, but still with good expressiveness. It is the dominant […]

Using MySQL with Node.js: A Complete Tutorial

Using MySQL with Node.js: A Complete Tutorial

Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you need to scale an application, […]

Node.Js Vs Django: Which Is the Best for Your Project

Node.Js Vs Django: Which Is the Best for Your Project

Django and NodeJs are two powerful technologies for web development, both have great functionality, versatile applications, and a great user interface. Both are open source and can be used for free. But which one fits your project best? NodeJs is based on JavaScript, while Django is written in Python. These are two equally popular technologies […]

Nodejs Vs PHP:  Which Works Best?

Nodejs Vs PHP: Which Works Best?

Before getting into the “battle” between Node.js and PHP we need to understand why the issue is still ongoing. It all started with the increased demand for smartphone applications, their success forcing developers to adapt to new back-end technologies that could handle a multitude of simultaneous requests. JavaScript has always been identified as a client-side […]