How to Add a Custom Author Profile Page to Your WordPress

Do you want to add a custom author profile page to your WordPress site? Many WordPress themes have limited author profile information on their author archive page. In this article, we will show you how to create a custom author profile page in WordPress. Method… Read More »

The post How to Add a Custom Author Profile Page to Your WordPress appeared first on WPBeginner.

Do you want to add a custom author profile page to your WordPress site? Many WordPress themes have limited author profile information on their author archive page. In this article, we will show you how to create a custom author profile page in WordPress.

Adding a custom author profile page in WordPress

Method 1. Add Custom Author Profile Page in WordPress with WP User Manager

This method is recommended for all users. It is easy to setup and has more features.

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

Upon activation, you need to visit Users » WPUM Settings page to configure the plugin settings.

WP User Manager settings page

The plugin will automatically create different pages to use as custom login, custom user registration, forgot password, account, and profile pages.

WP User Manager is a powerful plugin and comes with a lot of options. You need to carefully review them and turn off the features that you don’t want to use.

Next, you need to click on the ‘Profiles’ tab to setup user profile settings.

User profile page settings

Here you can enable profile page option for guests, which means anyone can view user profiles. You can also allow members to view each other’s profiles. If you uncheck this option, then users will only be able to view their own profile pages.

You can also allow users to upload custom profile photo and display their recent articles as well as comments on their profile page.

Don’t forget to click on the save changes button to store your settings.

Next, you need to select SEO friendly URLs or permalinks for the author profile pages. You can do this by visiting Settings » Permalinks page and scroll down to the ‘User profile permalink base’ section.

Select a URL structure for user profile pages

The plugin offers you to use user ID, username, or nickname in the URL. Both nickname and username are more SEO friendly options than user ID. Click to select either one of them and then click on the save changes button to store your permalink settings.

Your custom author profile pages are almost ready. Now we just need to let users easily find their profile pages on your website.

Head over to Appearance » Widgets page and add [WPUM] Login Form widget to a sidebar.

Add user login and profile link widget to sidebar

You can now visit your website to see the author profile page in action. As a logged in user, you will see your own account information in the sidebar widget. Clicking on the username will take you to your author profile page.

Author profile page

The sidebar widget will show a login form to logged out users. If you allow users to register on your website, then the form will also include a link to sign up.

The plugin will also change author links on your website and point them to the author profile page instead of the default author’s archive pages.

Changing Appearance of Author Profile Pages

If you just want to change colors or borders, then you can do that by adding custom CSS.

However, if you want to change the layout and order of things, then you will need to edit the plugin’s template files. WP User Manager comes with custom templates support which means you can create your own templates inside your current theme for the plugin to use.

First you need to connect to your website using an FTP client and go to /wp-content/plugins/wp-user-manager/templates/ folder. Download all the files you see there to your computer.

Next, you need to go to your current theme folder and create a new folder “wpum” inside it. Now upload the files you downloaded earlier to the wpum folder.

Now you can edit these files to customize the appearance of your profile pages as needed.

Method 2. Manually Create a Custom Author Profile Page in Your Theme

This method requires you to edit your WordPress theme or child theme files. If you haven’t done this before, then please see our guide on how to copy and paste code in WordPress.

First, you will need to connect to your website using an FTP client and go to /wp-content/themes/your-current-theme/ folder.

Inside your current theme folder, you need to create an author.php file. After that you need to copy the contents of archive.php file and paste them inside your new author.php template.

If your theme already has an author.php file, then you can edit that as well.

Your goal here is to get author’s profile information and then display it. You will need to decide where you want to start editing. Usually, you can edit anything between the get_header(); and get_sidebar() lines.

<?php
// Set the Current Author Variable $curauth
$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
?>
    
<div class="author-profile-card">
    <h2>About: <?php echo $curauth->nickname; ?></h2>
    <div class="author-photo">
    <?php echo get_avatar( $curauth->user_email , '90 '); ?>
    </div>
    <p><strong>Website:</strong> <a href="<?php echo $curauth->user_url; ?>"><?php echo $curauth->user_url; ?></a><br />
    <strong>Bio:</strong> <?php echo $curauth->user_description; ?></p>
</div>
    
<h2>Posts by <?php echo $curauth->nickname; ?>:</h2>


		 <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h3>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>">
<?php the_title(); ?></a>
</h3>
<p class="posted-on">Posted on: <?php the_time('d M Y'); ?></p>

<?php the_excerpt(); ?>

<?php endwhile; 

// Previous/next page navigation.
the_posts_pagination();


else: ?>
<p><?php _e('No posts by this author.'); ?></p>

<?php endif; ?>

This code simply adds an author profile card at the top of the page, and then displays recent posts by the author.

Feel free to customize this code as much as you need. You can add additional user profile fields to your website, add author’s Twitter and Facebook profile links, display featured images for posts, and so on.

Here is some sample CSS to give your author profile card a decent look. You can add it as custom CSS in your theme and then change it to match your theme colors.

.author-profile-card {
    background: #eee;
    border: 1px solid #ccc;
    padding: 20px;
    margin-bottom: 20px;
}
.author-photo {
    float: left;
    text-align: left;
    padding: 5px;
}

Here is how it looked on our demo website:

A custom author profile page in WordPress

We hope this article helped you learn how to add a custom author profile page to your WordPress site. You may also want to see our ultimate step by step WordPress SEO guide for beginners.

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 a Custom Author Profile Page to Your WordPress appeared first on WPBeginner.

Suggestions and Tips for attending your first tech conference

WoC Tech Chat used under CC

This last week Joseph Phillips tweeted that he was going to his first big tech conference and wanted some tips and suggestions. I have a TON of tips, but I know YOU have more, so I retweeted his request and prompted folks to reply. This was well timed as I had just gotten back from OSCON and BUILD, two great conferences.

What suggestions to you offer to someone who is attending their first big tech conference? @2joephillips https://t.co/2HtRs4N6cj

— Scott Hanselman (@shanselman) May 15, 2017

