How to Display Your Facebook Page Reviews in WordPress

Do you want to show your Facebook page reviews and ratings on your blog? Facebook reviews include user ratings of your products or services which is a great social proof for boosting conversions. In this article, we will show you how to display your Facebook… Read More »

The post How to Display Your Facebook Page Reviews in WordPress appeared first on WPBeginner.

Do you want to show your Facebook page reviews and ratings on your blog? Facebook reviews include user ratings of your products or services which is a great social proof for boosting conversions. In this article, we will show you how to display your Facebook page reviews on your WordPress site.

How to Display Your Facebook Page Reviews in WordPress

Why You Should Display Your Facebook Page Reviews?

Facebook pages have a review system that allow users to post reviews and rate their favorite products / services. Having good reviews on your Facebook page reassure new users about the stability of your brand.

These Facebook page reviews are like testimonials in WordPress. Mostly users find it hard to leave a testimonial on your blog. However everyone uses social media platforms like Facebook which makes it easy to collect testimonials.

You can display these reviews on your blog, so the new visitors can quickly read what others have said about your services. Social proof like this helps you build trust around your brand.

Showing Your Facebook Page Reviews in WordPress

First thing you need to do is install and activate the Facebook Reviews plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to go to Appearance » Widgets in your WordPress admin area to drag and drop the Facebook Reviews widget in blog sidebar.

Drag and Drop Facebook Reviews Widget

Next, you need to add a widget title and click on the Connect to Facebook button to launch your pages in this widget.

Once connected, you’ll see all your Facebook pages. You will need to select the page that you want to display reviews from in your WordPress sidebar.

Facebook Reviews Pro Widget

Next, you need to expand the widget settings one by one to manage the display of page reviews on your blog. In Review Options, you can enable Google rich snippets, set filters for reviews to display, and add number of reviews per page.

In Display Options, you can hide unnecessary elements, enable dark background, limit review length, and select a theme for page reviews.

Review and Display Options

After that you should expand Slider Options. From here, if you enable Review Slider Theme, then it will automatically change the theme in your display options. You can fix slider speed and add the number of reviews to display on each slide.

In Advanced Options, you can manage links, cache, and API settings for Facebook page reviews.

Slider and Advanced Options

Once you are done with these settings, go ahead and save the changes. You can now head over to your blog to see Facebook page reviews in your sidebar.

Facebook Page Reviews

You can also create shortcodes for your Facebook page reviews and display them anywhere on your blog. For this, you need the Facebook Reviews Pro plugin.

Once activated, simply visit the Settings » Facebook Reviews Pro page and go to the Shortcode Builder tab. You need to click on Connect to Facebook button to select your page.

Create Shortcodes for Facebook Page Reviews

The 4 sections for managing the display of page reviews are similar to the settings in your sidebar widget. Your changes will automatically update the shortcode box that can be seen at the right side of the screen.

You can paste this shortcode in blog posts or page to display your Facebook page reviews in WordPress. After that head over to your blog to see the reviews in action.

Display Facebook Reviews on Pages or Posts

There’s a lot more you can do to attract users from Facebook like automatically post to Facebook from your blog, create a custom Facebook feed for users, and also add login with Facebook in WordPress.

We hope this article helped you learn how to display your Facebook page reviews in WordPress. You may also want to see our complete list on 9 WordPress Facebook plugins to grow your blog and become popular in the industry.

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 Display Your Facebook Page Reviews in WordPress appeared first on WPBeginner.

How to Display Your Facebook Page Reviews in WordPress

Do you want to show your Facebook page reviews and ratings on your blog? Facebook reviews include user ratings of your products or services which is a great social proof for boosting conversions. In this article, we will show you how to display your Facebook… Read More »

The post How to Display Your Facebook Page Reviews in WordPress appeared first on WPBeginner.

Do you want to show your Facebook page reviews and ratings on your blog? Facebook reviews include user ratings of your products or services which is a great social proof for boosting conversions. In this article, we will show you how to display your Facebook page reviews on your WordPress site.

How to Display Your Facebook Page Reviews in WordPress

Why You Should Display Your Facebook Page Reviews?

Facebook pages have a review system that allow users to post reviews and rate their favorite products / services. Having good reviews on your Facebook page reassure new users about the stability of your brand.

These Facebook page reviews are like testimonials in WordPress. Mostly users find it hard to leave a testimonial on your blog. However everyone uses social media platforms like Facebook which makes it easy to collect testimonials.

You can display these reviews on your blog, so the new visitors can quickly read what others have said about your services. Social proof like this helps you build trust around your brand.

Showing Your Facebook Page Reviews in WordPress

First thing you need to do is install and activate the Facebook Reviews plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to go to Appearance » Widgets in your WordPress admin area to drag and drop the Facebook Reviews widget in blog sidebar.

Drag and Drop Facebook Reviews Widget

Next, you need to add a widget title and click on the Connect to Facebook button to launch your pages in this widget.

Once connected, you’ll see all your Facebook pages. You will need to select the page that you want to display reviews from in your WordPress sidebar.

Facebook Reviews Pro Widget

Next, you need to expand the widget settings one by one to manage the display of page reviews on your blog. In Review Options, you can enable Google rich snippets, set filters for reviews to display, and add number of reviews per page.

In Display Options, you can hide unnecessary elements, enable dark background, limit review length, and select a theme for page reviews.

