www.webdeveloper.com
Results 1 to 2 of 2

Thread: add external pages into wp site that can be accessed only admin by login??

  1. #1
    Join Date
    Jan 2014
    Location
    Pakistan
    Posts
    45

    add external pages into wp site that can be accessed only admin by login??

    i have a site with 2 databases one is for WP and 2nd is for student portal...i want to add external pages of 2nd database in WP so that only be accessed by admin by login into WP....is it possible?? if yes them please tell me how i can do this...

    please reply me ASAP...
    Last edited by tanvirzafar; 02-27-2014 at 04:25 AM.

  2. #2
    Join Date
    Feb 2014
    Location
    England
    Posts
    52
    You can setup a category for say Private posts and then setup a post template based on that category.

    Inside the page template just use this around the content.

    Code:
    <?php if (current_user_can( 'manage_options' )) {
        // Do the content stuff
     } else {
        echo "Please login.";
     ?>
    Good luck!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles