Wednesday, August 26, 2020

How to Add Featured Posts in WordPress Sidebar

Do you want to add a featured posts section in the sidebar of your WordPress website?

Displaying your top content as featured posts in the sidebar can help you drive more traffic to your pillar articles.

In this article, we’ll show you how to easily display featured posts in WordPress sidebar using multiple methods.

Easily feature posts in WordPress sidebar

Why Add Featured Posts in WordPress Sidebar?

Sidebars are the non-content area of your website. Most users utilize this space by adding a email newsletter form, social media buttons, and / or displaying banner ads.

Another way you can utilize the sidebar is by displaying your top articles as featured posts. This helps you get more traffic to those articles, and you users are able to discover your best content without looking for it.

Here is how we feature our top articles on WPBeginner. This sidebar widget appears on all pages of our website.

Featured posts WPBeginner

That being said, let’s take a look at how to add featured posts in WordPress sidebar to boost your pageviews and user engagement.

Method 1. Featuring Posts in WordPress Sidebar

This method is pretty straight forward and does not require you to install any plugin on your website.

Simply go to Appearance » Widgets page and add a Text widget to your WordPress sidebar.

Featuring posts in WordPress sidebar using a text widget

This widget comes with a visual editor equipped with a few formatting buttons at the top. You can simply add titles of the posts you want to feature as a bulleted list or plain text.

After that, select the post title and then click on the link button to add link to the blog post.

Once you are done, don’t forget to click on the ‘Save’ button to store your changes.

You can now visit your website to see your featured posts in action. This is how it looked on our demo site.

Featured posts in WordPress sidebar text widget

Method 2. Feature Posts in WordPress Sidebar using Menus

This method is a little indirect but gives you the ability to manage your featured posts more effectively.

Instead of adding the featured post list in a Text widget, we will create a navigation menu and then display it in the sidebar.

The advantage of this method is that you can easily add new posts without editing the widget, and you can reorganize the list with a drag & drop interface.

First, you need to visit the Appearance » Menus page and click on the ‘create a new menu’ link.

Create a new custom menu in WordPress

Next, you need to enter a name for your menu that helps you easily identify it whenever you need to add it somewhere. After that click on the ‘Create Menu’ button to continue.

Enter your new menu name

WordPress will now create a new blank menu for you.

Now, you need to click on the ‘Posts’ tab from the left column to expand it. From here you need to select the posts you want to feature. You can find them under Recent, All, or use the search option to locate and select them.

Select posts you want to feature

After selecting the posts you want to add, click on the ‘Add to Menu’ button. Your posts will now appear in the right column and you can edit each one of their titles by clicking on it. You can also rearrange them by simply dragging them up or down.

Save your menu

Once you are satisfied, click on the ‘Save Menu’ button to store your changes.

Your menu is now ready to be used.

Adding Featured Posts Menu in Sidebar

Simply go to the Appearance » Widgets page and add the ‘Navigation Menu’ widget to your sidebar.

Add Navigation Menu widget to your sidebar

Next, you need to provide a title for your sidebar menu widget and then select the featured posts menu you created earlier from the dropdown menu.

Don’t forget to click on the Save button to store your widget settings. You can now visit your website to see your featured posts list in action.

Featured posts displayed using navigation menu widget

Method 3. Adding Featured Posts in WordPress Using Gutenberg

A lot of users may want to display their feature posts inside a WordPress post or page. They may be using the page editor to create layouts for their homepage or their theme may not have a sidebar.

This method allows you to feature posts in your WordPress posts and pages.

Simply edit a WordPress post or page where you want to showcase your featured posts. On the post edit screen, click on the add new block button (+) at the top and then add the ‘List’ block to your content area.

Add list block

Simply add the title of each blog post you want to feature as an item on the list. Then select the text and click on the link button in the toolbar to create a link to the article.

Once you are done, you can save your changes and update or publish the post. This is how it looked on our demo website.

Reuse The Feature Posts Block

One great feature of the block editor is that you can save block as ‘Reusable block’ and then add the same block in any posts or pages you want.

To make your feature posts block reusable, simply click on the three-dot menu icon in the block toolbar and select ‘Add to reusable blocks’.

Create reusable block

Next, you’ll be asked to provide a name for your reusable block. Give it a name that helps you easily identify it later.

Name your reusable block

Click on the Save button to save your reusable block.

Now, whenever you are editing a post or page where you want to display the feature posts again. Simply click on the add new block button and look for your reusable block by typing its name.

Adding reusable block

