Tag - wordpress

How to Fix Image Upload Issue in WordPress (Step by Step)


Are you facing image upload issues on your WordPress website? For most beginners, image upload errors can be quite confusing because they can appear without you doing anything different.

Failure to upload images is one of the most common image issues in WordPress. Luckily, it is quite easy to fix, and you can do it yourself.

In this article, we will show you how to easily fix the image upload issue in WordPress. We will also explain what causes this issue, and how you can prevent it in the future.

Fixing image upload issues in WordPress

What Causes The Image Upload Issue in WordPress

The image upload issue in WordPress is typically caused by incorrect file permissions. Your WordPress files are stored on your web hosting server and need specific file and directory permissions to work.

Wrong file permissions prevent WordPress from reading or uploading file on the hosting server. You may get the following error when uploading image file:

‘Unable to create directory wp-content/uploads/2019/04. Is its parent directory writable by the server?’

Unable to create directory error

Another sign of this issue is that your images may disappear from the media library.

Missing images in media library

My site was working fine before? Who changed the file permissions?

This could happen due to a number of reasons. A misconfiguration on your shared hosting server can sometimes change those permissions without you doing anything.

For example, your web hosting provider ran an upgrade which unexpectedly changed file permissions.

If everything else is working fine on your website, then you can simply apply the correct file permissions to fix the image upload issue.

That being said, let’s take a look at how to set correct file permissions to fix image upload issues in WordPress.

Fixing Image Upload Issue in WordPress

You will need to use an FTP client to change file permissions.

First, connect to your website via FTP and then go to /wp-content/ folder. Inside, you’ll find the uploads folder, which is where WordPress stores all your media uploads including images.

Now right click on the uploads directory and then select File Permissions.

Opening file permissions dialog box for uploads folder

This will bring up the file permissions dialog box.

First, you will need to set file permissions for the uploads directory and all the subdirectories inside it to 744.

Change folder permissions

To do that, enter 744 in the numeric value box, and then check the box next to Recurse into subdirectories option. Now click on the ‘Apply to directories only’ radio button.

Click on the OK button to apply these changes. Your FTP client will now start applying file permissions to the directories.

Note: If setting directory permissions to 744 does not seem to solve your problem, then try 755.

In the next step, you will need to set file permissions for all the files in the uploads directory.

To do that, right click on uploads directory and select file permissions. In the file permissions dialog box, change the numeric value to 644.

Check the box next to Recurse into subdirectories. Lastly, you need to click on ‘Apply to files only’ radio button. Click on the OK button to apply these changes.

File permissions

The FTP client will now change the permissions for all files inside the uploads folder. Once it is done, you can go back to your WordPress admin area and try uploading images again.

Note: if you don’t know how to use a FTP client, then you can also use the file manager provided by your WordPress hosting company. Since the screenshots will vary from each host, you will need to talk to their support to find instructions.

We hope this article helped you fix the image upload issue in WordPress. You may also want to see our article on how to optimize image SEO to get more organic traffic to your website.

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 Image Upload Issue in WordPress (Step by Step) appeared first on WPBeginner.



Source link

21 Best WordPress Themes for Nonprofit Organizations


Are you looking for the best WordPress themes for nonprofits?

Charity and nonprofit websites require an appealing presentation with the right tools to achieve their donation goals. It can be possible with the use of a professional WordPress theme.

In this article, we will show you some of the best WordPress themes for nonprofit organizations that will help you get maximum donations.

Best WordPress themes for non-profit organizations and charities

Making a Website for a Nonprofit Organization

WordPress is the most popular website builder among nonprofits around the world. It is free and open source which gives you the freedom and flexibility you need for a solid online presence.

Just to be clear, there are two versions of WordPress. WordPress.com which is a hosted solution, and WordPress.org also known as self-hosted WordPress. See our comparison of WordPress.com vs WordPress.org for more details.

We recommend using self-hosted WordPress.org. It gives you access to all the features of WordPress right out of the box (without any restrictions).

You’ll need a domain name and WordPress hosting account to start your self hosted WordPress website.

It’s recommended to use Bluehost. They are one of the largest hosting companies in the world and an official WordPress hosting provider.

They have agreed to offer WPBeginner users discount on hosting plus free domain and SSL Certificate. You’ll need SSL to collect donations in WordPress using third-party services like Stripe.

→ Click here to claim this exclusive Bluehost Offer ←

Once you have purchased hosting, you can move on to installing WordPress. See our guide on how to make a website for step by step instructions.

That being said, let’s take a look at the best WordPress themes for nonprofits and charities that you can use on your website.

1. Astra

Astra charity theme

Astra is a lightweight and super flexible WordPress theme. It comes with multiple website layouts including a template for nonprofit and charity organizations. This theme can be integrated with popular page builders to design the pages of your website instantly.

It has layout settings, header options, unlimited colors, beautiful crisp typography, and easy customization. Astra can perform faster than other regular WordPress themes.

2. OceanWP

OceanWP charity

OceanWP is a powerful and free WordPress theme with multiple website templates. It can be used to create a nonprofits website with all the basic features. OceanWP is a fully responsive theme and has the fastest page load time.

It allows you to add a donate now button in the header alongside the navigation menu. You can also add a custom logo, social icons, image slider, and more. The theme is easy to set up and offers useful extensions to add more features to your website.

3. Outreach Pro

Outreach Pro

Outreach Pro is a beautifully designed WordPress theme for nonprofits, charities, and religious organizations. It is built on top of Genesis framework, which ensures rock solid WordPress speed and performance.

It includes page templates for archives, blog section, and a landing page template. Other features include customizable headers, theme options panel, and multiple widget-ready areas to just drag and drop items to your website.

StudioPress is now a part of WP Engine, the most popular managed WordPress hosting company. You can get this theme and all 35+ other StudioPress themes if you sign up for WP Engine hosting to build your website.

Bonus: WPBeginner users also get additional 20% off. Get started with WP Engine.

4. GiveWP

GiveWP

GiveWP is a popular WordPress donation plugin for charity and nonprofit websites. It works great with all the standard WordPress themes and makes it easier for you to collect donations. It comes with useful addons for recurring donations, tributes, fee recovery, and more.

It integrates with popular payment solutions to help you in achieving your donation goals. GiveWP has flexible options and enhancements that makes the customization easier. You can also set up donation forms on different landing pages of your website.

5. Ultra

Ultra

Ultra is an all-purpose WordPress mega theme suitable for all kind of websites including nonprofits. It ships with 9 pre-made websites, 1-click demo content installer, and visual page editor to help you create engaging websites in minutes.

It includes animated counters, progress bars, contact form, Google Maps, pricing tables, and more. It is eCommerce ready and beginner friendly.

6. Zeko

Zeko

Zeko is a wonderfully designed WordPress theme for charities and nonprofits. It features a clean and professional design with flexible options. All theme options can be easily set up using theme customizer with a live preview of your website.

Notable features include 5 page templates, blog with multi-column grid and flexible sidebars, unlimited colors, WooCommerce, BuddyPress, and bbPress support.

7. Grassroots

Grassroots

Grassroots is another excellent WordPress theme for nonprofits and fundraising websites. It features fullscreen video backgrounds on the homepage allowing you to create highly engaging landing pages.

For fundraising and donations, the theme supports WooCommerce, contact form, and donation plugins. Other than that, it includes featured content, staff and sponsors sections, custom logo upload, and multiple colors.

8. Divi

Divi

Divi is a powerful WordPress theme that can be used to build any kind of website easily. It comes with multiple pre-built website layouts and demos. You can simply use a demo website and make changes with the Divi builder to create your nonprofit website.

It includes hundreds of elements and modules to add amazing features on your site. The drag and drop builder makes it super simple for you to use these elements anywhere on the layout.

Divi theme offers real-time design, responsive editing, click and type feature, and more. It allows you to customize everything and organize your content to fit properly in the rows and columns. It’s quite flexible and easy to set up.

9. Maisha

Maisha

Maisha is a clean and modern WordPress nonprofit theme for NGOs, welfare, and charities. It features a modern homepage with multiple slider styles, headers, and layout settings. It also includes 15 page templates, blog section, and powerful options with live theme customizer.

It supports WooCommerce, WPML, and it is fully translation-ready. It ships with a slider plugin to create a responsive WordPress slider.

10. Foundation

Foundation

Foundation is another excellent WordPress nonprofit theme. Designed to raise funds and engage audiences, it features a prominent welcome message followed by two call to actions both located above the fold on the homepage.

It includes social media integration, custom logo upload, sponsors section, and easy templates to integrate with your donations form. It offers a simple and quick setup with easy customization options.

11. Maranatha

Maranatha

Maranatha is a gorgeous WordPress theme for religious, spiritual, and nonprofit organizations. It comes with built-in sermons management area where you can upload audio, video, PDF, and text files. You can also organize your library in a series by topics and books.

Its modern homepage displays a full screen image or video header followed by parallax effect as users scroll down the homepage. It also comes with sections for different locations, events calendar, and news or blog page.

12. Benevolent

Benevolent

If you are looking for a free WordPress theme for nonprofits, then take a look at Benevolent. This versatile theme features a modern homepage with a beautiful slider, custom menu, and call to action button.