The resulting thread was fantastic, so I’ve pulled some of the best recommendations out. As per usual, the Community has some great ideas and you should check them out!

  • @saraford – Whenever you get a biz card write down why you met them or what convo was about. It might seem obvious at time but you wont remember at home
  • @arcdigg – Meet people and speakers. Tech is part of your success, but growing your network matters too. Conf can give you both or not. Up to you!
  • @marypcbuk – if approaching people is hard for you, just ask ‘what do you work on?’
  • @ohhoe – don’t be afraid to introduce yrself to people! let them know its yr first conference, often people will introduce you to other people too 🙂
  • @IrishSQL – connect with a few attendees/speakers online prior to event, and bring plenty of business cards. When u get one, write details on back
  • @arcdigg – Backpack and sneakers beat cute laptop bag and heels (ed: dress comfortably)
  • @scribblingon – You might feel left out & think everyone knows everyone else. Don’t be afraid to approach people & talk even if seems random sometimes 🙂 If you liked someone’s talk, strike a convo & tell them that!!
  • @arcdigg – Plan session attendance in advance, have a backup in case the session is full.
  • @jesslynnrose – Reach out to some other folks who are using the hashtag before you get there, events can be cliquey, say hi and make friends before you go!
  • @thelarkinn – Never feel afraid to say hi to maintainers, and speakers!!!! Especially if you want to help!
  • @everettharper – Pick 3 ppl you want to meet. Prep 1 Q for each. Go early, find person #1 in the 1st hr before crowds. 1/3 done = momentum for rest of day!
  • @jorriss – Meet people. Skip sessions. You’ll get more from meeting and talking with people then sitting in the sessions. #hallwaytrack
  • @stabbycutyou – Leave room in your schedule, Meet people, Eavesdrop on hallway convos, Take notes, Present on them at your job
  • @patrickfoley – Don’t forget to sleep. Evidence that long-term memories get “written” then
  • @david_t_macknet – Drinking will not help you remember it better or have a better time mingling. Most of us are just as introverted & the awkwardness fades.
  • @carlowahlstedt – Don’t feel like you have to go to EVERY session.
  • @davidpine7 – Try your best to NOT be an introvert — in our industry that can be challenging, but if you put yourself out there…you will not regret it!
  • @frontvu – Don’t rely on the conference wifi
  • @shepherddad – Put snacks in your bag or pocket.
  • @sod1102 – Find out if there will be slides (and even better!) video available post conference, then don’t worry about missing stuff and relax & enjoy
  • @rnelson0 – Take notes. Live tweet, carry a notebook, jot it all down at 1am before sleeping, whatever method helps you remember what you did.
  • @hoyto – Sit [at] meal tables with random people and introduce yourself.
  • @_s_hari – Ask speaker when *not* to use product/methodology that they’re speaking on. If they cannot explain that, then it’s just a marketing session
  • @EricFishor – Don’t be afraid to discreetly leave or enter an on going session. It’s up to you to seek out sessions that interest you.
  • @texmandie – If you get to meet and talk to your heroes, don’t freak out – they’re normal people who happen to do cool stuff
  • @wilbers_ke – Greatest connections happen in the hallways, coffee queue and places with animated humans. Minimize seated conference halls
  • @CJohnsonO365 – CLEAR YOUR SCHEDULE. Don’t try to get “regular” work done during the conference— you’ll end up missing something important!
  • @g33konaut – Tweet with the conf hashtag to ask if people wanna meet and talk or hangout after the conference, also follow the hashtag tweets to find ppl. Don’t sweat missing a talk, meeting people and talking to them is always better than than seeing a talk. Also the talks are often recorded
  • @foxdeploy – Who cares about swag, it’s all about connections. Meet the people who’ve helped you over the years and say thanks.
  • @jfletch – Ask people which after parties they are attending. Great way to find out about smaller/more interesting events and get yourself invited!
  • @marxculture – The Law of Two Feet – if you aren’t enjoying a session then leave. Go to at least one thing outside your normal sphere.
  • @joshkodroff – Bring work business cards if you’re not looking for a job, personal business cards if you are.
  • @benjimawoo – Go to sessions that cover tehnologies you wouldn’t otherwise encounter day to day. Techs you don’t use in your day job.

Fantastic stuff. You’ll get more out of a conference if you say hello, include the “hallway track” in your planning, stay off your phone and laptop, and check out sessions and tech you don’t usually work on.

What are YOUR suggestions? Sound off in the comments.


Sponsor: Did you know VSTS can integrate closely with Octopus Deploy? Watch Damian Brady and Brian A. Randell as they show you how to automate deployments from VSTS to Octopus Deploy, and demo the new VSTS Octopus Deploy dashboard widget. Watch now!


© 2017 Scott Hanselman. All rights reserved.
     
WoC Tech Chat used under CC

This last week Joseph Phillips tweeted that he was going to his first big tech conference and wanted some tips and suggestions. I have a TON of tips, but I know YOU have more, so I retweeted his request and prompted folks to reply. This was well timed as I had just gotten back from OSCON and BUILD, two great conferences.

The resulting thread was fantastic, so I've pulled some of the best recommendations out. As per usual, the Community has some great ideas and you should check them out!

  • @saraford - Whenever you get a biz card write down why you met them or what convo was about. It might seem obvious at time but you wont remember at home
  • @arcdigg - Meet people and speakers. Tech is part of your success, but growing your network matters too. Conf can give you both or not. Up to you!
  • @marypcbuk - if approaching people is hard for you, just ask 'what do you work on?'
  • @ohhoe - don't be afraid to introduce yrself to people! let them know its yr first conference, often people will introduce you to other people too :)
  • @IrishSQL - connect with a few attendees/speakers online prior to event, and bring plenty of business cards. When u get one, write details on back
  • @arcdigg - Backpack and sneakers beat cute laptop bag and heels (ed: dress comfortably)
  • @scribblingon - You might feel left out & think everyone knows everyone else. Don't be afraid to approach people & talk even if seems random sometimes :) If you liked someone's talk, strike a convo & tell them that!!
  • @arcdigg - Plan session attendance in advance, have a backup in case the session is full.
  • @jesslynnrose - Reach out to some other folks who are using the hashtag before you get there, events can be cliquey, say hi and make friends before you go!
  • @thelarkinn - Never feel afraid to say hi to maintainers, and speakers!!!! Especially if you want to help!
  • @everettharper - Pick 3 ppl you want to meet. Prep 1 Q for each. Go early, find person #1 in the 1st hr before crowds. 1/3 done = momentum for rest of day!
  • @jorriss - Meet people. Skip sessions. You'll get more from meeting and talking with people then sitting in the sessions. #hallwaytrack
  • @stabbycutyou - Leave room in your schedule, Meet people, Eavesdrop on hallway convos, Take notes, Present on them at your job
  • @patrickfoley - Don't forget to sleep. Evidence that long-term memories get "written" then
  • @david_t_macknet - Drinking will not help you remember it better or have a better time mingling. Most of us are just as introverted & the awkwardness fades.
  • @carlowahlstedt - Don't feel like you have to go to EVERY session.
  • @davidpine7 - Try your best to NOT be an introvert -- in our industry that can be challenging, but if you put yourself out there...you will not regret it!
  • @frontvu - Don't rely on the conference wifi
  • @shepherddad - Put snacks in your bag or pocket.
  • @sod1102 - Find out if there will be slides (and even better!) video available post conference, then don't worry about missing stuff and relax & enjoy
  • @rnelson0 - Take notes. Live tweet, carry a notebook, jot it all down at 1am before sleeping, whatever method helps you remember what you did.
  • @hoyto - Sit [at] meal tables with random people and introduce yourself.
  • @_s_hari - Ask speaker when *not* to use product/methodology that they're speaking on. If they cannot explain that, then it's just a marketing session
  • @EricFishor - Don't be afraid to discreetly leave or enter an on going session. It's up to you to seek out sessions that interest you.
  • @texmandie - If you get to meet and talk to your heroes, don't freak out - they're normal people who happen to do cool stuff
  • @wilbers_ke - Greatest connections happen in the hallways, coffee queue and places with animated humans. Minimize seated conference halls
  • @CJohnsonO365 - CLEAR YOUR SCHEDULE. Don’t try to get “regular” work done during the conference— you’ll end up missing something important!
  • @g33konaut - Tweet with the conf hashtag to ask if people wanna meet and talk or hangout after the conference, also follow the hashtag tweets to find ppl. Don't sweat missing a talk, meeting people and talking to them is always better than than seeing a talk. Also the talks are often recorded
  • @foxdeploy - Who cares about swag, it's all about connections. Meet the people who've helped you over the years and say thanks.
  • @jfletch - Ask people which after parties they are attending. Great way to find out about smaller/more interesting events and get yourself invited!
  • @marxculture - The Law of Two Feet - if you aren't enjoying a session then leave. Go to at least one thing outside your normal sphere.
  • @joshkodroff - Bring work business cards if you're not looking for a job, personal business cards if you are.
  • @benjimawoo - Go to sessions that cover tehnologies you wouldn't otherwise encounter day to day. Techs you don't use in your day job.

Fantastic stuff. You'll get more out of a conference if you say hello, include the "hallway track" in your planning, stay off your phone and laptop, and check out sessions and tech you don't usually work on.

What are YOUR suggestions? Sound off in the comments.


Sponsor: Did you know VSTS can integrate closely with Octopus Deploy? Watch Damian Brady and Brian A. Randell as they show you how to automate deployments from VSTS to Octopus Deploy, and demo the new VSTS Octopus Deploy dashboard widget. Watch now!



© 2017 Scott Hanselman. All rights reserved.
     

How to Remove the Sidebar in WordPress