You can also edit reusable blocks and it will automatically get updated everywhere. For more details, see our article on how to add reusable blocks in WordPress.

Method 4. Display Featured Posts in WordPress with Thumbnails

A simple plain list of links may often go by unnoticed by your users. Displaying thumbnails with your featured posts would help users notice them more easily.

To do that, we’ll be using a plugin to fetch and display a list of our featured posts along with thumbnails.

First, you need to install and activate the Display Posts plugin. For more details, see our step by step guide on how to install a WordPress plugin.

This plugin allows you to select and display any WordPress posts you want anywhere on your website. It uses shortcodes and allows you to build a custom query using a variety of parameters.

For instance, we’ll be using it to fetch and display the list of your featured posts along with thumbnail and excerpt.

Head over to Appearance » Widgets page and add a ‘Text’ widget to your sidebar. In the text area of the widget, simply add the following shortcode.

[display-posts id="1,1178,1177,1176,1174,1173,1016,1011," image_size="thumbnail" include_excerpt="true" excerpt_length="10"]

Don’t forget to replace the id values to match the IDs of posts that you want to feature.

Tip: See our article on how to locate the post IDs in WordPress.

Now click on the ‘Save’ button to store your widget settings.

You can now visit your website to see it in action. It may not look good out of the box so let’s add some CSS magic to clean it up a little.

Go to the Appearance » Customize page to launch theme customizer. From here click on the Additional CSS tab and you will see a box where you can add your custom CSS.

Custom CSS box

You can now copy and paste the following CSS to the custom CSS box on your website.

ul.display-posts-listing img { 
max-height:50px;
max-width:50px; 
float:left;
padding-right:4px;
}
ul.display-posts-listing li { 
margin-bottom:20px;
font-size:11px;
display:inline-block; 
}

You’ll see live preview of your changes applied on your WordPress blog. Feel free to modify the CSS to meet your requirements.

Once you are done, don’t forget to click on the Publish button at the top to store your custom CSS.

You can now visit your website to see your featured posts with thumbnail and excerpt.

Featured posts with thumbnail and excerpt

We hope this article helped you learn how to easily feature posts in WordPress sidebar. You may also want to see our guide on the best email marketing services and best WordPress SEO plugins to grow your website traffic.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Add Featured Posts in WordPress Sidebar appeared first on WPBeginner.


August 26, 2020 at 05:00PM

Tuesday, August 25, 2020

How to Embed a Facebook Group Feed in WordPress

Do you want to embed posts from your Facebook group on your WordPress website?

Promoting your Facebook group on your WordPress website is a great way to boost engagement on your Facebook group. At the same time, it helps you get more traffic to your website in return.

In this article, we’ll show you how to easily add a Facebook group feed on your WordPress site.

Adding a Facebook group feed to your WordPress site

Why Add Facebook Group Content on Your WordPress Site?

Do you want to drive traffic from Facebook to your website without spending a dollar on Facebook ads?

Facebook groups are an easy way to do that. They are designed to build communities and with little effort, you can build a highly engaged audience around your brand and business.

We created our Facebook group called WPBeginner Engage last year. It already has more than 55,000 active users at the moment, and it is growing at an incredible pace.

However, if have just recently started a blog or website, then you will have to work hard on getting users to join your group and keeping them engaged at the same time.

One easy way to achieve this is by sharing your Facebook group posts on your WordPress site.

This gives your website visitors a chance to check out your group. Once they join it, you get the opportunity to promote your business and send highly motivated visitors back to your website.

That being said, let’s take a look a how to easily promote your Facebook group posts in WordPress.

The finished Facebook group feed showing on our demo website

How to Add Facebook Group Content in WordPress

We will be using the Smash Balloon Custom Facebook Feed Pro plugin to add content from your Facebook group to a WordPress site.

It is the best Facebook plugin for WordPress and allows you to share Facebook content on your website to boost engagement for your groups and Facebook pages.

First, you will need to add Smash Balloon’s Facebook app to the Facebook group that you want to use.

Adding the Smash Balloon App to Your Facebook Group

You need to visit your Facebook group and then click on the ‘Settings’ tab from the left-hand menu.

Click on the Settings tab for your Facebook group

Note: You’ll need admin privileges for the group in order to install an app. If you are not the owner or admin of the group, then please ask an admin to follow these instructions.

Next, go to the bottom of the page where you will see the ‘Advanced Settings’ section. Here, you need to click on the ‘Apps’ pencil icon:

Click on the pencil icon next to Apps

On the next screen, click on the ‘Add Apps’ button:

Click the Add Apps button to add a new app to your Facebook group

Then, go ahead and type ‘Smash Balloon’ into the search bar. The Smash Balloon app should appear. Simply click on it to continue.

Search for and select the Smash Balloon app

You will then see a popup prompting you to confirm that you want to add the Smash Balloon app to your Facebook group. Just click ‘Add’ to continue.

You have now added the Smash Balloon app to your Facebook group.

Connecting WordPress to Your Facebook Group

Next, you need to install and activate the Custom Facebook Feed Pro plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, go to the Facebook Feed » Settings page in your WordPress dashboard. Here, you just need to click on the ‘Connect a Facebook account’ button.

Connect your Facebook account to the Custom Facebook Feed plugin

Next, you’ll see a popup prompting you to select whether you want to display a page or a group. Select ‘Facebook Group’ from the dropdown then click the ‘Continue’ button.

Select Facebook Group from the dropdown menu and click to continue

You need to click to continue on a couple of Facebook prompts. After that, you will see a popup prompting you to select the Facebook group you want to use.

Simply click on your group’s name and then click the ‘Use token for this Group’ button.

Select the group that you want to use on your website

You’ll then see a popup window explaining how to add the Smash Balloon app to your Facebook group. You have already done this, so go ahead and click the ‘Done’ button.

Click the Done button on the popup to continue setting up your Facebook group feed

Don’t forget to click the ‘Save Settings’ button before moving on.

Click the Save button below your connected account details to save your changes

Adding Your Group’s Facebook Feed to Your Site

You can add your group’s Facebook feed to your site straight away. The ‘feed’ contains posts from your Facebook group, shown with the most recent first.

Custom Facebook Feed Pro lets you embed your group content feed into posts, pages, or even in your sidebar.

We are going to add the Facebook feed into a new page on our site. To do this, go to Pages » Add New, then click the (+) icon to add a new block:

Adding the Facebook feed block to a page

You will then see your Facebook group’s feed within the block editor. Go ahead and preview or publish your page to see it live on your site.

Note: We have added some styling to our group’s feed to make it look great on our site. We will explain how to do that in a moment.

The finished Facebook group feed showing on our demo website

Tip: Are some photos or posts missing from your feed? This means those users have set their privacy settings to prevent apps from accessing some or all of their content.

If you are using the classic editor, then you can add your feed to your page using the shortcode [custom-facebook-feed]. Just enter that wherever you want the group’s posts to appear on your page:

Adding your group's posts to a page using the classic editor in WordPress

You can use the same shortcode to add your Facebook group’s feed in your sidebar or any widget-enabled area.

To do this, go to Appearance » Widgets in your WordPress dashboard. Next, add a text widget to your sidebar, then copy and paste the Custom Facebook Feed shortcode into it:

Adding a custom Facebook feed to a widget

Customizing and Styling Your Facebook Group’s Feed

You may want to customize how your Facebook group’s feed displays on your site. To do this, go to Facebook Feed » Customize in your WordPress admin.

Here, you can change lots of settings about how your feed layout will display.

First, let’s go to ‘Post Layout’ and set the posts to ‘Half-width’. This ensures that the text displays alongside the image for each post. Don’t forget to click the ‘Save Changes’ button after making any changes.

Setting your posts to be half width in the Facebook feed from your group

We will also style the posts by clicking on the ‘Style Posts’ tab. We’re going to use the ‘Boxed’ style for our posts.

You may also want to set a rounded corner size of 10px and add a box shadow:

Adding styling to your Facebook feed to create rounded box posts

This is the styling that we applied to our Facebook group feed in the above screenshots. Go ahead and experiment with any other styles that you want to try on your site.

We hope this article helped you learn how to add a Facebook group on your WordPress website. You may also want to see our expert pick of the best Instagram plugins for WordPress, and the best email marketing services to help you convert Facebook group members into email subscribers.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Embed a Facebook Group Feed in WordPress appeared first on WPBeginner.


August 25, 2020 at 05:00PM

Monday, August 24, 2020

How to Write Math Equations in WordPress

Do you want to write math equations in WordPress?

Writing math equations in WordPress is a bit difficult as the default WordPress editor does not come with full support for mathematical equations.

In this article, we will show you how to easily write math equations in WordPress using 3 different methods.

Writing math equations in WordPress

Why Writing Math Equations in WordPress is Difficult?

The way WordPress works is that it dynamically generates your website content and sends HTML output back to the users’ browsers to display it.