It has four footer areas, a right sidebar, and includes four custom widgets for the recent posts, popular posts, social media and the featured post. It is translation ready and optimized for faster page loads.

13. Nayma

Nayma

Nayma is a thoughtfully designed multipurpose WordPress theme with several ready-made websites included in one package. It includes a 1-click demo installer to set up a complete website with demo content.

It uses a modular approach to design and comes with several modules that you can just drag and drop to create your own page layouts. It is WooCommerce ready and can also be used to create multilingual websites.

14. Exodus

Exodus

Exodus is a beautiful WordPress theme for religious and spiritual organizations. It features a professional homepage with engaging slider and call to action. It also includes a sermon management section with full multimedia support.

It also has sections to add ministries, staff and volunteer profiles, events, locations, etc. It is designed to be easily used even by non-technical users with simple and flexible customization settings.

15. Faith

Faith

Faith is an excellent free WordPress nonprofit theme for NGOs, church websites, and charitable organizations. With professional clean design and flexible options, it offers an engaging user experience out of the box.

Notable features include custom menu, social media integration, featured posts block, featured content slider, testimonial sections, welcome message, and more. It has multiple page layouts for different sections. All theme options are neatly organized under live theme customizer, which makes it quite simple to use.

16. Saved

Saved

Saved offers a very modern looking WordPress theme for religious and nonprofit organizations. It includes a drag and drop homepage layout, video background, slider, and contact details widget with Google maps.

Church websites can use the Theme’s companion church content plugin, which adds sermons and multimedia library support to your website. It also includes sticky navigation menu, custom colors, custom widgets, typography, and custom logo support.

17. Charitize

Charitize

Charitize is a simple and free WordPress theme for nonprofit organizations, charitable foundations, churches, and nonprofit associations. It has homepage sections for the custom slideshow, featured posts with thumbnails, donate now button, navigation menus, sticky posts, and contact forms.

It comes with tons of customization options including colors, background, post formats, right sidebar, and more. You can use the theme customizer to make changes with live preview.

18. Resurrect

Resurrect

Resurrect is a modern WordPress theme for church websites, nonprofit organizations, and other charity-based sites. It’s an urban-inspired theme with an appealing design to attract donors. It allows you to add videos, create events, upload photos, and display inspirational quotes.

Other than that, it offers a section to add your location map and address. If you have multiple offices, this theme has a column block to display all your addresses easily. It’s easy to use and offers custom background, fonts, colors, etc.

19. Landing

Landing

Landing is a popular multipurpose WordPress theme to design any type of website. It can be used to create beautiful landing pages and get more donations. You can use the powerful Themify drag and drop builder to create your website pages instantly. It has built-in tools and elements that reduces the effort of manually editing pages.

It features 25+ pre-built layouts, header design options, custom post types, and more. You can also integrate email marketing services like MailChimp to connect with your visitors. Landing theme supports WooCommerce and translation ready to let you create a website in your own language.

20. Forward

Forward

Forward is a simple and elegant WordPress theme designed specifically for nonprofits. It allows you to easily add your own logo, colors, fonts, and more. It includes all the options you’ll need to build an engaging website.

Other features include WooCommerce support, email signup form, staff profiles, sponsors, and live theme customizer. It is easy and quick to set up even for absolute beginners.

21. Narcos

Narcos

Narcos is a modern WordPress multipurpose theme designed with tons of features to create any kind of website or blog. It can be used to create a website for your nonprofit organization or charitable foundation. It has a beautiful and clean layout with custom options. It’s packed with Visual Composer to design pages with the drag and drop functionality.

Moreover, this theme comes with homepage sections to display your event photos, featured posts, sponsors’ logos, and information about your organization. The parallax scrolling feature makes it easier for your visitors to check out all sections. It’s fully responsive and performs faster than many other regular WordPress themes.

We hope this article helped you find the best WordPress theme for nonprofits. You may also want to see our step by step WordPress SEO guide for beginners and a list of must have WordPress plugins.

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 21 Best WordPress Themes for Nonprofit Organizations appeared first on WPBeginner.



Source link

How to Disable Theme and Plugin Editors from WordPress Admin Panel


Did you know that WordPress comes with a built-in theme and plugin editor? This plain code editor allows you to edit your theme and plugin files directly from the WordPress dashboard.

Now, this may sound really helpful, but it can also lead to issues such as breaking your site and potential security issues when combined with other vulnerabilities.

In this article, we will explain why and how to disable theme and plugin editors from the WordPress admin area.

Disable theme and plugin editors in WordPress admin area

Why Disable Theme and Plugin Editors in WordPress?

WordPress comes with a built-in code editor which allows you to edit WordPress theme and plugin files directly from the admin area.

The theme editor is located at Appearance » Theme Editor page. By default, it will show your currently active theme’s files.

Theme editor in WordPress

Similarly, the plugin editor can be seen at Plugins » Plugin Editor page. By default, it will show you one of the installed plugins from your site that comes up first in the alphabatical order.

Plugin editor in WordPress

If you visit the theme or plugin editor page for the first time, WordPress will warn you that using the editor can break your website.

Theme editor warning in WordPress

In WordPress 4.9, theme and plugin editors were upgraded to protect users from accidentally breaking their website. In most cases, the editor will catch a fatal error and will revert back the changes.

However, this is not guaranteed and some code may still slip through and you would end up losing access to the WordPress admin area.

The biggest problem with the built-in file editor is that it gives full access to add any kind of code to your website.

If a hacker broke into your WordPress admin area, then they can use the built-in editor to gain access to all your WordPress data.

Hackers can also use it to distribute malware or launch DDOS attacks from your WordPress website.

To improve WordPress security, we recommend removing the built-in file editors completely.

That being said, let’s see how to easily disable theme and plugin editors in WordPress.

How to Disable Theme and Plugin Editors in WordPress

Disabling theme and plugin editors in WordPress is quite easy.

Simply edit your wp-config.php file and paste the following code just before the line that says ‘That’s all, stop editing! Happy publishing’ :

define( 'DISALLOW_FILE_EDIT', true );

You can now save your changes and upload the file back to your website.

That’s all, plugin and theme editors will now disappear from themes and plugins menus in the WordPress admin area.

You can also add this line of code to your theme’s functions.php file, a site-specific plugin, or by using the code snippets plugin.

If you don’t want to edit the files directly, then you can install the Sucuri WordPress plugin which offers 1-click hardening feature.

Proper Way to Edit WordPress Theme and Plugin Files

Many users actually use WordPress theme and plugin editors to look up the code, add custom CSS, or editing code in their child themes.

If you only want to add custom CSS to your theme, then you can do so by using the theme customizer located under Appearance » Customize.

Adding custom CSS via theme customizer

For more details, see our guide on how to add custom CSS in WordPress without breaking your site.

If you want to look up the code in a plugin, then you can do so by using an FTP client.

For better file management and syntax highlighting, you can use one of these code editors for editing WordPress files on your computer.

Last but not least, you can also create a custom WordPress theme without writing any code.

We hope this article helped you learn how to easily disable theme and plugin editors from WordPress admin panel. You may also want to see our ultimate guide to improving WordPress performance and speed.

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 Disable Theme and Plugin Editors from WordPress Admin Panel appeared first on WPBeginner.



Source link

How to Make a Staff Directory in WordPress (with Employee Profiles)


Do you want to create a staff directory on your WordPress site? An employee directory allows you to introduce customers to your team members and win trust by showing the human side of your business.

One downside of running an online business is that your customers don’t get to know you or your team members personally. A team directory helps bridge that gap.

In this article, we’ll show you how to easily add a staff directory in WordPress with individual employee profiles.

How to Make a Staff Member List in WordPress

Creating a Staff Directory in WordPress (Step by Step)

First thing you need to do is install and activate Staff List plugin. It is a free WordPress team directory plugin. For detailed instructions, see our guide on how to install a WordPress plugin.

Next, you need to go to the Staff List » Admin page from your dashboard menu and click the ‘Quick Start’ tab. You will be asked to enter a name for your staff template and click the ‘Create Records’ button. For example, you can name it ‘New Staff Template.’

Create New Staff Template

Once done, the plugin will create a staff template and add 3 staff members automatically.

Next, go to Staff List » Staff Templates from your WordPress menu to preview your new staff template. You need to click on the ‘Edit’ link to configure the template.

Edit Staff Template

You will see the Template Options including staff page layout, single page layout, field order, shortcodes, etc.

Template Options - Staff List WordPress Plugin

You can review the template options to make changes or simply leave the default options.

Below that, you can see the ‘Input Fields’ section to customize your staff profile.

Staff List Field Options WordPress

As you can see in the screenshot above, there are 6 input fields created by default.

  1. Name
  2. Position
  3. Department
  4. Phone
  5. Email Link Text
  6. Staff Profile

You can change the label, display options, and style for each field from the Field Options.

Add Staff Members to Make a Team Directory

Now that you have customized your staff page template, you can add and customize your staff member profiles. Go to Staff List » Staff members, and you will see the 3 staff members already added by the plugin.

You can customize the default staff member profiles by changing the profile information. Click the ‘Edit’ link to get started.

Edit Staff Member Profiles