Do you want to remove the sidebar from your WordPress site? A sidebar is the widget-ready area in your WordPress theme. It often appears at the right or left side or below the content area on every page. In this article, we will show you… Read More »

The post How to Remove the Sidebar in WordPress appeared first on WPBeginner.

Do you want to remove the sidebar from your WordPress site? A sidebar is the widget-ready area in your WordPress theme. It often appears at the right or left side or below the content area on every page. In this article, we will show you how to easily remove the sidebar in WordPress.

How to Remove the Sidebar in WordPress

Why Remove the Sidebar in WordPress?

Most free and paid WordPress themes come with multiple sidebars or widget ready areas.

The purpose of sidebars in WordPress is to display items that are not part of the post or page content. Usually these are links to different areas of your website, advertisements, email list signup forms, social media profiles, etc. These items can be easily added to the sidebar of a theme using WordPress widgets.

Sidebar on a WordPress powered website

In most WordPress themes, sidebar appears differently when a user is viewing your site from a mobile device. Due to reduced width of the screen size, sidebars that appear on right or left on the desktop are moved to the bottom on mobile screens.

Sidebars are immensely helpful and can help you grow your business. See these WordPress sidebar tricks for maximum results.

However, some website owners feel that removing sidebar helps improve user experience. If you’re looking to remove the sidebar on your WordPress site, then this tutorial is for you.

Removing Sidebars From Everywhere in WordPress

This method allows you to simply remove sidebars from every page and post on your WordPress site. It requires you to edit WordPress theme files. If you haven’t done this before then see our guide on how to copy and paste code in WordPress.

First you need to connect to your WordPress site using an FTP client and then go to /wp-content/themes/your-current-theme/ folder.

WordPress themes are made up of different templates, so you will need to edit all the templates where a sidebar is displayed.

For example, in a typical WordPress theme you may need to edit index.php, page.php, single.php, archive.php, home.php and so on.

Open a template file to edit it and then locate the line that looks like this:

<?php get_sidebar(); ?>

If your theme comes with multiple sidebars, then you will see different instances of this code with a sidebar name inside the function. For example:

<?php get_sidebar('footer-widget-area'); ?>

Delete the line that represents the sidebar that you don’t want to display.

Now, save and upload the file back to your website. Repeat the process for all template files responsible for displaying different pages on your website.

Once finished, you can go to your website and see it in action.

You may notice that while sidebars are gone, your content area is still appearing with the same width leaving the sidebar area empty.

Blank sidebar area in a WordPress theme

That’s because your theme has defined the width for the content area. Now that the sidebar is gone, you need to adjust the width of the content area by adding custom CSS to your theme.

First you will need to figure out the CSS class used by your theme to define the width of the content area. You can do that by using the Inspect tool in your browser.

Here is the sample CSS we used on our demo site using Twenty Sixteen theme.

.content-area {
    width: 100%;
    margin: 0px;
    border: 0px;
    padding: 0px;
}

.content-area .site {
margin:0px;
}

Here is how it looked without sidebars:

Sidebars removed from a WordPress theme

Removing Sidebars From Individual Pages in WordPress

It’s possible that you only want to remove the sidebars on certain pages while displaying them on other sections of your website.

For example, a lot of websites display sidebars on their blog page but not on individual blog posts. Some prefer to show sidebars everywhere except static pages.

Let’s take a look at different scenarios and how to remove sidebars from different areas.

Removing Sidebars from a Static Page in WordPress

Many WordPress themes come with ready-to use full width page templates. These templates can be used with any static page in WordPress and do not display sidebars on either side of the content.

You will just need to edit the page where you want to remove the sidebar and then select the full width template under ‘Page Attributes’ meta box.

Full width page template with no sidebars

If you do not see an option to select a template, then this means that your theme does not come with a full-width page template.

In that case, you will need to create a full-width page template manually. Open a plain text editor like Notepad and paste the following code in a blank file:

<?php
/*
*
Template Name: Full-Width
*/
get_header(); ?>

Now save this file as full-width.php on your desktop.

Connect to your WordPress site using an FTP client and then go to /wp-content/themes/your-current-theme/ folder. Edit the file called page.php and copy every thing that appears after <?php get_header(); ?> line.

Now paste this code in your full-width.php file. After that you need to locate and delete the line that looks like this:

<?php get_sidebar(); ?>

Save your changes and upload the full-width.php file to your current theme folder.

You can now edit any page on your WordPress site and you will be able to select your full width page template.

For more details, see our guide on how to create a full width page template in WordPress.

Remove Sidebar from Blog Posts Page in WordPress

WordPress allows you to use a static front page and a separate page for your blog posts. Usually, most WordPress themes display sidebars on the blog posts page.

If you don’t want to display sidebars on the blog posts page, then you need to go to Settings » Reading page. Notice the name of the page you are using as your blog posts page.

Find your WordPress blog page

Now go to Pages » All Pages and edit the page used to display your blog posts. Under the page attribute section select a full width template and then save your changes.

Full width page template with no sidebars

If you don’t see a full width template option, then you will have to manually create a full width template. See the previous section in this article for detailed instructions.

Remove Sidebar from a Single Post in WordPress

If you want to remove sidebar from certain single posts, then you can create a custom single post template.

WordPress 4.7 came with built-in support for post templates. You’d need to follow the steps outline in our guide on how to create custom single post templates in WordPress.

In your custom single post template all you need to do is make sure to remove the sidebar part of the code.

We hope this article helped you learn how to easily remove the sidebar in WordPress themes. You may also want to see our step by step guide on how to boost WordPress speed and performance.

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 Remove the Sidebar in WordPress appeared first on WPBeginner.

How to Display Author’s Twitter and Facebook on the Profile Page

Do you want to display your author’s Twitter and Facebook links on their WordPress profile page? By default, WordPress user profile page does not have any fields to add Facebook or Twitter profiles. In this article, we will show you how to easily display author’s… Read More »

The post How to Display Author’s Twitter and Facebook on the Profile Page appeared first on WPBeginner.

Do you want to display your author’s Twitter and Facebook links on their WordPress profile page? By default, WordPress user profile page does not have any fields to add Facebook or Twitter profiles. In this article, we will show you how to easily display author’s Twitter and Facebook profile links in WordPress.

How to Add Author's Twitter & Facebook in WordPress Profile Page

1. Add Twitter and Facebook Profiles with Author Bio Box

This method is easier and is recommended for all users.

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

Upon activation, you need to visit the Settings » Author Bio Box page in your WordPress admin to configure plugin settings.

Author bio box

First you need to select where you want to display the author bio box. The plugin can automatically show the author bio box below posts only or below posts and on homepage.

After that you can select background color, text color, gravatar size, border, etc.

Don’t forget to click on the save changes button to store your settings.

Next, you need to go to the Users » All Users page. Here you need to click on the edit link below the user account.

Edit author profile

This will bring you to the user’s profile page. You will notice that there are new social profile fields available on this page.

Now you just need to enter the author’s Facebook, Twitter, or any other social media profile URLs in the respective fields.

Enter your social profile URLs

Once you are done, click on the update profile link.

You can now view any posts written by that user, and you will see their author bio box with icons for their Twitter, Facebook, and other social media profiles.

Author bio box with social profiles

Registered users on your WordPress site can also edit their own profiles to add links for their Facebook and Twitter pages. You can also send an email to all registered users on your website and ask them to update their profiles.

2. Display Twitter and Facebook Profiles with Yoast SEO

This method is for advanced users because it will require you to edit WordPress theme files. If you haven’t done this before, then check out our guide on how to copy and paste code in WordPress.

If you are already using Yoast SEO plugin on your website, then you are in luck as it can be used to add Twitter and Facebook profile fields in author’s profile page.

The problem is that Yoast does not automatically display them in the author bio, but don’t worry we will show you how to do that.

Related: How to properly install and setup Yoast SEO plugin on your website.