Review and Display Options

After that you should expand Slider Options. From here, if you enable Review Slider Theme, then it will automatically change the theme in your display options. You can fix slider speed and add the number of reviews to display on each slide.

In Advanced Options, you can manage links, cache, and API settings for Facebook page reviews.

Slider and Advanced Options

Once you are done with these settings, go ahead and save the changes. You can now head over to your blog to see Facebook page reviews in your sidebar.

Facebook Page Reviews

You can also create shortcodes for your Facebook page reviews and display them anywhere on your blog. For this, you need the Facebook Reviews Pro plugin.

Once activated, simply visit the Settings » Facebook Reviews Pro page and go to the Shortcode Builder tab. You need to click on Connect to Facebook button to select your page.

Create Shortcodes for Facebook Page Reviews

The 4 sections for managing the display of page reviews are similar to the settings in your sidebar widget. Your changes will automatically update the shortcode box that can be seen at the right side of the screen.

You can paste this shortcode in blog posts or page to display your Facebook page reviews in WordPress. After that head over to your blog to see the reviews in action.

Display Facebook Reviews on Pages or Posts

There’s a lot more you can do to attract users from Facebook like automatically post to Facebook from your blog, create a custom Facebook feed for users, and also add login with Facebook in WordPress.

We hope this article helped you learn how to display your Facebook page reviews in WordPress. You may also want to see our complete list on 9 WordPress Facebook plugins to grow your blog and become popular in the industry.

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 Display Your Facebook Page Reviews in WordPress appeared first on WPBeginner.

How to Add an Image in WordPress Sidebar Widget

Do you want to add an image to a sidebar widget in WordPress? By default, WordPress makes it easy to upload and add images anywhere on your website. In this article, we will show you how to easily add an image in your WordPress sidebar… Read More »

The post How to Add an Image in WordPress Sidebar Widget appeared first on WPBeginner.

Do you want to add an image to a sidebar widget in WordPress? By default, WordPress makes it easy to upload and add images anywhere on your website. In this article, we will show you how to easily add an image in your WordPress sidebar widget. We will share multiple methods, so you can use one that works best for you.

Adding an image in WordPress sidebar widget

Adding an Image in WordPress Using The Image Widget

The easiest way to add an image in WordPress sidebar is by using the default ‘Image’ widget.

Simply go to Appearance » Widgets page and add the ‘Image’ widget to your sidebar. If you haven’t used widgets before, then see our guide on how to add and use widgets in WordPress.

Add image widget

The widget will expand, and you will be able to see its settings.

The first option is to add a title to the image widget. After that, click on the ‘Add Image’ button to continue.

This will bring up the WordPress media uploader where you can click on the upload files button to upload your image or select an image you have previously uploaded.

Image settings

After uploading the image, you will see image settings in the right column. From here, you can provide a title / ALT text for the image, add a description, select size, or even add a link.

Once you are done, you can click on the ‘Add to Widget’ button to save your changes. You will now see a preview of the image inside the widget settings area.

Widget preview

Don’t forget to click on the ‘Save’ button to save your image widget.

You can now visit your website to see the image displayed on your WordPress blog’s sidebar.

Sidebar image preview

Adding an Image in WordPress Sidebar Using Text Widget

Adding an image to the sidebar using the default ‘Image’ widget is quite easy. However, sometimes you may need to add an image with custom HTML or text with formatting. In that case, you will need to use the ‘Text’ widget instead.

Simply go to Appearance » Widgets page and add the ‘Text’ widget to your sidebar. Under the widget settings, you will see the ‘Add Media’ button above text edit area.

Add an image in WordPress sidebar using Text widget

Clicking on the button will bring up the media uploader allowing you to upload or select an image from the media library.

After selecting your image, click on the ‘Insert into post’ button. You will now be able to see an image preview in the text widget settings.

You can continue adding text and other elements to the text widget. The toolbar in the text editor gives you some basic formatting buttons.

Adding an image with text and basic formatting

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

You can now visit your website to see the sidebar image in action.

Image displayed using text widget in sidebar

Manually Adding an Image in WordPress Sidebar Widget

In some cases, you may need to add additional HTML code to your image. The default text widget allows some very basic HTML, but it may not work with advanced HTML or formatting. In that case, you will need to manually add an image to your blog’s sidebar.

First, you need to upload the image to your WordPress site. Simply go to Media » Add New and upload your image file.

After uploading the image, you need to click on the Edit link next to the image.

Upload and Edit an image file in WordPress

WordPress will now take you to the ‘Edit Media’ page where you will see the image file URL on the right side of the screen. You need to copy this URL and paste it into a text editor like Notepad.

Copying the image file URL in WordPress

Next, you need to go to Appearance » Widgets screen and drag-drop ‘Custom HTML’ widget to your sidebar where you want to display the image.

Manually add image to WordPress sidebar widget

In the text box area of the widget, you need to add your image using this code:

<img src="Paste The File URL Here" alt="Strawberries" />

The img tag is used in HTML to display images. It needs two attributes, the first one is src which defines the image file location. This is where you will paste the URL you copied earlier.

The second one is alt which is used to provide an alternate text for the image. Your final img tag will look something like this:

<img src="http://www.example.com/wp-content/uploads/2014/09/strawberries.jpg" alt="Strawberries" />

You need to click on the Save button to store your widget settings and then preview your website.