From here you can customize the Staff Member Data for team member listing page, individual profile page, and upload photos. The ‘Staff Page’ option shows you 6 input fields as shown in the staff page template above. The information you enter here will appear on your staff directory page.

Edit Staff Member List Page Data

Next, you can customize the ‘Single Page’ content. Like the Staff Page, it also has 6 input fields by default. However, it has a text field to write the individual employee profile bio.

Edit Staff Member Single Page

The information you enter here will appear on your individual employee profile page.

Next, you can add your team member images for the staff page and single page. You can quickly add your member’s profile photo by clicking on the ‘Select Image’ button.

Add Images to Staff Member Data

Lastly, you can see the ‘Options’ tab which includes Single Page SEO options. You can add a URL slug and page title for your team member profile page.

SEO Options Staff Member Data

If you leave the “Pretty” Permalink option blank, then your staff profile page will have a URL like this: http://example.com/profile/?smid=528.

You can make it a pretty link by entering your staff member’s name with a dash in between. For example, you can use laura-taylor which would make your staff profile page URL: http://example.com/profile/laura-taylor.

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

Repeat the same process to customize all team member profiles.

If you need to add more team members, you can click the ‘Add New’ button on the top.

Add New Staff Member

First, add your staff member’s name. Then, choose your staff template from the right sidebar and click ‘Save Draft’ to load the input fields.

Choose Template for New Staff Member in WordPress

Next, you can see the same 6 input fields to create a team member profile. Add the necessary information as before.

Add New Staff Member Data

Once done, don’t forget to publish your staff member profile.

Publish Your Staff Member List in WordPress

Now that you have added all your staff member profiles, you are ready to publish your staff member list on your website.

First, you need to find and copy your staff page template’s shortcode. Go to Staff List » Staff Templates and click ‘Edit’ option below your staff page template. Then, the Template Options page will open.

Click on the ‘Shortcodes’ tab and copy the Staff Page Shortcode.

Staff List Page Shortcode

After that, you need to create a new page to display your staff member list. Go to Pages » Add New from your WordPress admin panel and enter a name for your staff list page. For example, you can name it ‘Our Team.’

Create Our Team Page in WordPress

Then add the Shortcode block to your WordPress page editor area.

Add Shortcode Widget to WordPress Editor

After the shortcode widget is added, paste the shortcode you copied earlier in the tutorial.

Add Staff Page Shortcode to Team Page in WordPress

Then, you can ‘Publish’ the page.

Now you can open the page to see how your staff directory looks. Here is how it looks on the default Twenty Nineteen theme with the default staff member details.

Staff Member List Page Demo in WordPress

In the list, you can see the ‘Profile’ option which does not have a link. We will show you how to add the link in the next step.

Adding Individual Staff Member Profiles

So far we have created a simple team directory in WordPress that lists all staff members.

The next part is to create a single page for each team member to display individual employee profiles.

Let’s start by going to Staff List » Staff Templates and click ‘Edit’ option below your staff page template.

On the next page, you need to click on the ‘Single Page – Options’ tab and copy the Single Page Shortcode.

Staff Member Single Page Shortcode

Now you need to create a new page in WordPress to add this shortcode. Go to Pages » Add New from your WordPress panel to add new a new page.

Enter your page title first — for example, Member Profile. Then, add the Shortcode widget to your WordPress page editor area and paste the Single Page Shortcode you copied before.

Add Staff Member Single Page Shortcode to your WordPress Page

After that, you need to customize your page permalink. It’s important if you want the pretty links to work, then you need to make sure that you add one of these words as your page URL slug.

  • bio
  • profile
  • profil
  • perfil

Open the ‘Permalink’ option in the right sidebar and add one of these words as your page URL. For example, we will choose the ‘profile.’

Staff Meember Single Page Permalink Setting

Once done, publish the page. Now you need to copy this page permalink and add to the Single Page Options.

You can do this by going back to Staff Template Options » Single Page – Options. Once there, simply paste the permalink in the Single Page URL field.

Add Staff Member Single Page URL to your Template Options

Once done, don’t forget to update your staff template.

After that, you need to refresh your WordPress Permalink settings to make the pretty permalinks work. Go to Settings » Permalinks and simply click ‘Save Changes’ at the bottom without changing anything on this page.

WordPress Permalinks Settings

Now you can open your staff member list page to see if the profile link is added or not. If it is working, then you will see the Profile text has a link.

Profile Link on WordPress Staff Directory Page

You can click the link, and it will open your team member’s profile page.

Staff Member Profile Single Page in WordPress

We hope this article helped you create a staff directory and add employee profile pages in WordPress. You may also want to see our guide on how to create your company org chart 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 Facebook.

The post How to Make a Staff Directory in WordPress (with Employee Profiles) appeared first on WPBeginner.



Source link

How to Easily Display Code on Your WordPress Site


Do you want to display code in your WordPress blog posts? If you tried to add code like regular text, then WordPress will not display it correctly.

WordPress runs your content through several cleanup filters each time you save a post. These filters are there to make sure someone does not inject code via post editor to hack your website.

In this article, we will show you the proper ways to easily display code on your WordPress site. We will show you different methods, and you can choose the one that best fits your needs.

How to easily display code in WordPress posts

Method 1. Display Code Using The Default Editor in WordPress

This method is recommended for beginners and users who don’t need to display code very often.

Simply edit the blog post or page where you want to display the code. On the post edit screen, add a new code block to your post.

Add code block to your WordPress posts

You can now enter the code snippet in the text area of the block.

Add code to your blog post

After that, you can save your blog post and preview it to see the code block in action.

PHP code displayed in WordPress

Depending on your WordPress theme, the code block may look different on your website.

Method 2. Display Code in WordPress Using a Plugin

For this method, we will be using a WordPress plugin to display code in your blog posts. This method is recommended for users who often display code in their articles.

It gives you the following advantages over the default code block:

  • It allows you to easily display any code in any programming language
  • It displays the code with syntax highlighting and line numbers
  • Your users can easily study the code and copy it

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

Upon activation, you can go ahead and edit the blog post where you want to display the code. On the post edit screen, add the ‘SyntaxHighlighter Code’ block to your post.

SyntaxHighlighter code block

You will now see a new code block in the post editor where you can enter your code. After adding the code, you need to select the block settings from the right column.

SyntaxHighlighter code block settings

First, you need to select the language for your code. After that, you can turn off line numbers, provide first line number, highlight any line you want, and turn off the feature to make links clickable.

Once you are done, save your post and click on the preview button to see it in action.

Code displayed with syntax highlighting

The plugin comes with a number of color schemes and themes. To change the color theme, you need to visit Settings » SyntaxHighlighter page.

SyntaxHighlighter settings

From the settings page, you can select a color theme and change SyntaxHighlighter settings. You can save your settings to see a preview of the code block at the bottom of the page.

Code block preview

Using SyntaxHighlighter with Classic Editor

If you are still using the old classic WordPress editor, then here is how you would use SyntaxHighlighter plugin to add code to your WordPress blog posts.

Simply wrap your code around square brackets with the language name. For example, if you are going to add PHP code, then you will add it like this:

[php]
<?php
private function get_time_tags()
$time = get_the_time('d M, Y');
return $time;

?>
[/php]

Similarly, if you wanted to add an HTML code, then you will wrap it around the HTML shortcode like this:

[html]
<a href="example.com">A sample link</a>
[/html]

Method 3. Display Code in WordPress Manually (No Plugin or Block)

This method is for advanced users because it requires more work and does not always work as intended.

It is suitable for users who are still using the old classic editor and want to display code without using a plugin.

First, you need to pass your code through an online HTML entities encoder tool. It will change your code markup to HTML entities, which will allow you to add the code and bypass the WordPress cleanup filters.

Now copy and paste your code in the text editor and wrap it around <pre> and <code> tags.

Adding code manually in classic editor

Your code would look like this:

<pre><code>
&lt;p&gt;&lt;a href=&quot;/home.html&quot;&gt;This is a sample link&lt;/a&gt;&lt;/p&gt;
</pre></code>

You can now save your post and preview the code in action. Your browser will convert the HTML entities and users will be able to see and copy the correct code.

Manually displaying code in WordPress

We hope this article helped you learn how to easily display code on your WordPress site. You may also want to see our ultimate list of the most wanted 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 Easily Display Code on Your WordPress Site appeared first on WPBeginner.



Source link

4 Easy Ways to Re-Order Blog Posts in WordPress (Step by Step)


Do you want to change the order of your blog posts in WordPress?

By default, WordPress displays your blog posts in reverse chronological order (newer posts first), but sometimes you may need to move specific posts up or down.

While it may feel like there is no way to do this in WordPress, you’ll be surprised to learn how easily you can change post order using multiple ways.

In this article, we will show you 4 different ways to re-order blog posts in WordPress. You can pick a solution that looks easier and fits your needs.

Ways to easily re-order blog posts in WordPress

Why Re-order Blog Posts in WordPress?

If you are just starting a blog, then you will not need to re-order your blog posts right away. However as your content grows, you may want to explore different ways to promote content across your website.

One of them is to make specific posts more prominently displayed on the front page, blog page, recent posts, or archive pages.

Now the problem is that WordPress normally displays your blog posts in a reverse chronological order. There is no option to simply just move a post up and down.

Does this mean you cannot bring your older articles to the front page? Or remove a newer article from the recent posts?