Once you have Yoast plugin setup, you need to head over to the Users » All Users page, and then click on the edit link below the author name.

Edit author profile

On the user’s profile page, you will notice new Facebook and Twitter profile fields. For Twitter, you just need to enter the user handle without @ symbol.

For Facebook, you will need to enter the complete Facebook profile URL.

Facebook and Twitter fields in user profile

Once you are done, click on the update profile button to store your changes.

Now you need to display these fields as links in your theme.

You can do this by adding the following code to your theme files where you want to display the author profile links.

<?php 
$twitter = get_the_author_meta( 'twitter', $post->post_author );
$facebook = get_the_author_meta( 'facebook', $post->post_author );
echo '<a href="https://twitter.com/' . $twitter .'" rel="nofollow" target="_blank">Twitter</a> | <a href="'. $facebook .'" rel="nofollow" target="_blank">Facebook</a>';
?> 

Save your changes and view a post on your website.

Here is how it looked on our demo website.

Author social profile links

We hope this article helped you learn how to display author’s Twitter and Facebook profile links in WordPress. You may also want to see our list of how to show an authors list with photos 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 Display Author’s Twitter and Facebook on the Profile Page appeared first on WPBeginner.

BUILD 2017 Conference Rollup for .NET Developers

The BUILD Conference was lovely this last week, as was OSCON. I was fortunate to be at both. You can watch all the interviews and training sessions from BUILD 2017 on Channel 9.

Here’s a few sessions that you might be interested in.

Scott Hunter, Kasey Uhlenhuth, and I had a session on .NET Standard 2.0 and how it fit into a world of .NET Core, .NET (Full) Framework, and Mono/Xamarin.

One of the best demos, IMHO, in this talk, was taking an older .NET 4.x WinForms app, updating it to .NET 4.7 and automatically getting HiDPI support. Then we moved it’s DataSet-driven XML Database layer into a shared class library that targeted .NET Standard. Then we made a new ASP.NET Core 2.0 application that shared that new .NET Standard 2.0 library with the existing WinForms app. It’s a very clear example of the goal of .NET Standard.

.NET Core 2.0 Video

Then, Daniel Roth and I talked about ASP.NET Core 2.0

ASP.NET Core 2.0 Video

Maria Naggaga talked about Support for ASP.NET Core. What’s “LTS?” How do you balance purchased software that’s supported and open source software that’s supported?

Support for ASP.NET and .NET - What's an LTS?

Mads Torgersen and Dustin Campbell teamed up to talk about the Future of C#!

The Future of C#

David Fowler and Damian Edwards introduced ASP.NET Core SignalR!

SignalR for .NET Core

There’s also a TON of great 10-15 min short BUILD videos like:

As for announcements, check these out:

And best of all…All .NET Core 2.0 and .NET Standard 2.0 APIs are now on http://docs.microsoft.com at https://docs.microsoft.com/en-us/dotnet

Enjoy!


Sponsor: Test your application against full-sized database copies. SQL Clone allows you to create database copies in seconds using MB of storage. Create clones instantly and test your application as you develop.


© 2017 Scott Hanselman. All rights reserved.
     

The BUILD Conference was lovely this last week, as was OSCON. I was fortunate to be at both. You can watch all the interviews and training sessions from BUILD 2017 on Channel 9.

Here's a few sessions that you might be interested in.

Scott Hunter, Kasey Uhlenhuth, and I had a session on .NET Standard 2.0 and how it fit into a world of .NET Core, .NET (Full) Framework, and Mono/Xamarin.

One of the best demos, IMHO, in this talk, was taking an older .NET 4.x WinForms app, updating it to .NET 4.7 and automatically getting HiDPI support. Then we moved it's DataSet-driven XML Database layer into a shared class library that targeted .NET Standard. Then we made a new ASP.NET Core 2.0 application that shared that new .NET Standard 2.0 library with the existing WinForms app. It's a very clear example of the goal of .NET Standard.

.NET Core 2.0 Video

Then, Daniel Roth and I talked about ASP.NET Core 2.0

ASP.NET Core 2.0 Video

Maria Naggaga talked about Support for ASP.NET Core. What's "LTS?" How do you balance purchased software that's supported and open source software that's supported?

Support for ASP.NET and .NET - What's an LTS?

Mads Torgersen and Dustin Campbell teamed up to talk about the Future of C#!

The Future of C#

David Fowler and Damian Edwards introduced ASP.NET Core SignalR!

SignalR for .NET Core

There's also a TON of great 10-15 min short BUILD videos like:

As for announcements, check these out:

And best of all...All .NET Core 2.0 and .NET Standard 2.0 APIs are now on http://docs.microsoft.com at https://docs.microsoft.com/en-us/dotnet

Enjoy!


Sponsor: Test your application against full-sized database copies. SQL Clone allows you to create database copies in seconds using MB of storage. Create clones instantly and test your application as you develop.


© 2017 Scott Hanselman. All rights reserved.
     

How to Make a Website in 2017 – Step by Step Guide

Are you looking to make a website? Starting a website can be a terrifying thought specially when you’re not techy. Don’t worry, you’re not alone. Having helped over 130,000+ people make a website with WordPress, we have decided to create the most comprehensive step by… Read More »

The post How to Make a Website in 2017 – Step by Step Guide appeared first on WPBeginner.

Are you looking to make a website? Starting a website can be a terrifying thought specially when you’re not techy. Don’t worry, you’re not alone. Having helped over 130,000+ people make a website with WordPress, we have decided to create the most comprehensive step by step guide on how to a make a website without learning how to code.

How to make a website step by step

This guide is useful for users of all ages and skill levels. However, if you need help, then you can contact our expert team to help you setup your website for free.

→ Click Here to Get Your Free WordPress Website Setup! ←

If you want to do it by yourself, then please continue to follow our step by step guide on how to make a website.

Here is an overview from start to finish of all the steps we’ll walk you through in this guide.

  • How to find and register a domain name for free
  • Choosing the best web hosting
  • How to install WordPress
  • Installing a template to change your site’s design
  • Creating pages in WordPress
  • Customizing WordPress with addons and extensions
  • Resources to learn WordPress and get support
  • Taking it further, building websites with more features

Before we start, let’s cover some of the most commonly asked questions that we get.

What do I need to build a website?

You’ll need the following three things to start your WordPress site.

  • A domain name – this is the name of your website such as google.com
  • WordPress hosting – this is where your website files are stored.
  • 30 mins of your undivided attention.

How much does a WordPress website cost?

The answer to this question really depends on what kind of website you are trying to build. We have written a 2000 word guide explaining how much does it really cost to build a website.

A typical business website can cost as low as $100 per year and can go as high as $30,000 per year.

We recommend all our users to start small and then add more features to your website as your business grows. This way you will save money and minimize potential losses and avoiding overspending.

In this guide, we’ll show you how to build a website for less than $100.

We will also show you how to take it further by adding more features to it in the future.

Which is the best website platform?

There are many website builders available that will help you setup a website. We recommend using self-hosted WordPress as your website platform.

WordPress is the most popular website platform in the world. It powers nearly 28% of all websites on the internet.

WordPress is free and comes with thousands of website designs and extensions. It is extremely flexible and works with almost every third-party tool and service available to website owners.

We use WordPress to build all our websites including this one, WPBeginner.

How to make the most out of this tutorial?

This is a step by step tutorial on how to make a website. We have divided it into different steps, and we’ll walk you through everything from start to finish. Just follow along the instructions, and you’ll have a very professional looking website in the end.

We will also point you in the right direction to take your website to the next level based on your needs.

Have fun creating your website.

Remember, if you need help, you can contact us and we will setup your website for free.

Let’s get started.

Step 1. Setup

One of the most common mistakes that beginners make is choosing the wrong website platform. Thankfully, you are here so you will not be making that mistake.