Adding an Image in WordPress Sidebar Using a Plugin

Another way to add images to your WordPress sidebar is by using a plugin. This will give you a few more options and a simple interface, which some beginners may find easier than the default ‘Image’ widget.

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

Upon activation, simply go to Appearance » Widgets page. You will notice a new widget labeled ‘Image Widget’ under available widgets column. Simply drag and drop this image widget to your WordPress sidebar where you want to display an image.

Image widget plugin

Next, click on the ‘Select Image’ button to upload an image or select one from the media library. After that you need to click on the ‘Insert to Widget’ button, and you will see the image preview under widget settings.

You can add a title, alt text, link, and a caption for the image. You can also choose an image size from the list of available options.

More settings for image widget plugin

Once you are satisfied, simply click on the Save button to save the image widget. That’s all, you can now go to your website and see the image displayed in your sidebar.

We hope this article helped you add an image in WordPress sidebar widget. If you come across a problem, don’t forget to look at our guide on how to fix common image issues in WordPress.

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

The post How to Add an Image in WordPress Sidebar Widget appeared first on WPBeginner.

How to Better Mange Online Booking in WordPress with StartBooking

Do you want to better manage online booking on your WordPress site? Many WordPress businesses and individuals rely on a booking system to efficiently run their business and manage customers. In this article, we will show you how to better manage online booking in WordPress… Read More »

The post How to Better Mange Online Booking in WordPress with StartBooking appeared first on WPBeginner.

Do you want to better manage online booking on your WordPress site? Many WordPress businesses and individuals rely on a booking system to efficiently run their business and manage customers. In this article, we will show you how to better manage online booking in WordPress with StartBooking.

Better manage online booking with WordPress using StartBooking

Why Manage Online Booking in WordPress with StartBooking

Often business websites need an online booking management system to allow customers to book appointments online without calling.

Aside from offering convenience to customers, it also enables you to efficiently manage your time and services. There are plenty of booking plugins for WordPress to choose from. Here are some of the things you should look for in an online booking solution.

  • Does it allow you to easily add booking forms to your website?
  • Are the features customizable enough to match your business?
  • Does it integrate with third-party services like Google Calendar?
  • Does it have smart scheduling to avoid overlapping or incorrect appointments?
  • Does it have the ability to add staff schedules which is highly useful for services like salons, spas, etc?

That being said, let’s see how to easily manage online booking in WordPress with StartBooking.

Managing Online Booking in WordPress with StartBooking

First, you need to visit StartBooking website to create an account. StartBooking is a paid service, but it does offer a free plan for those starting out.

Once you have signed up, you will be taken to your account dashboard. From here you need to click on your account name at the top right corner, so you can access the settings page.

StartBooking dashboard

On the settings page, you need to click on the ‘Hours’ section from the left column and then start saving your business hours for each day.

Adding business hours in StartBooking app

If you run a multi-staff business like spa or salon, then you can add your staff by visiting the users section under account settings. You will be able to edit hours, notifications, and role for each user.

Adding staff users to StartBooking

StartBooking allows you to add multiple services that customers can book for. You can visit the ‘Services’ page where an ‘Example Service’ will already be added for you.

Add and manage services

You can edit or delete the Example Service. You can also create new services as needed.

On the new service page, you can provide a title and description for the service offered. After that, you need to select the duration, cost, user (staff member assigned to the task), and add price.

Add new service

Once you are done, click on the ‘Add Service’ button to save your changes. Repeat the process to add more services if necessary.

Now that you have set your StartBooking account, let’s connect it to WordPress by using their WordPress booking plugin.

Head over to your WordPress site to install and activate the StartBooking plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, the plugin will add a new menu item labeled ‘Booking’ to your WordPress admin sidebar. Clicking on it will take you to the plugin’s settings page.

Connect StartBooking

You need to click on the ‘Connect My Account’ button and log in using your StartBooking account details. Once connected, you will see the plugin’s settings page.

It will automatically create a new page on your WordPress site called ‘Book Now’ and the online booking form shortcode inside it.

Add booking shortcode to page

You can click on the ‘View Page’ link to see your online booking system in action.

Booking page preview

If you have multiple services, then users will first see the option to select a service and then click on continue button. On the next screen, they will be able to select the date and time.

Select date and time

In the next step, customers will provide their contact information and save their appointment.

Customer information

After that StartBooking will see send a confirmation email to the customers, and they will also be able to see their appointment details on screen. You or the staff member assigned for the service will also receive an email notification.

If you don’t want to use the default ‘Book Now’ page created by the plugin, then you can also select any other page on your WordPress site to display your online booking form. Simply add the following shortcode to your page.

[startbooking]

This shortcode will display full booking form flow with services, date, time, and customer information.

You can also create call to action buttons to be used on your services pages. Simply use the following shortcode with a service ID which you can find under the plugin settings.

[startbooking_cta services="4K59oyjEP"]Book Hair Cut[/startbooking_cta]

Service ID

Viewing and Managing Your Online Booking Appoinments

StartBooking not only makes it easy for your users to make a booking, but it also allows you to easily manage your time using a simple dashboard.

Simply head over to the StartBooking website, and you will be able to see all your booked time slots. You can switch the calendar view into day, week, or month to see more appointments or click on an individual appointment to see details.

Appointment details

StartBooking can also integrate into your Google Calendar to sync your appointments. Simply go to your account settings and then click on the ‘Integrations’ tab.

