WordPress.org

Ready to get started?Download WordPress

Forums

[1.5] How to add the sidebar to static pages? (25 posts)

  1. desk003
    Member
    Posted 9 years ago #

    Tell me. How can I have my sidebar be on non-wp pages?

    as in:
    http://desk003.com/index.php
    has the sidebar correctly.
    http://desk003.com/cams.php
    does not. How can i get it to work as well?
    http://desk003.com/wp-content/themes/v6/cams.php doesnt work either.

  2. Kafkaesqui

    Posted 9 years ago #

    You sound desperate... Does cams.php have what's mentioned here:

    http://wordpress.org/support/topic.php?id=24396#post-137615

  3. desk003
    Member
    Posted 9 years ago #

    lol I am. No it doesnt, but with WP 1.5 i thought they got rid of it. i'll add it....

  4. desk003
    Member
    Posted 9 years ago #

    didnt fix it.

  5. desk003
    Member
    Posted 9 years ago #

    and yeah i put the file both in the site index folder and in the theme folder, neither worked.

  6. desk003
    Member
    Posted 9 years ago #

    now for some reason my index.php is blank....

  7. desk003
    Member
    Posted 9 years ago #

    whoops. I overwrote the wp-blog-header.php file in root dir. there. fixed. however the other still doesnt work.

  8. Kafkaesqui

    Posted 9 years ago #

    Try resetting your theme for this latest problem.

    As for the first, is cams.php making a call to another database, or at least to a non-WordPress MySQL process? If so, this could be the issue (as in one is causing a conflict with the other).

  9. desk003
    Member
    Posted 9 years ago #

    nope its not, no database calls other than for wordpress

  10. desk003
    Member
    Posted 9 years ago #

    http://pastebin.com/244398

    theres the cams.php file.

  11. Kafkaesqui

    Posted 9 years ago #

    Ding ding ding!

    <?php include 'http://desk003.com/wp-content/themes/v6/nav.php' ?>

    The PHP include() function does not take URLs for a path. It's got to be a directory path on the server. Try this:

    <?php include(ABSPATH . 'wp-content/themes/default/v6/nav.php') ?>

  12. desk003
    Member
    Posted 9 years ago #

    really? i've used url paths all the time! it works, but isnt supposta eh? hmm.. okay... didnt work.

  13. desk003
    Member
    Posted 9 years ago #

    oh wait.. hrmmm.. now its worse LOL

    edit: and [Moderated] my post title got changed LOL

    [Moderator comments: Yes, some post titles get changed so that it is easier in the future for people to find relevant posts that may help them solve a problem.]

  14. Kafkaesqui

    Posted 9 years ago #

    Ok, I overstated; it's not a recommended method. But I can't explain what's missing from your template that keeps the WP function from working.

  15. Kafkaesqui

    Posted 9 years ago #

    "oh wait.. hrmmm.. now its worse LOL"

    If you left my version in, that's the ABSPATH constant, which if WordPress is not loading, would fail to call up the proper path to your WordPress installation.

  16. desk003
    Member
    Posted 9 years ago #

    okay i fixed the includes, there was a /default/ that shouldnt have been there.

    ABSPATH is though.

  17. desk003
    Member
    Posted 9 years ago #

  18. NuclearMoose
    Member
    Posted 9 years ago #

    Well, when visiting the cams.php page, I see this:
    .../public_html/wp-content/themes/v6/sidebar.php and it makes me wonder something...shouldn't there be a folder between /public_html/ and wp-content/?

  19. desk003
    Member
    Posted 9 years ago #

    nope. wordpress is installed in /public_html/.

  20. NuclearMoose
    Member
    Posted 9 years ago #

    Hmm...okay...I'm stumped. Have you checked your site URL and blog URL values in the database to ensure they are correct?

  21. desk003
    Member
    Posted 9 years ago #

    they are, both http://desk003.com

    hmm. I stumped a Dev!

  22. desk003
    Member
    Posted 9 years ago #

    just thought i'd point it out: it doesnt work if i copy the page to the v6 theme folder either.

    http://desk003.com/wp-content/themes/v6/cams.php

  23. desk003
    Member
    Posted 9 years ago #

    it DOES work if I use Pages, but I don't wanna, because I want to use Dreamweaver and have copies on my hdd, etc.
    /am an ass

  24. desk003
    Member
    Posted 9 years ago #

    OMG i fixed it.

  25. desk003
    Member
    Posted 9 years ago #

    now to figure out how i did.

    okay. for some strange reason unknown to me i had

    <?php include 'http://desk003.com/wp-content/
    themes/v6/sidebar.php'?>

    instead of
    <?php include(ABSPATH . 'wp-content/themes/v6/sidebar.php') ?>

    So YAY! Thanks for all your help, I couldn't have figured it out without you guys!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.