For most users, a self-hosted WordPress.org site is the perfect solution. It comes with thousands of designs and addons which allow you to create any kind of website you can think of. For more on this topic, please see our guide on why you should use WordPress.

WordPress is free for anyone to download and use to build any kind of website without any restrictions.

If WordPress is free, then where is the cost coming from?

WordPress is free because you’ll have to arrange your own domain name and hosting, which costs money. For more on this topic, see our article why is WordPress free?.

A domain name is your website’s address on the internet. This is what your users will type in their browsers to reach your site (For example, wpbeginner.com or google.com).

Next, you’ll need website hosting. All websites on the internet need hosting. This will be your website’s home on the internet.

A domain name typically costs $14.99/year and hosting costs start from $7.99/month.

This is A LOT for most people who are just starting out.

Thankfully, Bluehost, has agreed to offer our users a free domain name and over 60% off on web hosting.

→ Click here to Claim this Exclusive Bluehost offer ←

Bluehost is one of the largest hosting companies in the world. They are also an official WordPress recommended hosting partner.

They are working with WordPress since 2005, and are committed to give back to the community. That’s why they have promised us that if you cannot set up your website by following this tutorial, then our expert team will complete the process for you without any cost. They will compensate us, so you don’t have to. Feel free to contact us for free website setup help.

Note: At WPBeginner, we believe in transparency. If you purchase hosting using our referral link, then we will get a small commission at no additional cost to you. In fact, you will get discount on hosting + a free domain name. We would get this commission for recommending any WordPress hosting company, but we only recommend products that we personally use and believe will add value to our readers.

Let’s go ahead and purchase domain name and hosting.

First, you’ll need to go to the Bluehost website in a new browser window and click on the green ‘Get Started Now’ button.

Get started with Bluehost

This will bring you to a pricing page where you will need to choose a pricing plan for your website. Basic and plus plans are the most popular choices among our users.

Select your hosting plan

You’ll need to click on select to choose the plan that you like and continue to the next step.

On the next screen, you’ll be asked to select a new domain name.

Select domain name

Ideally you should stick to a .com domain name. Make sure that it is related to your business, easy to pronounce and spell, and easy to remember.

Need help choosing a domain name for your website? See these tips and tools on how to choose the best domain name.

After choosing your domain name, click on the next button to continue.

Now you’ll be asked to provide your account information such as name, address, email, etc.

On this screen, you will also see optional extras that you can purchase. We generally don’t recommend purchasing these extras. You can always add them later on, if you decide that you need them.

Uncheck optional extras

Next, you will add your payment information to finish the purchase.

After completing your purchase, you’ll receive an email with details on how to login to your web hosting control panel (cPanel).

This is your hosting dashboard where you manage everything like getting support, setting up emails, etc. Most importantly, this is where you’ll install WordPress.

Step 2. Install WordPress

You will find tons of icons to do different things on your hosting account dashboard (cPanel). You’ll never need to use 95% of them, so you can safely ignore them.

Scroll down to the website section in cPanel and then click on the WordPress icon.

Install WordPress

You will now see Bluehost Marketplace Quick Install screen for WordPress. Click on the ‘Get Started’ button to continue.

On the next screen, you will be asked to select the domain name where you want to install WordPress. Choose your domain from the dropdown field and then click Next.

Select domain name

Now you’ll need to enter your website name, admin username, and a password for your website. Don’t worry, you can change them later in WordPress settings if you need to.

You’ll also need to check all the checkboxes on the screen and then click on the ‘Install’ button to continue.

WordPress install settings

Quick Install will now start installing WordPress on your website. Meanwhile, it will show you some website templates that you can install on your site.

You don’t need to do that right now because we’ll show you how to find and install free WordPress template on your website later in this guide.

Once the installation is over, you’ll see a success message in the top header.

WordPress install successful

Now you need to click on the ‘Installation Complete’ link, and it will take you to the screen with your WordPress login URL and password.

WordPress login url and credentials

Congratulations! You have created your first WordPress website.

You can now head over to the WordPress login page. Your login URL will look like this:

http://www.yourdomain.com/wp-admin

You can login to your WordPress site using the admin username and password you entered earlier.

WordPress login page

Wasn’t that easy?

Now let’s move on to the next step and choose a design for your website.

Step 3. Select Your Theme

The visual appearance of your WordPress site is controlled by a WordPress theme.

WordPress themes are professionally designed templates that you can install on your website to change its appearance.

By default, each WordPress site comes with a basic theme. If you visit your website, then it will look something like this:

Default WordPress theme

This is not very appealing for most users.

But don’t worry, there are thousands of free and paid WordPress themes that you can install on your site.

You can change your theme from the WordPress admin dashboard. Visit Appearance » Themes page and then click on the ‘Add New’ button.

Change your WordPress theme

On the next screen, you will able to search from 4,492 free WordPress themes that are available in the official WordPress.org themes directory. You can sort them by popular, latest, featured, as well as other feature filters (i.e industry, layout, etc).

Searching for free WordPress themes

Need help choosing a theme? Check out our list of these awesome free WordPress business themes.

You may also want to take a look at our guide on how to select the perfect WordPress theme for your website.

For the sake of this guide, we’ll be using Bento. It is a popular multi-purpose free WordPress theme with flexible design options for all kind of websites.

If you know the name of the free theme you want to install, then you can look for it by entering its name in the search field.

WordPress will show you the theme in search results. You will need to take your mouse over to the theme and then click on the Install button.

Install WordPress theme

Once you have installed your theme, you can customize it by clicking on the Customize link under the Appearance menu.

This will launch the theme customizer where you will be able to change your theme settings with live preview of your website.

Customizing your WordPress theme

You don’t need to finalize all theme settings right away. You will be able to customize it much better once you have some content on your website.

Let’s see how to add content to your WordPress site.

Step 4. Add Content to Your Site

WordPress comes with two default content types called posts and pages. Posts are part of a blog and appear in reverse-chronological order (newer items displayed first).

On the other hand, pages are meant to be static “one-off” type content such as your about page, contact page, privacy policy, etc.

By default, WordPress shows your blog posts on the front page of your website. You can change that, and make WordPress show any page as the front-page of your website (we’ll show you how to do that later in this guide).

You can create a separate page for your blog or news section. In fact, you can create a website without any blog section at all.

Having said that, let’s add some content to your website.

You’ll start by adding a few pages to your WordPress site. Don’t worry if you don’t have enough content for these pages at the moment. You can always edit and update them.

Head over to Pages » Add New page in WordPress admin area. This will bring you to the page editor screen, which looks like this:

Adding a new page

First you need to provide a title for your page, let’s call this page ‘Home’.

After that you can add content in the text editor below. You can add text, links, images, embed videos, audio, etc.

After adding content to your page, you can click on the publish button to make it live on your website.

You can repeat the process by adding more pages for different sections of your website. For example, an about page, contact us, and a blog page to display blog posts.

Now let’s add a few blog posts as well.

Head over to Posts » Add New in your WordPress admin area.

Adding a new post in WordPress

You will see a screen much like you saw earlier when adding pages.

You can add a post title and then add content in the visual post editor. You’ll also notice some extra options like post formats, categories and tags.

You can click on the save button to store your post as a draft or click on the publish button to make it visible on your site.

For more detailed instructions on how to utilize all these options on post and page edit screens, please see our guide on how to add a new post in WordPress.

Step 5. Customizing and Tweaking Your Website

Now that you have created some content on your website, you will be able to customize and put it all in a nice presentable shape on your website.

Let’s start by setting up a static front Page.

Setting up a Static Front Page

You need to visit the Settings » Reading page in your WordPress admin area. Under the ‘Front page displays’ option click on the static front page and then select ‘Pages’ you created earlier for your home and blog pages.

Static front page

Don’t forget to click on the ‘Save Changes’ button at the bottom of the page to store your changes.