Connect Google Calendar

You need to click on the connect button next to Google Calendar. This will take you to your Google account where you will be asked to give StartBooking access to update your Google Calendar.

Give access to your Google Calendar

Click on the ‘Allow’ button to continue.

After that, you will be able to see all your appointments on your phone using the Google Calendar app.

We hope this article helped find a better way to manage online booking in WordPress. You may also want to see our list of essential WordPress plugins for business websites.

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 Better Mange Online Booking in WordPress with StartBooking appeared first on WPBeginner.

How to Fix Custom Fields Not Showing in WordPress

Are you unable to find the custom fields option on your WordPress site? Custom field is an advance WordPress feature that helps you add custom content to your WordPress posts and pages by following various WordPress tutorials. In this article, we will show you how… Read More »

The post How to Fix Custom Fields Not Showing in WordPress appeared first on WPBeginner.

Are you unable to find the custom fields option on your WordPress site? Custom field is an advance WordPress feature that helps you add custom content to your WordPress posts and pages by following various WordPress tutorials. In this article, we will show you how to easily fix custom fields not showing issue in WordPress.

Fix missing custom fields in WordPress

Fixing Custom Fields Not Showing Issue in WordPress

Custom fields are typically associated with WordPress post, pages, or custom post types. Often you will find custom fields mentioned in various WordPress tutorials around the web, but you will likely not see the custom fields option on your site specially if you recently started your WordPress blog.

In the past, custom fields were visible by default on the post edit screen of all WordPress sites. However since it is an advance feature, the WordPress core development team decided to hide custom fields by default for all new users in the WordPress 3.1 release.

They also made it easy for anyone to make them visible with just two clicks from within the post edit screen.

Simply create or edit an existing post / page, and then click on the ‘Screen Options‘ button at the top right corner of the screen. This will show you a menu with several options that you can show or hide on your post edit screen.

Go ahead and click on the checkbox next to ‘Custom Fields’ option.

Show custom fields

Note: If you don’t see the Custom Fields option on your site, then please scroll to the troubleshooting option below in the article.

You can now scroll down on the post edit screen, and you will notice a new meta box labeled ‘Custom Fields’ below your post editor.

Custom Fields box

Since WordPress remembers your display choice, it will continue to display the custom fields box whenever you are editing posts on your website.

You can use this box to add, edit, and delete custom fields and their values.

What are Custom Fields? What Can You Do with them?

By default, when you write a new post, page, or any content type, WordPress saves it into two different areas. The first part is the body of your content that you add using the post editor.

The second part is the information about that particular content. For example, title, author name, date / time, and more. This bit of information about the post is called metadata.

Apart from the default post metadata, WordPress also allows you to save custom metadata by using custom fields.

To learn more, see our beginner’s guide to WordPress custom fields with examples, tips, and tricks that you can use on your website.

WordPress developers use custom fields to store custom post metadata for your posts. For example, the Yoast SEO plugin uses custom fields to store SEO settings for your posts.

Yoast SEO meta box

However instead of using the default custom fields box shown above, these plugin developers create their own custom meta boxes. This makes it easier for users to input information.

If you want to create a custom meta box to easily input custom metadata, then see our guide on how to add custom meta boxes in WordPress.

Troubleshooting

Recently one of our readers came to us with a problem where the Custom Fields option was missing from the WordPress screen options. After some investigation, we were able to find the cause of the issue.

If your WordPress site is missing the custom fields option under the ‘Screen Options’ menu, then you need to check if you have the Advanced Custom Fields (ACF) plugin active on your site.

ACF is a very popular WordPress plugin that developers use to create custom meta boxes. ACF is running on over 1 million websites.

In ACF version 5.5.13, they added a setting to remove the default WordPress custom field metabox to speed up the load times on the post edit page. The idea being that you shouldn’t need the default metabox since you’re using ACF.

However if you need to have the default WordPress custom field metabox enabled, then you need to add the following code to your WordPress theme’s functions.php file.

add_filter('acf/settings/remove_wp_meta_box', '__return_false');

This will solve the custom fields option missing issue in WordPress.

We hope this article helped you fix the custom fields not showing issue on your WordPress site. You may also want to see our ultimate list of most useful WordPress tips, tricks, and hacks.

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 Fix Custom Fields Not Showing in WordPress appeared first on WPBeginner.

Using LazyCache for clean and simple .NET Core in-memory caching

I’m continuing to use .NET Core 2.1 to power my Podcast Site, and I’ve done a series of posts on some of the experiments I’ve been doing. I also upgraded to .NET Core 2.1 RC that came out this week. Here’s some posts if you want to catch up: Eyes wide…

Tai Chi by Luisen Rodrigo - Used under CCI'm continuing to use .NET Core 2.1 to power my Podcast Site, and I've done a series of posts on some of the experiments I've been doing. I also upgraded to .NET Core 2.1 RC that came out this week. Here's some posts if you want to catch up:

Having a blast, if I may say so.

I've been trying a number of ways to cache locally. I have an expensive call to a backend (7-8 seconds or more, without deserialization) so I want to cache it locally for a few hours until it expires. I have a way that work very well using a SemaphoreSlim. There's some issues to be aware of but it has been rock solid. However, in the comments of the last caching post a number of people suggested I use "LazyCache."

Alastair from the LazyCache team said this in the comments:

LazyCache wraps your "build stuff I want to cache" func in a Lazy<> or an AsyncLazy<> before passing it into MemoryCache to ensure the delegate only gets executed once as you retrieve it from the cache. It also allows you to swap between sync and async for the same cached thing. It is just a very thin wrapper around MemoryCache to save you the hassle of doing the locking yourself. A netstandard 2 version is in pre-release.
Since you asked the implementation is in CachingService.cs#L119 and proof it works is in CachingServiceTests.cs#L343

Nice! Sounds like it's worth trying out. Most importantly, it'll allow me to "refactor via subtraction."

I want to have my "GetShows()" method go off and call the backend "database" which is a REST API over HTTP living at SimpleCast.com. That backend call is expensive and doesn't change often. I publish new shows every Thursday, so ideally SimpleCast would have a standard WebHook and I'd cache the result forever until they called me back. For now I will just cache it for 8 hours - a long but mostly arbitrary number. Really want that WebHook as that's the correct model, IMHO.

LazyCache was added on my Configure in Startup.cs:

services.AddLazyCache();

Kind of anticlimactic. ;)

Then I just make a method that knows how to populate my cache. That's just a "Func" that returns a Task of List of Shows as you can see below. Then I call IAppCache's "GetOrAddAsync" from LazyCache that either GETS the List of Shows out of the Cache OR it calls my Func, does the actual work, then returns the results. The results are cached for 8 hours. Compare this to my previous code and it's a lot cleaner.

public class ShowDatabase : IShowDatabase
{
    private readonly IAppCache _cache;
    private readonly ILogger _logger;
    private SimpleCastClient _client;
    public ShowDatabase(IAppCache appCache,
            ILogger<ShowDatabase> logger,
            SimpleCastClient client)
    {
        _client = client;
        _logger = logger;
        _cache = appCache;
    }
    public async Task<List<Show>> GetShows()
    {    
        Func<Task<List<Show>>> showObjectFactory = () => PopulateShowsCache();
        var retVal = await _cache.GetOrAddAsync("shows", showObjectFactory, DateTimeOffset.Now.AddHours(8));
        return retVal;
    }
 
    private async Task<List<Show>> PopulateShowsCache()
    {
        List<Show> shows = shows = await _client.GetShows();
        _logger.LogInformation($"Loaded {shows.Count} shows");
        return shows.Where(c => c.PublishedAt < DateTime.UtcNow).ToList();
    }
}

It's always important to point out there's a dozen or more ways to do this. I'm not selling a prescription here or The One True Way, but rather exploring the options and edges and examining the trade-offs.

  • As mentioned before, me using "shows" as a magic string for the key here makes no guarantees that another co-worker isn't also using "shows" as the key.
    • Solution? Depends. I could have a function-specific unique key but that only ensures this function is fast twice. If someone else is calling the backend themselves I'm losing the benefits of a centralized (albeit process-local - not distributed like Redis) cache.
  • I'm also caching the full list and then doing a where/filter every time.
    • A little sloppiness on my part, but also because I'm still feeling this area out. Do I want to cache the whole thing and then let the callers filter? Or do I want to have GetShows() and GetActiveShows()? Dunno yet. But worth pointing out.
  • There's layers to caching. Do I cache the HttpResponse but not the deserialization? Here I'm caching the List<Shows>, complete. I like caching List<T> because a caller can query it, although I'm sending back just active shows (see above).
    • Another perspective is to use the <cache> TagHelper in Razor and cache Razor's resulting rendered HTML. There is value in caching the object graph, but I need to think about perhaps caching both List<T> AND the rendered HTML.
    • I'll explore this next.

I'm enjoying myself though. ;)

Go explore LazyCache! I'm using beta2 but there's a whole number of releases going back years and it's quite stable so far.

