New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Restricting access to specific WordPress pages

From: Dreamweaver and WordPress: Core Concepts

Video: Restricting access to specific WordPress pages

While WordPress is great for communicating across the Internet, all pages within your site don't have to be accessible to everyone. With the help of a plug-in, you can determine who sees what Pages, Posts, and even what Content within a Post. I'm going to go in and install a new plug-in by switching to the Plugins category and choosing Add New, and we're going to search for a plug-in called restrict content. Then one I'm looking for is right up the top of the page, and it's by a gentleman named Pippin Williamson.

Restricting access to specific WordPress pages

While WordPress is great for communicating across the Internet, all pages within your site don't have to be accessible to everyone. With the help of a plug-in, you can determine who sees what Pages, Posts, and even what Content within a Post. I'm going to go in and install a new plug-in by switching to the Plugins category and choosing Add New, and we're going to search for a plug-in called restrict content. Then one I'm looking for is right up the top of the page, and it's by a gentleman named Pippin Williamson.

As you can see, he also has a number of other versions that have specific purposes as well as a Pro version of the general Restrict Content plug-in. But this one is free, and we can take a look at the Details if you like. I always recommend that you check out the details before you install a plug-in, because it will have ratings as well as specific information of when it was updated and whether there have been any problems encountered with compatibility of most recent WordPress versions, so this was very recently updated, just 6 days ago. We're ready to go ahead and click Install Now.

Once it's installed, I can activate the plug-in. If you're interested more details about this particular plug-in, I recommend you go to his website, pippinsplug-ins.com, where you can find information about a variety of free plug-ins, as well as his commercial ones. To show you how this plug-in works, let's add a new post. I'm going to call this Private Showing and add just a little bit of content. Of course, you could put in more details later, but the point is that we have a new post here, and if I scroll down--I'll click Exhibits just so it shows up there--you'll see a new widget category called Restrict this content, and that was added by the plug-in.

Here we can set the User Level, which right now it's set to None which means everybody can see it, but if I expand the list, here you see my standard WordPress user roles, and let's say that I want to restrict it to just Administrators, and I also want to hide it from the RSS feed which is a good point, because you don't want to broadcast this generally to everyone. So now I'll scroll up a little bit, click Publish, and I can view the post, which I do of course see because I'm logged in as the Administrator.

So I'm just going to copy this link very quickly, head back to the Dashboard, now I'm going to Log Out. Now once I've logged out, let me put that link back in and go back to that same page and here you'll see the title of the post but no content. Okay, that's pretty good, it gives us a simple way of restricting the content of a post, but we can actually do a little bit better here. So I'm going to go back, actually log back in, and let's go to our Posts and do an Edit.

Now I'm going to add a second line, "Please join us for a private reception at 8pm." Now to make sure that only certain people see this, I'm going to enter in the short code that's part of this plug-in. Short codes are maintained within a square bracket, so I'm going to put my opening short code in front. So it's a square bracket and then keyword restrict, and I also want to set a User Level, so I'm going to enter in userlevel, all one word = and then whatever role that I want to restrict it to, then we want to add in the name of the user level, in this case administrator is actually shortened to admin, so I'll type that in and enter it in another quote.

And then we want to put in the closing restrict also in square brackets and like HTML tags it uses a forward slash to indicate that it's the end of the tag, and then the keyword restrict, okay. So let's click Update and check out our post, I'll click refresh to bring everything in, and here you see both lines of the Private Showing post. Now let me go ahead and Log Out, and then I'll hit the back button and refresh one more time, and now because I'm not a logged in Administrator, I don't see that bit of content.

But I found that this is a pretty effective way of handling access to your various web pages and their particular content, and it really adds to the flexibility of your WordPress site.

Show transcript

This video is part of

Image for Dreamweaver and WordPress: Core Concepts
Dreamweaver and WordPress: Core Concepts

55 video lessons · 50807 viewers

Joseph Lowery
Author

 
Expand all | Collapse all
  1. 4m 7s
    1. Welcome
      58s
    2. Using the exercise files
      1m 54s
    3. A word about updates
      1m 15s
  2. 15m 28s
    1. Overview
      1m 51s
    2. Creating the database and the initial site
      3m 45s
    3. Configuring WordPress
      5m 54s
    4. Establishing a Dreamweaver site
      3m 58s
  3. 20m 18s
    1. Accessing dynamically related files
      4m 12s
    2. Filtering files
      4m 20s
    3. Following links
      4m 15s
    4. Employing Live Code
      2m 54s
    5. Enabling site-specific code hinting
      4m 37s
  4. 21m 8s
    1. Adding blog posts
      4m 55s
    2. Editing blog posts
      3m 20s
    3. Adding new pages
      2m 59s
    4. Including images
      6m 59s
    5. Adding videos to posts
      2m 55s
  5. 18m 12s
    1. Understanding WordPress structure
      3m 52s
    2. Activating a theme
      7m 21s
    3. Setting up a child theme
      6m 59s
  6. 1h 29m
    1. Updating the page structure and the background
      12m 53s
    2. Working with web fonts
      4m 3s
    3. Styling a header
      11m 48s
    4. Adding header functions
      7m 40s
    5. Setting up content columns
      10m 9s
    6. Changing the main content
      5m 17s
    7. Managing the content code
      4m 48s
    8. Customizing the sidebar
      10m 32s
    9. Styling search
      7m 8s
    10. Working with search text
      5m 49s
    11. Integrating the footer
      9m 40s
  7. 27m 18s
    1. Setting up media queries
      6m 12s
    2. Customizing for tablets
      12m 19s
    3. Building smartphone layouts
      8m 47s
  8. 23m 28s
    1. Working with categories and posts
      5m 31s
    2. Developing category-driven pages
      11m 22s
    3. Changing headers by category
      6m 35s
  9. 36m 32s
    1. Adding Spry accordion panels
      17m 44s
    2. Working with Spry form validation
      11m 56s
    3. Integrating jQuery functionality
      6m 52s
  10. 11m 7s
    1. Understanding WordPress plugins
      6m 20s
    2. Styling plugin output
      4m 47s
  11. 25m 44s
    1. Customizing the Dashboard
      6m 52s
    2. Working with WordPress functions
      8m 7s
    3. Including administration interactivity
      10m 45s
  12. 13m 10s
    1. Setting up the data in WordPress
      2m 17s
    2. Adding dynamic data from WordPress to your web pages
      10m 53s
  13. 11m 38s
    1. Modifying general settings
      4m 12s
    2. Setting up users
      3m 11s
    3. Restricting access to specific WordPress pages
      4m 15s
  14. 26m 38s
    1. Exporting and importing WordPress files
      7m 9s
    2. Backing up and restoring the database
      8m 10s
    3. Transferring files
      6m 3s
    4. Testing and fine-tuning
      5m 16s
  15. 18s
    1. Next steps
      18s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.