WordPress will now use the page titled ‘Home’ as your site’s front page and ‘Blog’ page to display your blog posts.

Change Site Title and Tagline

During the installation you get to choose your site’s title. WordPress automatically adds a tag line to your site title that says ‘Just another WordPress site’.

You can change both your site’s title and tagline at any time by visiting Settings » General page.

Site title and tagline

Your site title will be the name of your website like WPBeginner. The tag line is usually a single line that describes your website. You can also leave the tag line field blank if you want.

Don’t forget to click on the save changes button to store your settings.

Set up Comments Settings

WordPress comes with a built-in comment system allowing your users to leave comments on your posts. This is great for user engagement, but it is targeted by spammers as well.

To deal with this, you’ll need to enable comment moderation on your website.

Visit Settings » Discussions page and scroll down to ‘Before a comment appears’ section. Check the box next to ‘Comment must be manually approved’ option.

Enable comment moderation

Don’t forget to click on the save changes button to store your settings.

Create Navigation Menus

Navigation menus allow your users to browse different pages or sections on your website. WordPress comes with a powerful navigation menu system, and your WordPress theme utilizes this system to display menus.

Navigation menus on a website

Let’s add a navigation menu to your website.

First, you need to visit Appearance » Menus page. Enter a name for your navigation menu and click on the create menu button.

Creating a new menu

WordPress will now create your navigation menu. But it will be empty at the moment.

Next, you need to select the pages you want to display in your menu and then click on add to menu button.

Add pages to WordPress menu

You will notice your selected pages filling the empty area of your navigation menu. You can move them up and down to rearrange their position in the menu.

Select menu location

Now you need to select a display location. These locations are defined by your WordPress theme. Usually, most WordPress themes have a primary menu that appears on top.

Finally, click on the save menu button to store your navigation menu.

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

For more detailed instructions see our beginner’s guide on how to add navigation menu in WordPress.

Step 6. Installing Plugins

WordPress Plugins are like apps for your WordPress site. They allow you to add features to your WordPress site. Think contact form, photo galleries, etc.

There are currently more than 49,000 free plugins available for WordPress. There are also paid plugins sold by third-party websites and developers.

With this many plugins, how do you find which plugins to install? We got you covered there as well, see our guide on how to choose the best WordPress plugin.

Here is our list of essential plugins that you should install on your site right away. All of them are free.

Features

Website Optimization

Security

  • Updraft Plus – Create automatic scheduled backups of your website
  • Sucuri – Website security audit and malware scanner

Need help installing plugins? See our step by step guide on how to install a WordPress plugin.

For more plugin recommendations check out our list of 24 must have WordPress plugins for business websites.

Step 7. Mastering WordPress

WordPress is easy to use yet extremely powerful. From time to time, you may find yourself looking for some quick answers.

The good news is that there is plenty of free WordPress help available. See our guide on how to properly ask for WordPress support and get it.

WPBeginner itself is the largest WordPress resource site on the internet. You will find the following resources on WPBeginner (all of them are completely free).

  • WPBeginner Blog – This is where we publish our WordPress tutorials, how tos, and step by step guides.
  • WPBeginner Videos – These step by step videos will help you learn WordPress FAST.
  • WPBeginner on YouTube – Need more video instructions? Subscribe to our YouTube channel with more than 52,000 subscribers and 7 Million+ views.
  • WPBeginner Dictionary – The best place for beginners to start and familiarize themselves with the WordPress lingo.
  • WPBeginner Blueprint – Check out plugins, tools, and services we use on WPBeginner.
  • WPBeginner Deals – Exclusive discounts on WordPress products and services for WPBeginner users.

Here are few of our guides that you should bookmark right away. It will save you lots of time and money in the future.

Many of our users use Google to find answers on WPBeginner. Simply type keywords for what you are looking for and add wpbeginner.com at the end.

Can’t find an answer? Send your question directly using our contact form and we will try our best to answer.

Step 7. Taking it Further

So far we have shown you how to make a website, add a theme, and install essential plugins.

Want to take it even further?

Using WordPress you can create powerful niche websites capable of doing a lot more.

For more examples, check out our list of 19 types of websites you can create with WordPress

That’s all for now.

We hope this guide helped you learn how to make a website without hiring a developer or overspending money. You may also want to see our list of 19 actionable tips to drive traffic to your new WordPress site.

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 Website in 2017 – Step by Step Guide appeared first on WPBeginner.

Managing dotnet Core 2.0 and dotnet Core 1.x versioned SDKs on the same machine

Tons of great announcements this week at the BUILD conference. I’ll slowly blog my take on some of the cooler features, but for now here’s a rollup of the major blog posts for developers:

You can download and get started with .NET Core 2.0 Preview 1 right now, on Windows, Linux and macOS:

If you already have .NET Core on your machine, you’ll already be able to type “dotnet –version” at the terminal or command line. Go ahead and try it now. Mine says:

C:\Users\scott> dotnet --version
2.0.0-preview1-005977

Remember on Windows you can check out c:\program files\dotnet\sdk and see all the SDK versions you have installed:

Lots of .NET Core versions

Typing dotnet will pick the most recent one…but it’s smarter than that. Remember that you can set the current SDK version with a global.json file. Global.json’s presence will override from the folder its in, all the way down.

If I make a folder on my desktop and put this global.json in it:

{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.3"
}
}

It will force my dotnet runner to use the .NET Core SDK version I asked for. That “projects” line isn’t needed for the versioning, but it’s nice to be able to select what folders have projects inside.

C:\Users\scott\Desktop\test> dir
Directory of C:\Users\scott\Desktop\test
05/11/2017 09:22 PM <DIR> .
05/11/2017 09:22 PM <DIR> ..
05/11/2017 09:23 PM 45 global.json
1 File(s) 45 bytes
2 Dir(s) 85,222,268,928 bytes free

C:\Users\scott\Desktop\test> dotnet --version
1.0.3

At this point – with a valid global.json – making a new project with dotnet new will make an app with a netcoreapp1.x version. If I move elsewhere and dotnet new I’ll get a netcoreapp2.0. In this example, it’s the pretense of that global.json that “pins” my SDK version.

Alternatively, I could keep the dotnet.exe 2.0 SDK and install 1.x templates. This would mean I could create whatever I want AND pass in the version.

First I’ll add the 1.x templates into my 2.0 SDK. This just needs to happen once.

dotnet new -i Microsoft.DotNet.Common.ProjectTemplates.1.x::1.0.0-*

Now, even though I’m “driving” things with a .NET Core 2.0 SDK, I can pass in –framework to control the project that gets created!

C:\Users\scott\Desktop\test> dotnet new console -o oneone --framework netcoreapp1.1
The template "Console Application" was created successfully.

C:\Users\scott\Desktop\test> dotnet new console -o twooh --framework netcoreapp2.0
The template "Console Application" was created successfully.

I can make libraries that target .NET Standard like this, passing in 2.0 or 1.6, or whatever netstandard I need.

C:\Users\scott\Desktop\lib> dotnet new classlib --framework netstandard2.0
The template "Class library" was created successfully.

There’s two options that are not exactly opposites, but they’ll give you different levels of control, depending on your needs.

  • You can control your SDK versioning folder by folder with global.json. That means your project’s directories are “pinned” and know what SDK they want.
    • When you type dotnet new using a pinned SDK, you’ll get the new project results for that pinned SDK. Typing dotnet run will do the right thing.
  • You can pass in –framework for templates that support it and dotnet new will create a template with the right runtime version. Typing dotnet run will do the right thing.

This is .NET Core 2.0 Preview 1, but you should be able to install it side by side with your existing apps and have no issues. If you know these few internal details, you should be able to manage multiple apps with multiple versions without much trouble.


Sponsor: Test your application against full-sized database copies. SQL Clone allows you to create database copies in seconds using MB of storage. Create clones instantly and test your application as you develop.


© 2017 Scott Hanselman. All rights reserved.
     