No, not at all.

There are multiple workarounds that let you do just that. Depending on your needs, you can choose the method that suits your requirements.

Let’s take a look at some of the ways you can easily re-order blog posts on your WordPress site.

1. Change Post’s Published Date

This is the easiest method and allows you to re-order posts using the built-in WordPress functionality.

As you know that WordPress displays posts based on their publish date in reverse chronological order (newer posts first). Changing a post’s publish date will also change where it appears in the list.

Reorder posts by changing published date

For example, if you wanted to bring an older post up, you would have to change its date to be newer. Similarly if you wanted to move a post down, then you can change its date to be older.

Simply edit the post you want to reorder and on the post edit screen click on the publish date under the Document panel.

Change publish date for a blog post

This will bring up a date and time popup where you can change the post’s published date and time. After you have changed the date/time, click on the ‘Update’ button to save your changes.

You need to select a date relevant to other posts.

For example, if you wanted to display an older post before another post that was published on 8 March, then you need to change the post’s publish date to 9 March.

Post moved up

2. Use Post Types Order Plugin (Drag and Drop Option)

If you want to re-order posts but don’t want to change their publish dates, then this method is for you.

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

Upon activation, you need to visit Settings » Post Types Order page to change plugin’s settings.

Post Types Order settings

From here, you need to select the post types where you want to enable the plugin. After that, simply click on the ‘Save settings’ button to store your changes.

Now you can just go to Posts » All Posts page and simply drag and drop posts to re-order them.

Reorder blog posts by drag and drop

3. Use Sticky Posts Feature in WordPress

Many users just want to reorder blog posts to highlight a blog post as featured content. WordPress comes with a default feature to achieve that, and it’s called Sticky posts.

Sticky posts feature allows you to highlight a post on top of all other posts on your blog page.

Simply edit the blog post that you want to pin to the top. On the post edit screen, check the box next to ‘Stick to the Front Page’ option under ‘Document’ panel.

Make a post sticky in WordPress

After that, click on the ‘Update’ button to save your changes.

You can now visit your website, and you will see the selected post pinned to the top. Depending on your theme, your sticky post will be highlighted differently.

Sticky post highlighted in WordPress

4. Modify WordPress Query using Code (Advanced)

This method requires you to add code to your WordPress site. If you haven’t done this before, then see our guide on how to copy and paste the code in WordPress.

If you are an advanced user and want to customize the post order, then you can modify the default WordPress query.

For example, take a look at this code snippet. It allows you to display posts in chronological order (older posts first).

//function to modify default WordPress query
function wpb_custom_query( $query ) 

// Make sure we only modify the main query on the homepage	
	if( $query->is_main_query() && ! is_admin() && $query->is_home() ) 

 	 	// Set parameters to modify the query
 		$query->set( 'orderby', 'date' );
		$query->set( 'order', 'DESC' );
	


// Hook our custom query function to the pre_get_posts 
add_action( 'pre_get_posts', 'wpb_custom_query' );

This code simply modifies the orderby and order parameters in the default WordPress query.

However, this code may sometimes not work as expected due to some plugins or theme already modifying the default query. To fix that, you can use the supress_filters parameter like this:

//function to modify default WordPress query
function wpb_custom_query( $query ) 

// Make sure we only modify the main query on the homepage	
	if( $query->is_main_query() && ! is_admin() && $query->is_home() ) 

 	 	// Set parameters to modify the query
 		$query->set( 'orderby', 'date' );
		$query->set( 'order', 'DESC' );
		$query->set( 'suppress_filters', 'true' );
	


// Hook our custom query function to the pre_get_posts 
add_action( 'pre_get_posts', 'wpb_custom_query' );

The oderby parameter comes with many options. See the full list of options on the WP Query codex page.

We hope this article helped you learn easy ways to re-order blog posts in WordPress. You may also want to see our ultimate list of most wanted WordPress tips and tricks that you can use on your blog.

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 4 Easy Ways to Re-Order Blog Posts in WordPress (Step by Step) appeared first on WPBeginner.



Source link

5 Best WordPress Ecommerce Plugins Compared – 2019


Are you looking to build an online store? Want to know which is the best WordPress eCommerce plugin?

Choosing the right eCommerce plugin is crucial for your business because a better platform means more opportunity for growth. Often users end up losing money because they didn’t do proper research when choosing the eCommerce platform to start their store.

In this article, we will compare the 5 best WordPress eCommerce plugins for 2019. We will also explain their pros and cons to help you find which eCommerce plugin is right for your business.

Best WordPress eCommerce plugins

What to Look for in a WordPress eCommerce Plugin for Your Site?

There are plenty of WordPress eCommerce plugins in the market. But not all of them have the right set of features for your use-case.

For example, some eCommerce plugins are made for selling digital goods like eBooks, photos, music, etc. Others are better suited for selling physical products that need shipping.

If you want to run a drop-shipping business, then you’ll need an eCommerce solution that provides better support for drop-shipping.

Basically, you need to consider what you will be selling and what kind of features you would need to efficiently run your online store.

Apart from that, following are some of the most important factors you need to look for when choosing an eCommerce platform.

  • Payment solutions – Your eCommerce plugin should have support for your preferred payment gateways by default or through an extension.
  • Design and customization – Your store’s design is your customer’s first interaction with your business. Make sure there are plenty of templates and easy customization options available
  • Apps and integrations – Check out integrations available for third-party apps like email marketing services, CRM software, accounting software, etc. You’ll need those tools to manage and grow your ecommerce business more effeciently.
  • Support options – Make sure that there are support options available. Good support can save you a lot of money in the long run.

What Do You Need to Run an eCommerce Website?

Ecommerce websites are resource intensive, so the first thing you will need is the best WordPress hosting that you can afford.

If you’re on a budget, then you can start with Bluehost. The Ecommerce plan comes with SSL Certificate which you need to collect payments securely, dedicated IP, and a dedicated support line. They also install WooCommerce by default, which is the most powerful WordPress Ecommerce plugin (as you’ll find out later in this article).

If budget is not an issue, and you want the best performance, then we recommend using a managed WordPress hosting provider like WPEngine.

Next, you will need to choose a domain name for your website. Here is our guide on how to pick the right domain name for your eCommerce site.

Lastly, you will need to choose essential business plugins that you will need such as OptinMonster which help you reduce shopping cart abandonment and increase sales.

Having that said, let’s take a look at the best WordPress eCommerce plugins.

Best WordPress Ecommerce Plugins – The Contenders

Now that you know what to look for in an eCommerce platform and what you need to get started, here are our top picks for the best eCommerce platform for WordPress users.

  1. WooCommerce
  2. BigCommerce
  3. Easy Digital Downloads
  4. MemberPress
  5. Shopify

Let’s take a look at each one of them and compare their pros and cons.

1. WooCommerce

WooCommerce

WooCommerce is the most popular WordPress eCommerce plugin. It is also the most popular eCommerce platform in the world. WooCommerce was acquired by Automattic (the company behind WordPress.com blog hosting service) in 2015.

There is a large number of addons and themes available for WooCommerce. They also have a passionate developer community behind it. Recently several hosting companies have started creating specialized WooCommerce hosting solutions.

Pros of Using WooCommerce

Here are some of the advantages of using WooCommerce as your WordPress eCommerce plugin:

Extensions and Themes – There are hundreds of extensions and themes available for WooCommerce, which makes it easy for you to add new features to your eCommerce site. Large collection of themes means you have tons of options when choosing your site’s design and layout.

Supports Both Digital and Physical Goods – With WooCommerce, you can sell physical as well as digital downloads (such as ebooks, music, software, and more).

Sell Affiliate or External Products – Using WooCommerce, you can add affiliate or external products to your site. Affiliate marketers can create product sites and provide users a better experience.

Complete Inventory Management – WooCommerce comes equipped with tools to easily manage your inventory or even assign it to a store manager.

Payment and Shipping Options – WooCommerce has built-in support for popular payment gateways, and you can add many other payment options using extensions. It can also calculate shipping and taxes.

Support and Documentation – There is excellent documentation available online for WooCommerce. Apart from documentation, there is knowledge base, help desk, and community forums available.

Cons of Using WooCommerce

Too Many Options – WooCommerce is very easy to use, but the number of options available on the settings page can be quite intimidating for a new user.

Finding Addons – There are lots of addons available for WooCommerce, sometimes a user may not find the right addon for features that they need.

Theme Support – WooCommerce works with any WordPress theme, but it is not always as easy to setup or good looking with all themes. You need a WooCommerce ready theme to take full advantage of its features without too much hassle.

Scalability – As your store gets larger, you will need to move to a managed hosting provider like WP Engine to scale your WooCommerce store.

WooCommerce is the perfect choice for any kind of eCommerce website. It has a large community of developers and users, a lot of addons and themes, excellent support for multilingual websites, and best free and paid support options.

2. BigCommerce

BigCommerce

BigCommerce is a fully hosted eCommerce platform that offers seamless integration with WordPress. This allows you to use a scalable eCommerce platform while using WordPress to manage your content and run your website.

It has a powerful integration plugin for WordPress which makes it very easy to embed your products in WordPress. It automatically creates the sign in, cart, account, and other important pages for you.

