WordPress.org

Ready to get started?Download WordPress

Forums

Can Pllug-in work on a partial static page? (6 posts)

  1. devils_advocate
    Member
    Posted 8 years ago #

    Let me rephrase that.

    I'm building a site that is 50% "non-Wordpress" and 50% WordPress.

    With Moshu's help and website I built a page using "The Loop" to show current News and annoucements surrounded by other (general) non-Wordpress odds and ends.
    So this got me thinkking if I could implement some of the other cool stuff that WordPress is all about....things like "Plugins".

    So far just plugging in a few (the way I can in a template) has produced nothing that works...

    Suggestions?

  2. moshu
    Member
    Posted 8 years ago #

    You can use any WP functions (including plugins) on files not created by/with WP - if you make those files "WP-aware".
    In the tutorial you used you have the info how to do it. It can be applied to other .php files, too! Just watch to have to correct path to the wp-blog-header.php :)

  3. devils_advocate
    Member
    Posted 8 years ago #

    "Just watch to have to correct path to the wp-blog-header.php"

    I don't understand - but I'll take another look.

    thanks.

  4. moshu
    Member
    Posted 8 years ago #

    "WP-aware", as you might remember, means putting this at the top of those file, before everything:
    <?php
    require('./path-to-your-blog/wp-blog-header.php');
    ?>

    Well, I don't know where exactly those non-WP files are in your website, and all I meant was to make sure the "path" is correct from those files to the wp-blog-header.php file!

  5. devils_advocate
    Member
    Posted 8 years ago #

    Moshu -

    Excellent!

    Most excellent....

    =0)

    Now...off subject a bit...how do I get posts to a specific category to show (and post) to a specific page?

  6. moshu
    Member
    Posted 8 years ago #

    to a specific page?
    If you forget about Pages (as in Write Page) than it can be done.
    1. Use a customized Loop to exclude a category from showing up on the main page
    http://codex.wordpress.org/The_Loop
    http://codex.wordpress.org/Template_Tags/query_posts

    2. See http://codex.wordpress.org/Category_Templates

Topic Closed

This topic has been closed to new replies.

About this Topic