Tons of great announcements this week at the BUILD conference. I'll slowly blog my take on some of the cooler features, but for now here's a rollup of the major blog posts for developers:

You can download and get started with .NET Core 2.0 Preview 1 right now, on Windows, Linux and macOS:

If you already have .NET Core on your machine, you'll already be able to type "dotnet --version" at the terminal or command line. Go ahead and try it now. Mine says:

C:\Users\scott> dotnet --version

2.0.0-preview1-005977

Remember on Windows you can check out c:\program files\dotnet\sdk and see all the SDK versions you have installed:

Lots of .NET Core versions

Typing dotnet will pick the most recent one...but it's smarter than that. Remember that you can set the current SDK version with a global.json file. Global.json's presence will override from the folder its in, all the way down.

If I make a folder on my desktop and put this global.json in it:

{

"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.3"
}
}

It will force my dotnet runner to use the .NET Core SDK version I asked for. That "projects" line isn't needed for the versioning, but it's nice to be able to select what folders have projects inside.

C:\Users\scott\Desktop\test> dir

Directory of C:\Users\scott\Desktop\test
05/11/2017 09:22 PM <DIR> .
05/11/2017 09:22 PM <DIR> ..
05/11/2017 09:23 PM 45 global.json
1 File(s) 45 bytes
2 Dir(s) 85,222,268,928 bytes free

C:\Users\scott\Desktop\test> dotnet --version
1.0.3

At this point - with a valid global.json - making a new project with dotnet new will make an app with a netcoreapp1.x version. If I move elsewhere and dotnet new I'll get a netcoreapp2.0. In this example, it's the pretense of that global.json that "pins" my SDK version.

Alternatively, I could keep the dotnet.exe 2.0 SDK and install 1.x templates. This would mean I could create whatever I want AND pass in the version.

First I'll add the 1.x templates into my 2.0 SDK. This just needs to happen once.

dotnet new -i Microsoft.DotNet.Common.ProjectTemplates.1.x::1.0.0-*

Now, even though I'm "driving" things with a .NET Core 2.0 SDK, I can pass in --framework to control the project that gets created!

C:\Users\scott\Desktop\test> dotnet new console -o oneone --framework netcoreapp1.1

The template "Console Application" was created successfully.

C:\Users\scott\Desktop\test> dotnet new console -o twooh --framework netcoreapp2.0
The template "Console Application" was created successfully.

I can make libraries that target .NET Standard like this, passing in 2.0 or 1.6, or whatever netstandard I need.

C:\Users\scott\Desktop\lib> dotnet new classlib --framework netstandard2.0

The template "Class library" was created successfully.

There's two options that are not exactly opposites, but they'll give you different levels of control, depending on your needs.

  • You can control your SDK versioning folder by folder with global.json. That means your project's directories are "pinned" and know what SDK they want.
    • When you type dotnet new using a pinned SDK, you'll get the new project results for that pinned SDK. Typing dotnet run will do the right thing.
  • You can pass in --framework for templates that support it and dotnet new will create a template with the right runtime version. Typing dotnet run will do the right thing.

This is .NET Core 2.0 Preview 1, but you should be able to install it side by side with your existing apps and have no issues. If you know these few internal details, you should be able to manage multiple apps with multiple versions without much trouble.


Sponsor: Test your application against full-sized database copies. SQL Clone allows you to create database copies in seconds using MB of storage. Create clones instantly and test your application as you develop.



© 2017 Scott Hanselman. All rights reserved.
     

How to Create Custom Single Post Templates in WordPress

Do you want to create a custom single post template in WordPress? Custom single post templates allow you to easily select different templates for your posts. In this article, we will show you how to easily create custom single post templates in WordPress. Note: This… Read More »

The post How to Create Custom Single Post Templates in WordPress appeared first on WPBeginner.

Do you want to create a custom single post template in WordPress? Custom single post templates allow you to easily select different templates for your posts. In this article, we will show you how to easily create custom single post templates in WordPress.

How to create custom single post template in WordPress

Note: This tutorial requires you to edit WordPress theme files. If you haven’t done this before, then check out our tutorial on how to copy and paste code in WordPress.

When Do You Need a Custom Single Post Template?

Sometimes you may want a different look and feel for certain posts on your website. For example, you may want to use a different template for featured articles or stories in a particular category.

This is where you will need to create a custom single post template in WordPress.

It is very much like creating a custom page template. You would be able to select your template from the post edit screen.

Having said, let’s take a look at how to easily create custom single post templates in WordPress.

Creating Custom Single Post Templates in WordPress

First you need to open a plain text editor on your computer like Notepad and paste the following code inside it:

<?php
/*
 * Template Name: Featured Article
 * Template Post Type: post, page, product
 */
 
 get_header();  ?>

This code defines a new template called Featured Article and makes it available for post, page, and product post types.

You can save this file as wpb-single-post.php on your desktop.

Next, you need to upload it to your current WordPress theme folder using an FTP client.

After that you can login to your WordPress admin area and create or edit a post. Scroll down a little on the post edit screen, and you will notice the new Post Attributes meta box with an option to select the template.

Select your custom single post template

You will see your ‘Featured Article’ custom template listed there.

Right now your template is essentially empty so selecting it will simply display a white screen.

Let’s fix this.

The easiest way to do that is by copying the code from your theme’s single.php file and use it as a starting point.

Open the single.php file and then copy everything after the get_header() line.

Paste this code in your wpb-single-post.php file at the end. Now you can save this file and upload it back to your server.

However, this will look exactly the same as your current single post template. You can now start making changes to your custom single post template.

You can add your own custom CSS classes, remove sidebars, create a full-width template or anything you want.

Create Custom Single Post Templates Based on Category

Want to use custom single post template based on categories? For example, posts in travel category can have a different layout, than posts in photography.

Here is how you can do that.

First you need to add this code to your theme’s functions.php file or a site-specific plugin.

/*
* Define a constant path to our single template folder
*/
define(SINGLE_PATH, TEMPLATEPATH . '/single');

/**
* Filter the single_template with our custom function
*/
add_filter('single_template', 'my_single_template');

/**
* Single template function which will choose our template
*/
function my_single_template($single) {
global $wp_query, $post;

/**
* Checks for single template by category
* Check by category slug and ID
*/
foreach((array)get_the_category() as $cat) :

if(file_exists(SINGLE_PATH . '/single-cat-' . $cat->slug . '.php'))
return SINGLE_PATH . '/single-cat-' . $cat->slug . '.php';

elseif(file_exists(SINGLE_PATH . '/single-cat-' . $cat->term_id . '.php'))
return SINGLE_PATH . '/single-cat-' . $cat->term_id . '.php';

endforeach;
}

This code first checks to see if WordPress is requesting a single post. If it is, then it tells WordPress to look for the template in /single/ folder of your WordPress theme.

Now you need to add template files defined by this code.

Connect to your WordPress site using an FTP client or File Manager in cPanel and go to /wp-content/themes/your-theme-folder/.

Inside your current theme folder, you need to create a new folder called ‘single’.

Now you need to open this folder and create a new file inside it. Go ahead and name this file single-cat-{category-slug}. Replace {category-slug} with your actual category slug.

For example, if you have a category called ‘News’, then you will create single-cat-news.php file. If you have a category called ‘Travel Tips’, then create a template single-cat-travel-tips.php, and so on.

Creating single post template for categories

Now these template files will be totally empty. As a starting point, you can copy the contents of your single.php file from your theme folder and paste them inside each of these templates.

You can now edit these templates to make your desired changes.

Once you are done, you can go to your website and view a post. It will use the template that you have created for the category where this post is filed.

Now let’s suppose you have a post filed in two categories News and Travel Tips. WordPress will automatically show the template for ‘News’ because it appears first in alphabetical order.

On the other hand, if you filed a post in a category and didn’t create a template for that category, then WordPress will fallback to the default single.php template of your theme.

