How to Add Pagination to WordPress

Pagination is a must have feature of a blog, which helps in easy navigation and faster page load time. If your blog has got 50 posts and all of them are loaded at the same time on single page, it would load very slowly and will definitely increase the bounce rate. So, pagination helps distribute the content in multiple pages.

If you are running your blog on wordpress then there are various plugins to implement pagination. Apart from plugins, there are manual ways of doint it through code:

Numeric Pagination

[gist id=”28ef9984299d7714659f05483f90fcec” file=”wp-pagination.php”]

Add above code to functions.php file of your theme. Now, call the above function numeric_pagination() after posts loop in the index.php file. Know more about paginate_links on codex.

Simple Pagination

If you don’t want to use numeric pagination, then simply call the_posts_navigation() function after posts loop. Know more about the_posts_navigation on codex.

Plugins

There are many plugins available in wordpress.org to implement pagination. If you don’t know coding then i would advice you to use a plugin.

 

How to Remove Page Titles from Woocommerce Pages

In this tutorial, you will learn how to remove page titles from woocommerce pages. Woocommerce comes with a lot of hooks and filters, so we are going to use a filter to do this job.

[pastacode lang=”php” manual=”function%20wc_hide_page_title()%0A%7B%0A%09return%20false%3B%0A%7D%0Aadd_filter(%20’woocommerce_show_page_title’%2C%20’wc_hide_page_title’%20)%3B” message=”” highlight=”” provider=”manual”/]

The above code will remove titles from all woocommerce pages. In case, you want to remove it from a specific page then we need to use conditional tags available in woocommerce. Lets remove titles from Shop page only.

[pastacode lang=”php” manual=”function%20wc_hide_page_title()%0A%7B%0A%09if(%20!is_shop()%20)%20%2F%2F%20is_shop%20is%20the%20conditional%20tag%0A%09%09return%20true%3B%0A%7D%0Aadd_filter(%20’woocommerce_show_page_title’%2C%20’wc_hide_page_title’%20)%3B” message=”” highlight=”” provider=”manual”/]

The above code will return true in case the current page is not a shop page. Hence, the title will be displayed on pages other than Shop page.

How to Schedule your WordPress posts

WordPress has got a very useful feature where you can set date and time for when you want to publish that specific post. Follow these steps to schedule your WordPress post:

 

1. After you have finished writing your post, ¬†click on ‘Edit’ link present just abobe ‘Publish’ button.

 

schedule_post_1

 

2. An option to select date will appear upon clicking the ‘Edit’ link. Choose the desired date and click Ok.

 

.schedule_post_2

 

3. In the end you need to click on ‘Schedule’ button and your wordpress post just got scheduled to be posted in future.