Let’s take a look at some of the advantages and disadvantages of using BigCommerce as your WordPress eCommerce platform.

Pros of Using BigCommerce

  • High scalability – It includes all the features you will need with enterprise grade security, high performance, and easy scalability.
  • Less Maintainence – Keeping your eCommerce engine separate from other content makes it easier to run your WordPress site.
  • Sell across Multiple Channels – You can use it to sell not only on your website but also on other channels like Facebook, Instagram, and Amazon.
  • No transaction charges – Unlike some other eCommerce platforms, it does not charge you on each transaction. You can choose from dozens of top payment gateways and only pay the payment service provider.

Cons of Using BigCommerce

  • Limited Integrations – BigCommerce integrates with all the top third-party apps and tools. However, its app store is still growing, and you may not find an integration for some less popular apps.
  • No Mobile App – Currently, it does not have a mobile app to manage your store on the go.

BigCommerce is an incredibly powerful yet very easy to use eCommerce platform. It is a SaaS eCommerce platform, but with their BigCommerce WordPress plugin you can have the best of both worlds.

It takes away the pains of scaling your hosting requirements as your business grows. At the same time, you don’t have to worry about security, performance, or finding extensions for SEO and caching.

BigCommerce is a rising contender in WordPress for headless eCommerce. It takes care of technology infrastructure, so you can focus on growing your business.

3. Easy Digital Downloads

Easy Digital Downloads

Easy Digital Downloads allows you to easily sell digital downloads online using WordPress. It is very easy to use and comes with powerful features to create beautiful and functional digital goods store.

We use Easy Digital Downloads to sell our software like WPForms and MonsterInsights.

Pros of Using Easy Digital Downloads

Designed To Sell Digital Goods – Easy Digital Downloads is built from the ground up to sell digital downloads. Unlike eCommerce plugins that can be used to sell all kind of products, EDD provides a far better experience for selling digital goods.

Easy To Use – Easy digital downloads is very easy to use, from the start you would instantly figure out how to add products and display them. This is really useful for the first timers.

Extensions – There are hundreds of extensions available for Easy Digital Downloads including addons for payment gateways, marketing platforms and services.

Themes – Easy Digital Downloads works with almost any WordPress theme, however if you have not choosen a theme yet, then Easy Digital Downloads has themes built specifically for the plugin.

Awesome Support – The plugin is very well documented, and you have free support forums, videos, tutorials, and even an IRC chatroom. There is also a priority support option for premium users.

Cons of Using Easy Digital Downloads

Digital Downloads Only – As the name suggests, Easy Digital Downloads makes it easier to create eCommerce sites for digital goods. But if you want to sell non-digital goods along with digital downloads then it will become quite complicated.

Selling External Products – If you want to add an external product or an affiliate product to your EDD store, then you will need to install a third-party add on for it.

When it comes to selling digital products online, we believe that Easy Digital Downloads is the best plugin to do that. We have used Easy Digital Downloads with great success, not only on client sites but also on a few of our own projects.

4. MemberPress

MemberPress

MemberPress is allows you to sell subscription based digital products and services. It is the best WordPress membership plugin with tons of integration options. It can even integrate with WooCommerce.

Let’s take a look at pros and cons MemberPress.

Pros of Using MemberPress

Sell Subscription Based Products – Allows you to easily sell subscription based products, membership plans, pay per view content, and more.

Powerful Access Rules – Powerful access control allows you to define user access levels and content restrictions. Only users with permissions will be able to access restricted content.

Powerful Extensions – You can integrate it to your WooCommerce store or LearnDash LMS. There are tons of extensions to connect MemberPress with third-party services.

Cons of Using MemberPress

Limited Payment Options – MemberPress only supports PayPal, Stripe, and Authorize.net.

Yearly Pricing – Pricing plans are available on yearly terms alone.

MemberPress is the perfect eCommerce plugin to sell subscription based products, sell courses, or build a membership website. It is beginner friendly and can be easily extended with addons which allows you to take your eCommerce website in any direction you want.

5. Shopify

Shopify

Shopify is a fast growing eCommerce platform that handles everything for you. Shopify isn’t a plugin but it’s an all in one solution that’s completely hassle free. See our guide on Shopify vs WooCommerce for detailed side-by-side comparison of the two platforms.

Let’s look at the Pros and Cons of Shopify.

Pros of Using Shopify

Super Easy for Beginners – No need to worry about the technical aspects of an eCommerce store such as setting up SSL, integrating with different payment gateways, handling shipping, worrying about taxes, etc. Shopify handles it all.

Supports Both Digital and Physical Goods – Whether you’re selling physical goods like shirts or digital downloads like music, Shopify can handle it all.

Complete Inventory Management – Shopify comes with an inventory editor and bulk importer combined with an order tracker which makes managing inventory a breeze.

Payment and Shipping Options – Shopify makes it easy for you to accept credit card both online and in person. Their shipping system streamline your fulfillment process with direct integration with popular providers like USPS.

Facebook Store, Buyable Pins, and Twitter Buy Buttons – Shopify integrates with everything. Whether you want to create a Facebook store, add a buy button on Twitter, or create buyable Pins on Pinterest, you can do it all with Shopify.

Cons of Using Shopify

Monthly Platform Fee – Shopify charges you a monthly fee to use their platform which is comparable to purchasing hosting and individual addons using the other plugins in this list.

Shopify Payments – Shopify encourages you to use their payment platform which is powered by Stripe and is a very good option for beginners. However if you want to overcomplicate things and use external systems, then Shopify charges you an additional fee.

If you want to have a powerful platform without having to deal with technical issues, then Shopify is the solution for you. While the monthly fee sounds bad at first, the hassle-free approach and peace of mind are definitely worth it because it allows you to focus on what you do best, your business!

Shopify does not have a native integration with WordPress. BigCommerce #2 solution in our list gives you everything Shopify offers while offering a seamless integration with your WordPress site.

Conclusion – The Best WordPress eCommerce Plugin is:

If you want maximum control, flexibility, and features, then WooCommerce is the best solution for you.

If you don’t want to manage all the technical stuff, then BigCommerce is the best option for you. It allows you to use a SaaS eCommerce platform side by side with WordPress as your content management system.

If you are just selling digital goods, then Easy Digital Downloads could be the best option for you.

That’s all we hope this article helped you find the best WordPress eCommerce plugins for your site. You may also want to see our comparison of 5 best drag and drop WordPress page builders.

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 5 Best WordPress Ecommerce Plugins Compared – 2019 appeared first on WPBeginner.



Source link

How to Install and Setup WordPress Multisite Network


Do you want to set up and install WordPress multisite network? WordPress comes with a built-in capability to create multiple websites using the same WordPress installation.

A WordPress multisite network is used by blogs, schools, and businesses, who need to run separate websites but want to manage them under one dashboard.

In this article, we will show you how to properly install and setup a WordPress multisite network.

How to install and setup WordPress multisite network

Since this is a comprehensive article, we have added the table of contents for easier navigation:

WordPress Multisite Basics

  1. What is WordPress Multisite?
  2. Pros of using a WordPress multisite network
  3. Cons of using a WordPress multisite network
  4. Who needs a WordPress multisite network?

WordPress Multisite Installation and Set up

  1. Requirements for a WordPress multisite network
  2. Choosing a domain structure for your multisite network
  3. Setting up wildcard subdomains
  4. Enabling WordPress multisite network feature
  5. Setting up your WordPress multisite network

WordPress Multisite Configuration Settings

  1. Configuring network settings
  2. Opening your multisite network for registrations
  3. New site settings
  4. Upload settings for your multisite network
  5. Plugin menu settings

Setting up Default Content, Theme, and Plugins

  1. Adding new sites to your WordPress multisite network
  2. Adding themes and plugins to your multisite network
  3. Adding default Content to new sites
  4. Troubleshooting and FAQs

    1. Troubleshooting WordPress multisite issues
    2. FAQs about WordPress multisite

    What is WordPress Multisite Network?

    A WordPress Multisite network allows you to run and manage multiple WordPress sites or blogs from a single WordPress installation.

    It enables you to create new sites instantly and manage them using the same username and password. You can even allow other users to signup and create their own blogs on your domain.

    The WordPress multisite network comes with advanced settings that you can use to customize each website / blog on your network.

    Pros of Using a WordPress Multisite Network

    In many situations, a WordPress multisite network can be more useful than managing multiple standalone WordPress sites. Here are some of the advantages of using a WordPress multisite network:

    1. As the network administrator, you can easily manage multiple sites from a single dashboard.
    2. Each site on the network can have its own admins. The site admins will have the capabilities to manage only their own website.
    3. You can install plugins / themes and activate them for multiple sites with one download.
    4. Multisite network also makes it easier for you to manage updates. You only need to update your WordPress, plugins, or themes on one “master” install.

    Cons of Using a WordPress Multisite Network

    Creating a WordPress multisite network is not always helpful in managing multiple sites. Here are some of the disadvantages that you should keep in mind before setting up a multisite network.

    1. All sites on the network share the same resources. This means that when your network is down, all other sites go down as well.
    2. It’s not easy to manage traffic and server resources for the beginner level users. In case, one of your websites gets unexpected traffic, then it will affect all other websites on the network.
    3. If one website gets hacked, then this means all sites on your network will get hacked.
    4. Some WordPress plugins may not work well on a multisite network.
    5. WordPress multisite network is not properly supported by all web hosting providers which limits your options. We will talk more about this later in the article.

    Who needs a WordPress multisite network?

    Just because you manage multiple WordPress websites does not mean you need to start using a multisite network.

    There are third party tools to manage multiple WordPress sites from a single dashboard. Tools like InfiniteWP or iThemes Sync make it easier to maintain multiple WordPress sites under one roof without switching back and forth from one site to another.

    Here are some scenarios when creating a multisite network makes sense:

    1. A magazine website with different sections managed by different teams.
    2. A business website with sub-sites for different locations and branches.
    3. Government or non-profit websites can use WordPress multisite for different departments, locations, and regions.
    4. Your own network of blogs running on multiple subdomains.
    5. Schools and colleges allowing students to create their own blogs on school servers.

    Requirements for a WordPress Multisite Network

    All websites on a WordPress multisite network share the same server resources. This means that the most important thing you will need is a good WordPress hosting.

    If you are planning on having just a couple of websites with low traffic, then you can probably get away with shared hosting.

    However, due to the nature of multisite network, you’d need VPS hosting or a dedicated server as your sites grow.

    We recommend Bluehost because they offer both shared hosting and VPS/Dedicated servers, and they are also one of the official WordPress hosting partners.

    If you’re looking for an alternative, then SiteGround and WP Engine provide excellent service for WordPress multisite network.

    Apart from web hosting, you will need the basic knowledge of how to install WordPress and editing files using FTP.

    Choosing a Domain Structure for your Multisite Network

    On a WordPress multisite network, you can add new sites using either subdomains or sub-directories.

    Example of subdomain:
    http://site1.example.com

    Example of sub-directory:
    http://example.com/site1/

    If you choose subdomains, then you will have to configure wildcard subdomains on your server. We will show you how to do that in the next step.

    On the other hand, if you choose sub-directories or path based URLs for sites on your network, then you can skip the next step.

    Setting Up Wildcard Subdomains

    If you decide to use subdomains for websites on your multisite network, then you will need to setup wildcard subdomains for your multisite network.

    To do that, first you need to login to your WordPress hosting account’s cPanel dashboard. After that, you need to scroll down to the ‘Domains’ section and then click on ‘Subdomains’.

    Setting up wild card subdomains

    Note: Depending on your web hosting service, your cPanel dashboard may look slightly different than the screenshot above. This screenshot is from the cPanel on Bluehost.

    On the next page, you need to enter the * sign in the subdomain field and select your main domain from the drop-down menu.

    Adding wildcard subdomain

    Cpanel will automatically detect the document root and will display it in the field below. Now click on the ‘Create’ button to add your wildcard subdomain.

    Enabling WordPress Multisite Network Feature

    Multisite Network feature comes built-in with each WordPress installation. All you need to do is install and setup WordPress like you normally would. After that, you just need to enable the multisite feature.

    You can also enable the multisite feature on any existing WordPress site. Before you enable multisite, don’t forget to create a complete backup of your WordPress site.

    To enable Multisite, connect to your site using a FTP client or cPanel file manager, and open the wp-config.php file for editing.

    You need to add the following code to your wp-config.php file just before the /* That’s all, stop editing! Happy blogging. */ line.

    
    /* Multisite */
    define( 'WP_ALLOW_MULTISITE', true );
    

    Once you are done, you can save and upload your wp-config.php file back to the server.

    This code simply enables the multisite feature on your WordPress site. Once enabled, you will still need to setup the multisite network.

    Setting Up Your WordPress Multisite Network

    Now that you have successfully enabled the Multisite Network feature on your WordPress site, it is time to set up your network.

    If you are setting up a mutlisite network on an existing WordPress website, then you will need to deactivate all plugins on your site.

    Simply visit the Plugins » Installed Plugins page and select all plugins. You need to select ‘Deactivate’ from the ‘Bulk Actions’ dropdown menu and then click on the ‘Apply’ button.

    Deactivate plugins

    You can now head over to Tools » Network Setup page to configure your multisite network.

    WordPress multisite network setup

    On the network setup screen, you will see a notice that you need Apache’s mod_rewrite module installed on your server. This module is installed and enabled on all the best WordPress hosting providers.

    The next thing you need to do is to tell WordPress what kind of domain structure you will be using for sites in your network, e.g. Subdomains or Sub-directories.

    After that, you would need to provide a title for your network and make sure that the email address in the Network admin email is correct.

    Click on the install button to continue.

    WordPress will now show you some code that you need to add to your wp-config.php and .htaccess file respectively.

    Add code to wp-config and .htaccess files

    You can use an FTP client or file manager in the cPanel to copy and paste the code in these two files.

    After that you will need to re-login to your WordPress site to access the multisite network.

    Configuring Network Settings

    Now that you have setup the multisite network, it is time to configure network settings.

    You need to switch to the ‘Network Dashboard’ to change network settings, add new sites, and configure other settings.

    When you take your mouse over to the ‘My Sites’ menu in the admin toolbar, a flydown popup will appear. Click on the Network Admin » Dashboard.

    Network admin dashboard

    This will take you to the multisite network dashboard. You will notice that there are new menu items to manage your multisite network. You will also see a “Right Now” dashboard widget that allows you to create a new site and add new users.

    Network dashboard

    To configure network settings, you need to click on the ‘Settings’ link in the admin sidebar.

    The first option on network settings page is to set your site title and admin email address. These fields will be filled automatically with the network title and admin email you entered during setup.

    Network settings

    Opening Your Multisite Network for Registrations

    The ‘Registration Settings’ section on the network settings page is probably the most important setting in your network setup.

    By default, both user and site registrations are disabled on the network.

    You can choose to open your site for user registration, or allow existing users to create new sites, or allow both user and site registration.

    WordPress multisite registration settings

    If you are opening your multisite network to registration, then you can check the box next to ‘Registration Notification’ option to receive email notifications every time a new user or site is registered.

    If you want to allow individual site administrators to add new users on their sites, then you can check the box next to ‘Add New Users’ option.

    Registration options

    Limited Email Registration option allows you to limit site or user registration to email addresses from specific domains. This is particularly useful if you only want to allow people from your own organization to register and create users or sites.

    Similarly, you can also ban certain domains from registration.

    New Site Settings

    The ‘New Site Settings’ section allows you to configure default options for new sites created on your multisite network.

    You can modify the welcome emails and the contents of first default post, page, and comment in these settings.

    New site settings

    As a network administrator, you can change these settings anytime.

    Upload Settings for Your Multisite Network

    It is important for you to keep an eye on the usage of your server resources. Under the Upload Settings section, you can limit the total amount of space a site can use for uploads.

    The default value is 100 MB which is probably good for at least 100 photo uploads. You can increase or decrease this space depending on how much disk space you have.

    Upload settings

    The default upload file types are images, audio, video, and pdf files. You can add additional file types if you want like doc, docx, odt, etc.

    After that, you can choose a file size limit, so that users can’t upload insanely large files to the server.

    Plugin Menu Settings

    Next, you can jump to the menu settings. It will allow you to enable the administrative menu for the plugins section on your network sites.

    Show or hide plugins menu to site admins

    Enabling this will show plugins menu to respective site admins. They can activate or deactivate a plugin on their individual sites, but they cannot install new plugins.

    Once you are satisfied with all the configuration settings, make sure to click on the ‘Save Changes’ button.

    Adding New Sites to Your WordPress Multisite Network

    To add a new site to your WordPress multisite network, simply click on ‘Sites’ under My Sites » Network Admin menu in the admin toolbar.

    Adding new sites to your WordPress multisite network

    This will show you a list of sites on your current multisite installation. By default, you have your primary site listed as the only site in your WordPress multisite network.

    To add a new site, click on the ‘Add New’ button at the top.

    Add new site

    On the ‘Add New Site’ page, you need to provide the site’s address. You don’t need to type the full address, just the part you want to use as subdomain or sub-directory.

    Next, you need to add a site title, and enter the site admin’s email address.

    Adding new site details

    You can add an admin email address other than the one that you are currently using to manage your multisite network.

    If the email address is not currently in use by another user, then WordPress will create a new user and send the username and password to the email address you enter.

    Once you are done, click on the ‘Add Site’ button.

    A new site will be added to your WordPress multisite network. As the network admin, you will receive a new site registration email as well.

    If you created a new user, then that user will receive an email with instructions to set a new password and login.

    Adding Themes and Plugins to Your Multisite Network

    By default, individual site administrators in a multisite network cannot install themes and plugins on their own.

    As the network admin, you can install the respective plugins and themes, so it’s available for all sites on your network.

    Installing themes for your multisite network

    To add themes, go to My Sites » Network Admin » Themes page.

    Installed themes on your WordPress multisite network

    On this page, you will see a list of currently installed themes on your WordPress multisite.

    You can make a theme available to other sites by clicking on ‘Network Enable’ option under that theme. You can also disable a theme by clicking on ‘Network Disable’ link under the theme. Note: Network Disable option will only appear when the theme is enabled.

    To add a new theme, you need to click on the ‘Add New’ button at the top of your screen and then install a WordPress theme as you would normally do.

    Once the new theme is installed, you will be able to make it available to other sites on your network with the ‘Network Enable’ option.

    If you need recommendations on which themes to make available to your network, take a look at our picks of the best WordPress themes that you can use.