Writing mathematical and scientific equations in WordPress is difficult due to the lack of support for the characters in HTML.

Currently, MathML and LaTeX are considered to be the standard for writing mathematical and scientific equations on the web.

Unfortunately, they are both less than ideal for beginners. They both require you to learn their own syntax which could get complicated for longer and more complex equations.

That being said, let’s take a look at how to write math equations in your WordPress blog.

We’ll start off with an easy solution first before showing how to use MathML or LaTeX in WordPress.

Method 1. Writing Math Equations in WordPress using Unicode Characters

This method is simpler and is recommended for users who don’t need to write math equations frequently. For this method, we’ll be using Unicode characters and inserting them directly in the post editor.

Unicode is the encoding standard with the aim to provide character encoding support for all languages. It is supported by all website builders, operating systems, and mobile devices.

Here is how to add mathematical characters in WordPress using Unicode.

1. Adding Unicode Mathematical Characters in Mac

On Mac computers, you can add mathematical operators and characters from the toolbar at the top. Simply click on Edit » Emoji & Symbols or press Command + Control + Space keys on your keyboard.

Character Viewer

This will bring up the ‘Character Viewer’ app in a popup. From here you can select the symbols and characters that you want to insert.

Simply double click on a character to insert it in the WordPress post editor.

You can also format characters in the post editor using the subscript and superscript options in paragraph toolbar.

Using subscript and superscript in WordPress paragraph block

2. Adding Unicode Mathematical Characters in Windows

Windows users can use a similar app to insert mathematical operators and special characters in WordPress post editor.

Simply open the Character Map app by clicking on Start » Windows Accessories » Character Map. This will bring up the showing commonly used characters on screen.

Character Map app in Windows 10

The Character Map app supports many different encodings including Unicode. You can find math operators by selecting the Unicode Subrange under Group.

After locating a character, you need to click to select it and then copy it. Now switch back to the WordPress content editor and paste the character.

Manually adding special characters and mathematical operators is a hassle, but it works if you’re only adding this once in a while.

However, if you regularly need to write mathematical equations on your site, then you’ll be better off learning to use either of the two methods described below.

2. Writing Math Equations in WordPress using LaTeX

LaTeX is a typesetting standard designed specifically for writing technical and scientific documentation. It is widely used in academic circles and is considered to be the de facto standard for writing equations and other scientific documents.

The official LaTeX website has detailed documentation and links to the tutorials and guide that will help you learn how to use it.

We’ll focus on how to bring LaTeX typesetting to your WordPress website.

First, you need to install and activate the WP QuickLaTeX plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to edit the post or page where you want to insert a math equation. On the post edit screen, click on the add new block button (+) and insert the shortcode block to your content.

Shortcode block

Inside the shortcode, you need to add the shortcode [latexpage] followed by your LaTeX code.

Adding a LaTeX command in a shortcode block

You can now save your post and preview it to see your math equation with formatting.

A math equation displayed in WordPress using LaTeX

An easier way to generate the code that you need to paste is by using an offline LaTeX app for your operating system or a web-based LaTeX environment like Overleaf.

Overleaf

You can then copy and paste your equations in the shortcode block in WordPress.

3. Writing Math Equations in WordPress using MathML

MathML is a markup language designed to easily publish mathematical equations on the web. It uses a semantic XML markup similar to HTML.

WordPress doesn’t support MathML out of the box, and if you added the MathML code in the post editor, then it will not render correctly.

Luckily, there is a plugin that solves that problem.

Simply install and activate the MathML Block plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, simply edit the post or page where you wan to add the math equation. On the post edit screen, click on the add new block button (+) and add the Custom HTML block to your content.

Adding custom HTML block in WordPress

You can now paste your MathML code inside the custom HTML block.

Adding MathML code in WordPress

After that, you can save your post or page and view it in a new tab to see MathML beautifully transformed on your website.

MathML preview

MathML Block uses the MathJax JavaScript engine to convert your markup into readable math equations. It also supports LaTeX commands.

To add your LaTeX code, simply add the MathML block to your content editor.

Adding MathML block

In the MathML block’s text area, you can paste your LaTeX code like this:

\[ your equation goes here\]

You can now save and preview your post to see it beautifully displayed in your blog post or page.

LaTeX in MathML Block

We hope this article helped you learn how to add math equations in WordPress. You may also want to see our ultimate list of the most useful WordPress widgets and the must have WordPress plugins recommended by our experts.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Write Math Equations in WordPress appeared first on WPBeginner.


August 24, 2020 at 04:32PM