• Resolved loauc

    (@loauc)


    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)
  • I am not sure what are you asking… but you can use any WP function (aka 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

    (@loauc)

    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.

    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 + some searches for tutorials

    Thread Starter loauc

    (@loauc)

    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.