Setting a default theme for your Multisite Network

After you have added a couple of themes, WordPress will still activate the default WordPress theme for each new site.

If you want to make another theme to be the default theme for new sites, then you need to add the following code to your wp-config.php file.


// Setting default theme for new sites
define( 'WP_DEFAULT_THEME', 'your-theme' );

Replace your-theme with the name of your theme. You will need to use the name of the theme’s folder, which you can find out by looking at the /wp-content/themes/ folder.

Installing plugins for your multisite network

Similarly, you can visit My Sites » Network Admin » Plugins page to install plugins and click on the ‘Network Activate’ link below each plugin to activate them on your multisite network.

Network activate plugins on a WordPress multisite

Following are a few essential WordPress plugins that we recommend for every website:

For more plugin recommendations, see our list of the essential WordPress plugins for all websites.

Note: If you have enabled the Plugins Menu option for site admins in the ‘Network Settings’ previously, then the site administrators can activate or deactivate installed plugins on their own. Site admins cannot delete or install a new plugin on their own.

Adding Default Content to Multisite Sites

By default, WordPress allows you to edit some default content for each site on your multisite network. You can go to Settings » Network Settings page and add them under the section ‘New site settings’.

New site defaults

You can edit the content for the default post, page, and comment. We recommend replacing the default content with something more useful for your site admins.

What if you wanted additional default content to be added to each new site?

By default, WordPress does not give you an option to create additional default content for new sites. If you want to do that, then you will need to add custom code to your WordPress multisite.

In this example, we are going to add a new default page to be created for each new site.


add_action('wpmu_new_blog', 'wpb_create_my_pages', 10, 2);
 
function wpb_create_my_pages($blog_id, $user_id)
  switch_to_blog($blog_id);
 
// create a new page
  $page_id = wp_insert_post(array(
    'post_title'     => 'About',
    'post_name'      => 'about',
    'post_content'   => 'This is an about page. You can use it to introduce yourself to your readers or you can simply delete it.',
    'post_status'    => 'publish',
    'post_author'    => $user_id, // or "1" (super-admin?)
    'post_type'      => 'page',
    'menu_order'     => 1,
    'comment_status' => 'closed',
    'ping_status'    => 'closed',
 ));
  
restore_current_blog();


You can use the same code with little modifications to create default posts for new sites. Check out the following code:


add_action('wpmu_new_blog', 'wpb_create_my_pages', 10, 2);
 
function wpb_create_my_pages($blog_id, $user_id)
  switch_to_blog($blog_id);
 
// create a new page
  $page_id = wp_insert_post(array(
    'post_title'     => 'A sample blog post',
    'post_name'      => 'sample-blog-post',
    'post_content'   => 'This is just another sample blog post. Feel free to delete it.',
    'post_status'    => 'publish',
    'post_author'    => $user_id, // or "1" (super-admin?)
    'post_type'      => 'post',
 ));
  
restore_current_blog();


Troubleshooting WordPress Multisite Issues

Most common issues with WordPress multisite network setup occur due to incorrect configuration of wildcard subdomains and domain mapping issues. Make sure that your web host supports wildcard subdomains before setting up multisite.

Following are some other common issues and their quick fixes.

Fixing login issues on multisite installs

Another common issue is that when using WordPress multisite with sub-directories, some users are unable to login to the admin area of their sites after they add the required code in wp-config.php file.

To fix this, try replacing


define('SUBDOMAIN_INSTALL', false);

line in wp-config.php file with


define('SUBDOMAIN_INSTALL', 'false');

Find unconfirmed users

Another issue that you may come across is not being able to find users who registered on your network but didn’t get the activation email. To fix this issue, see our guide on how to find pending unconfirmed users in WordPress.

Exporting a site from multisite to its own WordPress install

Later at some point, you or another site owner may want to export a site from multisite to its own WordPress install. This can be easily done. For step by step instructions see our guide on how to move a site from WordPress multisite to single install.

You may also want to bookmark our ultimate guide of common WordPress errors and how to fix them. It will save you a lot of time by quickly fixing the most common WordPress issues.

FAQs About WordPress Multisite Network

Many of our users have asked us plenty of questions about WordPress multisite network and how to use it more efficiently. Following are the most frequently asked questions that we have answered.

1. Would I be able to better manage my sites with a multisite network?

To be honest, the answer really depends on your usage scenario.

For example, if your websites are not related to each other, then you would be better off with a multiple site management tool, like InifiteWP.

If you manage multiple sites for a restaurant chain, university, or online magazine, then WordPress multisite will be more efficient.

2. Does WordPress multisite make my websites load faster?

Once again it depends on several factors. Better WordPress hosting with plenty of server resources will allow multisite to be faster but then again with these resources, individual WordPress sites will also run faster.

However, on a shared hosting account, traffic spikes will increase memory usage and slow down all websites on the multisite network at the same time. To improve multisite speed, see our guide on WordPress performance and speed optimization.

3. Can I add an online store to a WordPress Multisite Website?

Yes, you can add an online store in WordPress multisite network. Most likely, you will be using an eCommerce plugin like WooCommerce for that, which is compatible with WordPress multisite.

4. Can I install ‘x plugin’ on my WordPress multisite?

Some WordPress plugins may not be compatible with WordPress multisite. Normally, plugin authors mention it on the plugin’s website and you can avoid installing a plugin that may not work on a multisite setup. However, if it is not mentioned, then it is safe to assume that it is multisite compatible.

4. How do I share user logins and roles across the multisite network?

By default, a user who is registered on one site cannot register or be added to another site on the same network. That’s because they are already registered in the shared WordPress database. However, they don’t have any user role privileges on other sites.

You can use third-party plugins like WP Multisite User Sync to sync users across the network. However, you need to be careful as you may end up giving someone admin privileges to a site.

We hope this article helped you learn how to install and setup WordPress multisite network. You may also want to see our step by step WordPress security guide to protect and keep your WordPress multisite secure.

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.



Source link

What is the Difference Between Posts vs. Pages in WordPress


Often WordPress beginners get confused between posts and pages. By default, WordPress comes with two content types: posts and pages.

As a beginner, you are probably wondering what’s the difference between posts vs pages? They seem to look similar in the WordPress dashboard as well as on the website.

Readers often ask us: Why do I need both? When should I use posts? When should I use pages?

In this article, we will explain the difference between posts vs. pages in WordPress.

WordPress Posts vs. Pages - What's the difference

What are Posts in WordPress?

Posts are blog content listed in a reverse chronological order (newest content on top). You will see posts listed on your blog page.

If you are using WordPress as a blog, then you will end up using posts for the majority of your website’s content.

You can add and edit your WordPress posts from the ‘Posts’ menu in your dashboard. Here is how Add New Post screen looks.

New WordPress Post Screen

Due to their reverse chronological order, your posts are meant to be timely. Older posts are archived based on month and year.

As the posts gets older, the user has to dig deeper to find them. You have the option to organize your posts based on categories and tags.

WordPress Post Categories Tags

Because WordPress posts are published with time and date in mind, they are syndicated through the RSS feeds. This allows your readers to be notified of the most recent post update via RSS feeds.

Bloggers can use the RSS feeds to deliver email broadcasts through services like Constant Contact, Aweber or MailChimp. You can create a daily and weekly newsletter for your audience to subscribe to.

The very timely nature of posts make it extremely social. You can use one of the many social sharing plugins to allow your users to share your posts in social media networks like Facebook, Twitter, LinkedIn, Pinterest etc.

Posts encourage conversation. They have a built-in comment feature that allows users to comment on a particular topic. By default, comments, pingbacks, and trackbacks are enabled.

WordPress Post Comments Enabled

You can go to your Settings » Discussion to turn off comments on older posts if you like.

WordPress posts usually have the name of the author and published/updated date.

The best example of a WordPress post may be this article which you are reading now. Go to the top, and you can see the post category ‘Beginner’s Guide’ above the article title. Below the title, there is the last updated date, author’s name, and social share buttons.

WordPress Post Example WPBeginner Blog

After the main article content, there is the comments section. You cannot usually find these on a page.

Now that you know what are posts, let’s take a look at pages and how they are different.

What are Pages in WordPress?

Pages are static “one-off” type content such as your about page, privacy policy, contact page, etc. While the WordPress database stores the published date of the page, pages are timeless entities.

For example, your about page is not suppose to expire. Sure you can go back and make updates to it, but chances are you will not have about page 2012, about page 2013 etc. Because there is no time and date tied to pages, they are not included in your RSS feeds by default.

You can add and edit pages in WordPress from ‘Pages’ menu in your dashboard. Here is how Add New Page screen looks like:

Add New Page WordPress Screen

Pages are not meant to be social in most cases thus do not include social sharing buttons. For example, you probably don’t want others to tweet your privacy policy page in most cases.

Similarly, pages also don’t include comments. You don’t want users to comment on your contact page or your legal disclaimers page. There is an option to enable comments, however, it is disabled by default for your WordPress pages.

Comment Options in WordPress Pages

