View Categories

Tutorial: MH Custom Pages Widget

The MH Custom Pages widget, which is included in MH Magazine, has been developed to display pages based on page IDs. This custom widget is especially suitable if you want to present pages on your front page or sidebar. By using the MH Custom Pages widget you can display pages including thumbnail, page title as well as excerpts to teaser the particular page so your readers know what they can expect on that page. If you are looking for a widget to display your pages nicely or if your website mostly contains pages instead of posts, this widget can come quite handy for you.

In this tutorial we are going to show you how to use the MH Custom Pages widget to display pages on your WordPress website. You will learn how to filter pages by page ID and how to manage excerpts and thumbnails within the widget. By watching the available video tutorial, you can see how the layout of the MH Custom Pages widget will look like when being placed into different widget areas.

Widget Options – Control the widgets contents #

The MH Custom Pages widget offers a couple of useful options you can take advantage of to display your content. You may enter a title for the widget and link this title to a specific URL if you like. You can further filter multiple pages by ID and you can make use of settings for the text excerpts and the thumbnails within this custom widget. Now let's go into detail.

Page IDs - How to find the ID # of pages in WordPress #

If you would like to display selected pages within the MH Custom Pages widget, you need to enter the particular page IDs. To find out the page ID of a certain page in WordPress, please navigate to Pages in your WordPress dashboard and there you will find an overview of all your available pages.

When you now hover with your mouse over a certain page name in the list, you'll notice a URL popping up (usually at the bottom of your browser window) which contains the page ID you are looking for (e.g. post=229). In this example, the ID of the particular page is 229, which you can enter into the provided field within the widget. You might wonder why it says post instead of page in the URL, this is because technically pages in WordPress are posts (post types) as well. If you would like to display multiple pages in the widget, simply enter the IDs separated by comma (e.g. 229, 5, 120).

See the video tutorial: Page IDs - How to find the ID # of pages

Widget settings for text excerpts #

Using the MH Custom Pages widget allows you to display excerpts for your pages as well. If you have not entered custom excerpts for the particular pages within the widget, then automatically the first few words of your page content will be used as excerpt. The excerpt length can be adjusted within the widget options under Custom Excerpt Length in Words. If you decide to display custom excerpts instead, you need to navigate to the particular page and enter the custom excerpt text into the provided Excerpt field below the WordPress editor.

When making use of the option to display excerpts in the widget, you can choose to display excerpts for the first page in the widget, for all pages or for none of them. Dependent on your excerpt settings and the related layout of the widget, small or large thumbnails based on uploaded featured images for the pages will be shown accordingly (for thumbnail settings please see the next section).

Widget settings for thumbnails #

To display thumbnails for your pages within the widget, you need to upload featured images for the particular pages. The featured images however will not be shown on the page itself, but only be used for thumbnails in widgets and on archives on your WordPress website. The MH Custom Pages widget allows you to display large and small thumbnails or to disable thumbnails entirely. When using the Thumbnails option within the widget, you can select from the following: Show all Thumbnails, Hide all Thumbnails, Hide only large Thumbnails or Hide only small Thumbnails.

The size of the thumbnails within the MH Custom Pages widget depends on your settings for excerpts. For example if you display 5 pages within the widget and have enabled the excerpt for the first page, then by default, you will have one large thumbnail for the first page and 4 smaller thumbnails for the other pages. If you enable excerpts for all pages in the widget, all pages will have large thumbnails and in case you've disabled excerpts for the widget, your pages will have small thumbnails instead to ensure an appealing and consistent layout for the MH Custom Pages widget.

See the complete video tutorial: Widget Options - Control the widgets contents

Widget Examples – Using the widget options to create layouts #

In the tutorial video you can have a look at a couple of examples for the MH Custom Pages widget, where we have placed the widget into widget areas of different widths - full-width, 2/3 and 1/3 width. If you like, you are welcome to replicate this on your own WordPress website or you can place the MH Custom Pages in any of the available widget areas as you like.

See the video tutorial: Widget Examples - Using the widget options to create layouts

Updated on 29. November 2023

Stay in touch with us!

Join our newsletter and we let you know about new theme releases,
as well as important updates and discounts.

Latest news from our blog: Get Excited: The Top 3 CMS-Based Theme Marketplaces (7. February 2025)