Lazy cache is a simple in-memory caching service. It has a developer friendly generics based API, and provides a thread safe cache implementation that guarantees to only execute your cachable delegates once (it's lazy!). Under the hood it leverages ObjectCache and Lazy to provide performance and reliability in heavy load scenarios.

For ASP.NET Core it's quick to experiment with LazyCache and get it set up. Give it a try, and share your favorite caching techniques in the comments.

Tai Chi photo by Luisen Rodrigo used under Creative Commons Attribution 2.0 Generic (CC BY 2.0), thanks!


Sponsor: Check out JetBrains Rider: a cross-platform .NET IDE. Edit, refactor, test and debug ASP.NET, .NET Framework, .NET Core, Xamarin or Unity applications. Learn more and download a 30-day trial!



© 2018 Scott Hanselman. All rights reserved.
     

10 Best Calculator Plugins for Your WordPress Site

Are you looking for a calculator plugin for your WordPress blog? There are many types of WordPress plugins to calculate prices, measurements, dates, form fields, and more. In this article, we have hand-picked some of the best calculator plugins for WordPress. 1. Calculated Fields Form… Read More »

The post 10 Best Calculator Plugins for Your WordPress Site appeared first on WPBeginner.

Are you looking for a calculator plugin for your WordPress blog? There are many types of WordPress plugins to calculate prices, measurements, dates, form fields, and more. In this article, we have hand-picked some of the best calculator plugins for WordPress.

Best WordPress calculator plugins

1. Calculated Fields Form

Calculated Fields Form

Calculated Fields Form allows you to create forms and do mathematical calculations among form fields. It comes with a form and logic builder which you can use to add fields, assign values to those fields, and define mathematical operators to run.

It is quite flexible and can be used for a wide range of use cases. The plugin’s user interface may look a little rough around the edges, but don’t let it stop you from trying the powerful features packed inside.

2. CT Mortgage Calculator

CT Mortgage Calculator

CT Mortgage Calculator allows you to easily add a simple mortgage calculator to your website. It runs well with other popular WordPress real estate plugins and comes with an easy to use widget that you can add to your sidebar. You can enter a title for the widget and enter a currency name or symbol.

It uses JavaScript to do the calculations and allows users to enter the mortgage amount, interest rate, installments, and down payment options to calculate their monthly payment.

3. Responsive Mortgage Calculator

Responsive Mortgage Calculator

Responsive Mortgage Calculator is another easy to use mortgage calculator for real estate websites. It comes with a sidebar widget and shortcode that you can use inside your WordPress posts, pages, and below your listings.

It also comes with light and dark color schemes however you can disable plugin styling and use your theme’s colors or add custom CSS to style the calculator.

4. Measurement Price Calculator

Measurement Price Calculator

If you are running an online store with WooCommerce that has items available in flexible measurement sizes, then this is the plugin you will need. It allows you to add item pricing based on measurement selected by the customer.

It comes with quantity-based calculation method which automatically calculates pricing from user’s selected quantity. The other method is user-defined which allows customers to select different measurements to calculate pricing and shipping. It is tested to work well with other top WooCommerce plugins and addons.

5. WooCommerce Product Options and Price Calculation Formulas

WooCommerce Product Options and Price Calculation Formulas

This plugin provides additional WooCommerce product options and pricing calculation formulas. It comes with custom product layout builder which allows you to add and display more product options for each item.

It includes conditional logic and formulas to calculate pricing based on selection. You can use it to show, hide, or completely change product pricing based on customer selection. You can also use mathematical formulas to calculate product pricing and other display options.

6. WooCommerce Price Based on Country

WooCommerce Price Based on Country

WooCommerce Price Based on Country does exactly what it says. The plugin uses WooCommerce’s geolocation feature to guess customer’s location and then displays pricing in the local currency.

It can automatically calculate pricing by the exchange rate, or you can also manually set it for each currency. It also includes a country switcher widget which enables users to change country and currency on their own. This plugin works well with multilingual WordPress sites.

7. TimeZone Calculator

TimeZone Calculator

TimeZoneCalculator allows you to calculate time difference among different timezones. You can select the timezones that you want to display and then add it to your WordPress sidebar using a sidebar widget.

The plugin also comes with shortcodes which enables you to display time with timezone calculator on any page or post.

8. Date Calculator

Date Calculator

Date Calculator is a simple plugin that allows you to calculate dates and display them using shortcodes. You can calculate dates by adding or subtracting days. You can also use a simple shortcode to display today’s date.

The shortcode also works with contact form plugins like Contact Form 7.

9. Repayment Calculator and Loan Application Form

Loan Calculator

Repayment Calculator and Loan Application form is a flexible WordPress plugin that can be used for a number of businesses. It allows users to select a loan amount, term, and calculate their monthly payments.

It comes with a number of styles with borders, colors, and backgrounds. It can be used with any currency and comes with the loan application form as well.

10. CC BMI Calculator

CC BMI Calculator

The CC BMI Calculator is a simple body mass index calculator that can be used on health and fitness websites. It allows users to enter their height and weight information to see their body mass index score.

The plugin allows you to choose different styles by changing colors however using this feature requires you to add a link to the plugin author website. It is available in both imperial and metric systems, so you can also choose which unit will be used as the default option.

We hope this article helped you discover the best calculator plugins for WordPress. You may also want to see our list of must have WordPress plugins for business websites.

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 10 Best Calculator Plugins for Your WordPress Site appeared first on WPBeginner.

How to Convert WordPress Categories to Custom Taxonomies

Do you want to convert your WordPress categories into custom taxonomies? Categories are one of the two default taxonomies that help you sort your content. However, WordPress also allows you to create and use custom taxonomies. In this article, we will show you how to… Read More »

The post How to Convert WordPress Categories to Custom Taxonomies appeared first on WPBeginner.

Do you want to convert your WordPress categories into custom taxonomies? Categories are one of the two default taxonomies that help you sort your content. However, WordPress also allows you to create and use custom taxonomies. In this article, we will show you how to easily convert WordPress categories into custom taxonomies.

How to Convert WordPress Categories to Custom Taxonomies

Why and When Do You Need to Convert Categories to Custom Taxonomies

Categories and tags are the two default taxonomies in WordPress. Taxonomies are used to sort and organize content into different topics.

Apart from the default taxonomies, WordPress also allows you to create custom taxonomies which you can use with existing post types or with custom post types. For more on this topic, see our article on when do you need a custom post type or taxonomy in WordPress.

As your website grow, you might find a need to convert your categories into a custom taxonomy. For example, let’s say that you have a category called topics with a lot of sub-categories. It would be time-consuming to edit each post and file it under your new custom taxonomy.

Wouldn’t it be nice if you could bulk convert some or all of your categories to the new custom taxonomy?

Let’s take a look at how you can easily convert categories to custom taxonomies without manually editing each post.

Converting WordPress Categories to Custom Taxonomies

First thing you need to do is install and activate Taxonomy Switcher plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Tools » Taxonomy Switcher page in your WordPress admin area to convert categories to custom taxonomies.

Taxonomy Switcher

On this page, you can select the taxonomies you want to convert. For this tutorial, we will select ‘Categories’ as the taxonomy we want to switch from, and ‘Topics’ as the custom taxonomy we want to switch to.

Select taxonomies

If you want to convert all categories to a custom taxonomy, then you can go ahead and click on the ‘Switch Taxonomies’ button.

The plugin will convert all categories to your selected custom taxonomy. You will see a success message like this:

Successfully switched taxonomies

If you just want to convert specific categories, then you will need to add the IDs of those categories next to ‘Comma separated list of term ids to switch’ field. See our article on how to find category IDs in WordPress for more details.

Skip categories

Additionally, if you want to skip child categories of a specific category, then you can add the IDs of the parent category next to ‘Limit taxonomy switch for child terms of a specific parent’ option.

Don’t forget to click on the ‘Switch Taxonomy’ button to save your changes.

Setting Up Redirects from Category to Custom Taxonomy

After you switch categories to a custom taxonomy, the category archive page will now show a 404 error page. This is nothing to be worried about if your website is not live yet.

However if your website is live, then search engines may have already crawled your category pages and indexed them. This means that those pages can appear in search results and users coming from search engines will see a 404 error page.

To fix this, you need to redirect users to the new taxonomy page for each category.

Luckily, there is an easy fix for that.

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

Upon activation, you need to visit Tools » Redirection page. In the Source URL field, you need to enter /category/.* and in the Target URL field you need to enter your custom taxonomy slug, e.g. /topic/$1

Set up redirects

Next, you need check the box next to ‘Regex’ option, and then click on ‘Add Redirect’ button.

This redirect will now send all category archive traffic to your custom taxonomy. Only use this, if you don’t want to use categories at all.

If you want to redirect individual categories to a custom taxonomy page, then see our beginner’s guide on setting up redirects in WordPress with detailed step by step instructions.

We hope this article helped you learn how to convert WordPress categories to custom taxonomies. You may also want to see our guide on how to style individual categories differently in WordPress to style your custom taxonomy templates.

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 Convert WordPress Categories to Custom Taxonomies appeared first on WPBeginner.

How to Convert WordPress Categories to Custom Taxonomies

Do you want to convert your WordPress categories into custom taxonomies? Categories are one of the two default taxonomies that help you sort your content. However, WordPress also allows you to create and use custom taxonomies. In this article, we will show you how to… Read More »

The post How to Convert WordPress Categories to Custom Taxonomies appeared first on WPBeginner.

Do you want to convert your WordPress categories into custom taxonomies? Categories are one of the two default taxonomies that help you sort your content. However, WordPress also allows you to create and use custom taxonomies. In this article, we will show you how to easily convert WordPress categories into custom taxonomies.

How to Convert WordPress Categories to Custom Taxonomies

Why and When Do You Need to Convert Categories to Custom Taxonomies

Categories and tags are the two default taxonomies in WordPress. Taxonomies are used to sort and organize content into different topics.

Apart from the default taxonomies, WordPress also allows you to create custom taxonomies which you can use with existing post types or with custom post types. For more on this topic, see our article on when do you need a custom post type or taxonomy in WordPress.

As your website grow, you might find a need to convert your categories into a custom taxonomy. For example, let’s say that you have a category called topics with a lot of sub-categories. It would be time-consuming to edit each post and file it under your new custom taxonomy.

Wouldn’t it be nice if you could bulk convert some or all of your categories to the new custom taxonomy?

Let’s take a look at how you can easily convert categories to custom taxonomies without manually editing each post.

Converting WordPress Categories to Custom Taxonomies

First thing you need to do is install and activate Taxonomy Switcher plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Tools » Taxonomy Switcher page in your WordPress admin area to convert categories to custom taxonomies.

Taxonomy Switcher

On this page, you can select the taxonomies you want to convert. For this tutorial, we will select ‘Categories’ as the taxonomy we want to switch from, and ‘Topics’ as the custom taxonomy we want to switch to.

Select taxonomies

If you want to convert all categories to a custom taxonomy, then you can go ahead and click on the ‘Switch Taxonomies’ button.

The plugin will convert all categories to your selected custom taxonomy. You will see a success message like this:

Successfully switched taxonomies

If you just want to convert specific categories, then you will need to add the IDs of those categories next to ‘Comma separated list of term ids to switch’ field. See our article on how to find category IDs in WordPress for more details.

Skip categories

Additionally, if you want to skip child categories of a specific category, then you can add the IDs of the parent category next to ‘Limit taxonomy switch for child terms of a specific parent’ option.

Don’t forget to click on the ‘Switch Taxonomy’ button to save your changes.

Setting Up Redirects from Category to Custom Taxonomy

After you switch categories to a custom taxonomy, the category archive page will now show a 404 error page. This is nothing to be worried about if your website is not live yet.

However if your website is live, then search engines may have already crawled your category pages and indexed them. This means that those pages can appear in search results and users coming from search engines will see a 404 error page.

To fix this, you need to redirect users to the new taxonomy page for each category.

Luckily, there is an easy fix for that.

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

Upon activation, you need to visit Tools » Redirection page. In the Source URL field, you need to enter /category/.* and in the Target URL field you need to enter your custom taxonomy slug, e.g. /topic/$1

Set up redirects

Next, you need check the box next to ‘Regex’ option, and then click on ‘Add Redirect’ button.

This redirect will now send all category archive traffic to your custom taxonomy. Only use this, if you don’t want to use categories at all.

If you want to redirect individual categories to a custom taxonomy page, then see our beginner’s guide on setting up redirects in WordPress with detailed step by step instructions.

We hope this article helped you learn how to convert WordPress categories to custom taxonomies. You may also want to see our guide on how to style individual categories differently in WordPress to style your custom taxonomy templates.

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 Convert WordPress Categories to Custom Taxonomies appeared first on WPBeginner.

Announcing .NET Core 2.1 RC 1 Go Live AND .NET Core 3.0 Futures

I just got back from the Microsoft BUILD Conference where Scott Hunter and I announced both .NET Core 2.1 RC1 AND talked about .NET Core 3.0 in the future. .NET Core 2.1 RC1 First, .NET Core 2.1’s Release Candidate is out. This one has a Go Live licen…

I just got back from the Microsoft BUILD Conference where Scott Hunter and I announced both .NET Core 2.1 RC1 AND talked about .NET Core 3.0 in the future.

.NET Core 2.1 RC1

First, .NET Core 2.1's Release Candidate is out. This one has a Go Live license and it's very close to release.

You can download and get started with .NET Core 2.1 RC 1, on Windows, macOS, and Linux:

You can see complete details of the release in the .NET Core 2.1 RC 1 release notes. Related instructions, known issues, and workarounds are included in releases notes. Please report any issues you find in the comments or at dotnet/core #1506. ASP.NET Core 2.1 RC 1 and Entity Framework 2.1 RC 1 are also releasing today. You can develop .NET Core 2.1 apps with Visual Studio 2017 15.7, Visual Studio for Mac 7.5, or Visual Studio Code.

Here's a deep dive on the performance benefits which are SIGNIFICANT. It's also worth noting that you can get 2x+ speed improvements for your builds/compiles, but and to adopt the .NET Core 2.1 RC SDK while continuing to target earlier .NET Core releases, like 2.0 for the Runtime.

  • Go Live - You can put this version in production and get support.
  • Alpine Support - There are docker images at 2.1-sdk-alpine and 2.1-runtime-alpine.
  • ARM Support - We can compile on Raspberry Pi now! .NET Core 2.1 is supported on Raspberry Pi 2+. It isn’t supported on the Pi Zero or other devices that use an ARMv6 chip. .NET Core requires ARMv7 or ARMv8 chips, like the ARM Cortex-A53. There are even Docker images for ARM32
  • Brotli Support - new lossless compression algo for the web.
  • Tons of new Crypto Support.
  • Source Debugging from NuGet Packages (finally!) called "SourceLink."
  • .NET Core Global Tools:
  • dotnet tool install -g dotnetsay
    dotnetsay

In fact, if you have Docker installed go try an ASP.NET Sample:

docker pull microsoft/dotnet-samples:aspnetapp
docker run --rm -it -p 8000:80 --name aspnetcore_sample microsoft/dotnet-samples:aspnetapp

.NET Core 3.0

This is huge. You'll soon be able to take your existing WinForms and WPF app (I did this with a 12 year old WPF app!) and swap out the underlying runtime. That means you can run WinForms and WPF on .NET Core 3 on Windows.

Why is this cool?

  • WinForms/WPF apps can but self-contained and run in a single folder.

No need to install anything, just xcopy deploy. WinFormsApp1 can't affect WPFApp2 because they can each target their own .NET Core 3 version. Updates to the .NET Framework on Windows are system-wide and can sometimes cause problems with legacy apps. You'll now have total control and update apps one at at time and they can't affect each other. C#, F# and VB already work with .NET Core 2.0. You will be able to build desktop applications with any of those three languages with .NET Core 3.

Secondly, you'll get to use all the new C# 7.x+ (and beyond) features sooner than ever. .NET Core moves fast but you can pick and choose the language features and libraries you want. For example, I can update BabySmash (my .NET 3.5 WPF app) to .NET Core 3.0 and use new C# features AND bring in UWP Controls that didn't exist when BabySmash was first written! WinForms and WPF apps will also get the new lightweight csproj format. More details here and a full video below.

  • Compile to a single EXE

Even more, why not compile the whole app into a single EXE. I can make BabySmash.exe and it'll just work. No install, everything self-contained.

.NET Core 3 will still be cross platform, but WinForms and WPF remain "W is for Windows" - the runtime is swappable, but they still P/Invoke into the Windows APIs. You can look elsewhere for .NET Core cross-platform UI apps with frameworks like Avalonia, Ooui, and Blazor.

Diagram showing that .NET Core will support Windows UI Frameworks

You can check out the video from BUILD here. We show 2.1, 3.0, and some amazing demos like compiling a .NET app into a single exe and running it on a computer from the audience, as well as taking the 12 year old BabySmash WPF app and running it on .NET Core 3.0 PLUS adding a UWP Touch Ink Control!

Lots of cool stuff coming today AND tomorrow with open source .NET Core!


Sponsor: Check out JetBrains Rider: a cross-platform .NET IDE. Edit, refactor, test and debug ASP.NET, .NET Framework, .NET Core, Xamarin or Unity applications. Learn more and download a 30-day trial!



© 2018 Scott Hanselman. All rights reserved.