Unlike posts, pages are hierarchical by nature. For example, you can have subpages or child pages within a page. You can easily turn a page into subpage by choosing a parent page from Page Attributes when editing a page.

Page Attributes WordPress

A key example of this in action would be our Blueprint page. This feature allows you to organize your pages together, and even assign a custom template to them.

WordPress by default comes with a feature that allows you create custom page templates using your theme. This allows developers to customize the look of each page when necessary.

In most themes, post and pages look the same. But when you are using your page to create a landing page or a gallery page, then the custom page templates feature comes in very handy.

Pages also have this archaic feature called ‘Order’ which lets you customize the order of pages by assigning a number value to it. However, this feature is extended by plugins like Simple Page Ordering that allows you to drag & drop the order of pages.

WordPress Pages vs. Posts (Key Differences)

To summarize, following are the key differences between posts vs pages in WordPress.

  • Posts are timely vs. Pages are timeless.
  • Posts are social vs. Pages are NOT.
  • Posts are organized using categories and tags vs. Pages are hierarchical and can be organized as child and parent pages.
  • Posts are included in RSS feed vs. Pages are not.
  • Posts have author and published date vs Pages do not.

The differences we listed above may have exceptions. You can use plugins to extend the functionality of both content types.

Despite these differences, there are some similarities between pages and posts in WordPress.

First, they are both used for publishing content. You can add text, images, forms, etc. to both posts and pages. There is featured image meta-field in both pages and posts.

You can build a website without ever using posts or blogging features of WordPress. You can also make a business website with pages and a separate blog section for your news, announcements, and other articles.

Frequently Asked Questions

Following are some of the most frequently asked questions we have heard from our users about posts vs. pages, and how to properly use them in WordPress.

1. How Many Posts and/or Pages Can I Have?

You can have as many posts and/or pages that you want. There is no limit on the number of posts or pages that can be created.

2. Are there any SEO advantages to one or the other?

Search engines like content to be organized. Timeless content is considered to be more important; however, there is a lot of priority given to the latest timely content.

In short, there may be a difference, but as a beginner, you do not need to worry about it. Focus on making your site organized for the user. To learn more, see our complete WordPress SEO guide for beginners.

3. Which pages I should create on my website or blog?

It really depends on what kind of blog or website you are making. However, you may want to see our list of important pages for all websites.

4. Can I switch posts to pages and vice versa?

Many beginners accidentally add content to posts when they actually wanted to create pages. Similarly, some new bloggers may end up saving blog posts as pages.

If you have just started out, then you can easily fix that by using the post type switcher plugin. For more details see our article on how to switch post types in WordPress.

5. Are there other content types in WordPress besides posts and pages?

Yes, there are. However, these other default content types include attachments, revisions, and navigation menus which are normally not used the same way as posts and pages.

WordPress also allows developers to create their own custom post types. This feature is used by plugins to create additional content types in WordPress. For example, if you are running a WooCommerce store, then you will see a ‘Products’ post type in your WordPress admin area.

We hope this article helped you learn the difference between pages and posts in WordPress and how to use them. You may also want to see our list of important things to do after installing 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 Facebook.

The post What is the Difference Between Posts vs. Pages in WordPress appeared first on WPBeginner.



Source link

How to Add Google Maps Store Locator in WordPress


Do you want to add Google Maps store locator in WordPress? A store locator is a map pointing to your business location.

It allows users to locate you on the map, find driving directions, or share the location with friends. Adding a store locator to your business website or even an online store helps you instantly earn user trust.

In this article, we will show you how to easily add Google Maps store locator in WordPress.

How to add a Google Maps store locator in WordPress

Google Maps introduced a paid API to display maps on websites. They still offer a limited free option to embed Google maps on small websites.

Most Google Maps plugins for WordPress use the Google API to retrieve and display maps. If you want to use a Google Maps plugin, then you will need to sign up with Google API platform and enable billing option.

It is a pay as you go service, which means you will be charged based on the number of API calls made from your website.

We will show you both free and paid methods with their pros and cons, then you can choose the one that best suits your needs.

Method 1. Adding Google Maps to Your Website for Free

This method is easier and free. The disadvantage is that you cannot show multiple stores on a single map.

It is recommended for users who just want to add a single Google Maps store location on their website.

First, you need to visit the Google Maps website on your computer. Next, enter your store’s address in the search field and Google Maps will show it on the map with a pinned marker on the map.

Sharing a map in Google Maps

Make sure that the marker is placed on the correct location. You can select a zoom level by clicking the zoom button. Once you are satisfied with the zoom level, you need to click on the share button from the left column.

This will bring up a popup where you need to switch to the ‘Embed a Map’ tab. You will now see your searched location on the map with an HTML code.

Copy the Google Maps embed code

Click on the Copy HTML link to get the embed code.

Now head over to the admin area of your WordPress website. Once in the admin area, go ahead and edit the post or page where you want to display the store location map.

Normally, users add a store location map on their contact form page with their phone number and opening hours.

On the post edit screen, you need to add a custom HTML block.

Adding a custom HTML block in WordPress

In the text area of custom HTML block, you need to paste the code you copied from Google Maps.

Maps embed code in WordPress

You can now switch to the preview tab to see Google Maps embedded into your page. It will show your store location marked on the map with links to directions or to save the location.

Store location marked on the map

Method 2. Add Google Maps Store Locator Using a WordPress Plugin

This method is recommended for users who want to show multiple store locations on a Google Map.

The first thing you need to do is in install and activate the WP Store Locator plugin. For more details, see our step by step guide on how to install a WordPress plugin.

It is a free Google Maps plugin that allows you to create a custom map with multiple store locations and custom fields.

The disadvantage of this method is that it requires you to add an API key. You will need to provide your billing information to use the API key. For pricing and other information, please check out the Google Maps Platform website.

Ready, let’s get started.

Step 1. Generating Google Maps API keys

To use WP Store Locator plugin, you will need to generate two API keys. The first one is called the Browser API key and the second one is called the Server Key.

Let’s start with the Browser key first. Click on this Google Developer Console link and it will take you to the Google API website with all the required APIs enabled.

Create a new project

You need to create a new project and give it a name that helps you identify the project. After that, you will have to wait a few moments as the console creates the project for you.

Next, you will be redirected to the API key configuration page. You need to provide a title for your API key, so you can easily identify it as the browser api key for your Google Maps project.

Browser api key settings

Next, you need to set ‘Application Restrictions’ to ‘HTTP Referrers’. Below that you need to set the ‘Accept requests from’ field to your domain name in the following format.

https://example.com/*
https://*.example.com/* (if you are using a subdomain)

Finally, click on the ‘Create’ button. The console will now save your settings and will show you the Browser key. You need to copy and paste this key in a text editor, you will need it later.

Copy browser api key

Next, you need to create the server API key. Click on this Google Developer Console link and it will take you directly to the console with selected APIs enabled.

You will once again see the create project page. However since you have already created a project, you can just click on the drop-down menu and select your project.

Select your Google Maps project

You will be then redirected to API configuration page. Provide a name for this API key that helps you recognize it as Server key.

Set IP restrictions

Under the ‘Application restrictions’ section, you need to select IP Addresses. Basically, we are telling Google to only accept server requests coming from specific IP addresses.

Now you would need to ask your WordPress hosting provider to tell you the IP range used by your hosting account. It would be in the following format:

172.16.0.0/12

After that, you need to click on the ‘Create’ button to save your settings and copy the Server API key.

Step 2. Setting up the WP Store Locator Plugin

Once you have created your API keys, you need to head over to Store Locator » Settings page to set up the plugin.

Enter Google Maps Keys

Enter the Google Maps browser and server API keys you generated earlier. Next, select Maps language and region and then click on the save changes button to store your settings.

Now, you need to scroll down on the settings page to the ‘Map’ section and enter a start point of the map. This start point could be a city or a country, so users can see markers placed at different locations.

Add a start point for your store locator map

There are many other options on the settings page including map style, default zoom level, map type, search radius, country, etc. You can review them and adjust them to your needs.

Once you are done, it is time to add locations.

Step 3. Adding store locations

Head over to Store Locator » New Store page to add your first location. The New Store page will look just like the default post or page editor in WordPress.

Store address

Provide a title for your store and then scroll down to ‘Store details’ section. From here, you need to enter your store address.

You will see a map in the right column, however it will not automatically update to the address you have entered. You will need to click on the Publish button to save your location. After that, refresh the page and the map will point to the address you provided.

Now repeat the process to add other store locations. You can add as many store locations as you want.

Step 4. Adding the store locator map in WordPress

To display your store locator on a WordPress page, simply create a new page or edit an existing one where you want to display the map.

On the post edit screen, you need to add the ‘Shortcode’ block to your post edit area. After that add the [wpls] shortcode inside it.

Store locator shortcode

You can now save or publish your page and click on the preview button to see Google Maps store locator in action.

Store locator map preview

It will show your map markers for each store location and start the map from your preferred starting point. For example, in this map, it is focused on the city of West Palm Beach and showing two store locations on the map.

That’s all we hope this article helped you learn how to add Google Maps store locator in WordPress. You may also want to see our list of free Google Tools every site owner should use.

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 Google Maps Store Locator in WordPress appeared first on WPBeginner.



Source link