Create Custom Single Post Template for Specific Authors

Let’s suppose you want posts written by a specific author to look different on your website. You can do that by using the same technique we showed for categories.

First you will need to add this code to your theme’s functions.php file or a site-specific plugin.

/**
* Define a constant path to our single template folder
*/
define(SINGLE_PATH, TEMPLATEPATH . '/single');

/**
* Filter the single_template with our custom function
*/
add_filter('single_template', 'my_single_author_template');

/**
* Single template function which will choose our template
*/
function my_single_author_template($single) {
global $wp_query, $post;

/**
* Checks for single template by author
* Check by user nicename and ID
*/
$curauth = get_userdata($wp_query->post->post_author);

if(file_exists(SINGLE_PATH . '/single-author-' . $curauth->user_nicename . '.php'))
return SINGLE_PATH . '/single-author-' . $curauth->user_nicename . '.php';

elseif(file_exists(SINGLE_PATH . '/single-author-' . $curauth->ID . '.php'))
return SINGLE_PATH . '/single-author-' . $curauth->ID . '.php';

}

Next you need to connect to your website using FTP or File Manager in cPanel and then go to /wp-content/themes/your-theme-folder/.

If you haven’t already created a folder called /single/ inside it, then let’s go ahead and create it now.

Inside this folder, you need to create a template using the author’s username in the template name. For example, single-author-johnsmith.php.

This template will be empty, so you can copy paste the contents of your theme’s single.php template and use it as a starting point.

You can now visit your website to view a post created by the specific author. It will now use the template you created.

That’s all for now.

We hope this article helped you learn how to create custom single post templates in WordPress. You may also want to see our list of extremely useful tricks for the WordPress functions.php file.

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 Create Custom Single Post Templates in WordPress appeared first on WPBeginner.

12 Best Practices for Contact Form Page Design (with Examples)

Do you want to improve your contact form page design? A good contact form page design encourage more users to contact you thus boosting your conversions. In this article, we will show you the best practices of good contact form page designs and what makes… Read More »

The post 12 Best Practices for Contact Form Page Design (with Examples) appeared first on WPBeginner.

Do you want to improve your contact form page design? A good contact form page design encourage more users to contact you thus boosting your conversions. In this article, we will show you the best practices of good contact form page designs and what makes them so useful.

Best practices of contact form page design

Why A Good Contact Form Page is so Important?

A contact form page is a must-have for all websites. Whether you are running a personal blog or a business website, a contact form page helps users reach out to you at any time while visiting your website.

Unlike social media, contact form allows users to communicate with you privately which builds confidence and closes sales.

Many website owners often don’t pay much attention to their contact page. Most people just add a contact form, and then forget about it.

If you are not getting enough leads from the contact page on your website, then continue reading because we will show you how to make your contact page optimized for conversions.

How to Create a Contact Form Page in WordPress?

WordPress does not come with a built-in contact form page. You will need a contact form plugin to create a form and then add it to your contact page.

We recommend using WPForms. Our team created it to be the most beginner friendly contact form plugin for WordPress. The free version of WPForms is available on WordPress.org official plugin directory.

For complete step by step instructions, see our guide on how to create contact form in WordPress.

Now that you have created a contact form, let’s take a look at the best practices of contact form page designs that can help you boost your conversions.

1. Make Sure Your Contact Form is Working

Often WordPress hosting providers have poorly configured mail functions which stops your contact form plugin from sending email notifications.

If you are using the pro version of WPForms, then you can still see the form entries inside the WordPress admin area. However, if you are using a free contact form plugin, then you will not even notice that your form is not working.

After adding a contact form to your WordPress site, it’s important to make sure that it is working properly by sending a test submission.

If you are not getting email notifications, then follow the instructions in our guide on how to fix WordPress not sending emails issue.

Make sure email notifications are working

2. Avoid Unnecessary Fields in Contact Form

You can add as many fields to your contact form as you like. However, each additional field you add to your contact form makes it more time consuming for your users to fill them.

That’s why we recommend that keeping your contact form fields to a minimum level and only add fields that truly help you better understand the user’s question.

Now if you must create a longer form, then you need to check out the bonus tip towards the end of this article that will help you reduce form abandonment.

Keep it short and simple

(Source: Neil Patel)

3. Explain Why Users Should Contact You

Your contact form page should be inviting and welcoming to the users. A greeting, followed by a welcome message can make it look more polite and helpful. Let users know what kind of questions you can help them with.

Contact form welcome message

(Source: Michael Hyatt)

If you have different pages for different departments, then point users in the right direction. For example, you can direct existing customers to support or guest bloggers to a write for us form.

Point users in the right direction
(Source: OptinMonster)

4. Provide Alternate Ways to Contact

Adding a form to your contact page is the most convenient way for users to send you a message. However, adding alternate ways to contact can help users decide what works best for them.

You can add an email address, WhatsApp, or phone number as alternate ways to contact.

Add alternate ways to contact
(Source: ZURB)

5. Add Social Media Profiles

While most users want to contact you privately, some may prefer to get in touch on Facebook or Twitter. You can add social media buttons to your contact form page as an alternate way for users to contact you.

Add links to your social media profiles

(Source: Retro Portfolio)

6. Adding Address and Map

Adding an address and location on the map helps boost user confidence in an online business. Even if you don’t have a physical store or office, users find comfort in knowing where you are located .

Add map and location on your contact form page

(Source: LEDbow)

If you have multiple locations in different cities or countries, then adding all of them makes your contact form page much more useful.

Add locations
(Source: The Chase)

7. Adding FAQs and Links to Resources

After a while you will realize that many of your users ask similar questions. You can help them save some time and answer those questions directly on your contact page by adding a FAQs section.

Add FAQs to your contact page
(Source: Smart Passive Income)

8. Optimize Your Form Confirmation Page

Upon form submission, most contact form plugins allow you either show users a confirmation message or to redirect them to a different page.

Redirecting users give you a chance to show them your most helpful resources such as your most popular content or offering a discount code.

Optimize your form confirmation page
(Source: Orbit Media)

9. Ask Users to Join Your Email List

Your users will need to add their email address when filling out the form. You can add a check box to ask them to join your email list as well.

If you are not already building an email list, then see our guide on why it is so important to build an email list.

Email signup
(Source: WPBeginner)

10. Add Photos of Your Team

Adding photos of your team members and staff on the contact page makes it more personable and welcoming. It ensures them that there are real people behind your contact form page who will be answering their questions.

Introduce your team members on contact form page
(Source: Bukwild)

11. Make Your Contact Form Page Engaging

You contact form page doesn’t need to be plain. You can add photos of your office, store or support team to reflect your company’s culture and values.

Add photos to make your contact page more engaging
(Source: Digital Telepathy)

12. Be Creative With Your Contact Page Design

You may have noticed that a lot of contact pages on different websites follow a simple and very predictable layout. While it serves the purpose, you can use it as an opportunity to stand out.

Many premium WordPress themes come with built-in styles for forms. You can customize those styles by adding custom CSS or using a plugin like CSS Hero.

We recommend using a drag and drop page builder plugin to create your contact form page layout. This will allow you the flexibility to be more creative without writing any code.

Contact page templates in Beaver Builder

(Source: Beaver Builder)

Bonus: Reduce Form Abandonment

When you create a multi-page form or a form with a lot of fields, then you risk reducing your conversion rate. Often users get form fatigue and leave before completing the entire form.

To combat form fatigue, many advanced form builders like Wufoo and WPForms comes with form abandonment addons. This helps you capture partial entries from your forms.

Simply put, it helps you get more leads without increasing your traffic.

We hope this article helped you learn the best practices of great contact form page designs. You may also want to see our step by step WordPress SEO guide to improve your rankings.

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 12 Best Practices for Contact Form Page Design (with Examples) appeared first on WPBeginner.