Title: Posts outside wp directory
Last modified: August 18, 2016

---

# Posts outside wp directory

 *  Resolved [loauc](https://wordpress.org/support/users/loauc/)
 * (@loauc)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/posts-outside-wp-directory/)
 * I’d already put a loop outside the wordpress directory (/blog in this case) and
   it works. Now I’m trying to have a categories sidebar and be able to see the 
   posts in a category without entering the directory where wordpress is installed.
 * The reason? I don’t want to have to maintain a theme inside wp and keep synced
   files outside wp.
 * How could I do this?
 * Felixe.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/posts-outside-wp-directory/#post-638468)
 * I am not sure what are you asking… but you can use any WP function (aka [Template_Tags](http://codex.wordpress.org/Template_Tags))
   outside of WP on a .PHP file… provided you put this on the top of that file (
   before anything else)
 *     ```
       <?php
       require('./path-to-your-blog/wp-blog-header.php');
       ?>
       ```
   
 *  Thread Starter [loauc](https://wordpress.org/support/users/loauc/)
 * (@loauc)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/posts-outside-wp-directory/#post-638494)
 * Thanks moshu.
 * I had already done that and that’s how I got my Loop working. But how do I get
   my loop to display posts when a user clicks on a link on the sidebar that’s pointing
   to something like:
 * mydomain.com/blog/?cat=7
 * I get sent to the default theme inside /blog and I need to keep a consistent 
   look with the other sections of my site.
 * Felixe.
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/posts-outside-wp-directory/#post-638506)
 * Well, that will never happen.
    If you leave links on your main (non-WP) site 
   to blog things… your only way is to create a WP theme that looks exactly like
   your existing design: visitors won’t even notice they are now in a different 
   subfolder. I did that zillion times, if you have the basic html/css skills it
   is not that difficult. [Theme_Development](http://codex.wordpress.org/Theme_Development)
   + some searches for tutorials
 *  Thread Starter [loauc](https://wordpress.org/support/users/loauc/)
 * (@loauc)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/posts-outside-wp-directory/#post-638535)
 * Did that and now it’s working wonders.
 * Thanks again.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Posts outside wp directory’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [loauc](https://wordpress.org/support/users/loauc/)
 * Last activity: [18 years, 8 months ago](https://wordpress.org/support/topic/posts-outside-wp-directory/#post-638535)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
