• Hi Team,
    I have created a local static website (say xyz.com). Here I am planning to add links (manually) that can divert users to the blogs. For blogs, I want to use wordpress website. So, I am trying to change my wordpress look similar to my static website. I am currently stuck with sidebar. Here is my requirement:
    I want to have the sidebar of my static website (as it will contain add and other stuffs) available on wordpress sidebar (no wordpress sidebar needed). Can you please let me know the best possible way to achieve this?
    I am rookie to wordpress so, i would appreciate a clear code/ answer.

Viewing 7 replies - 1 through 7 (of 7 total)
  • How are you creating the sidebar for your main website?

    If you are creating it as a separate file, and then including it via PHP into your main site, then you could easily include it in a WordPress widget area, or via a custom theme.

    Thread Starter raj137

    (@raj137)

    Hi,
    Thanks for your reply!
    I had initially created the static pages in HTML with two column approach. Then I changed it (by changing extension to .php) to the PHP files. Later, I made one file called rightnavigation.php that I am calling to all static pages.

    Currently, I am looking at replacing this rightnavigation.php by the sidebar of wprdpress website. This will help me use standard widgets and keep advertisements at one place (across both non-WP website and WP website).
    Hope this is detailed enough. Please let me know if you need more info.

    Thanks!

    You could do that if your theme creates the sidebar as a separate file. Then you could just use it in a standard include function.

    Thread Starter raj137

    (@raj137)

    You mean WP theme?
    Yes, my WP theme has a separate file sidebar.php. However, when I call the link htttp://localhost.com/blog/sidebar.php I am able to see whole web page.
    I tried to add the sidebar using command
    <?php
    include(‘htttp://localhost.com/blog/sidebar.php’);
    ?>
    If you can share your mail-ID, I can send you the files.
    [moderator note: please keep the topic within the forum; you can share files via pastebin – http://codex.ww.wp.xz.cn/Forum_Welcome#Posting_Code ]

    Any change (either replacing WP sidebar or replacing static website sidebar) is okay for me. Whatever, you think is easier.

    Thanks in advance!

    Thread Starter raj137

    (@raj137)

    Thanks for the links.
    I guess being a rookie in this area, it is a bit difficult for me to implement it. For the first link you gave, I used it as follows:
    <?php
    $response= wp_remote_get(‘http://localhost.com/rightnav.php&#8217;);
    ?>
    I can see sometimes the data appears (though not in good format) and sometimes not. I guess I need to increase some sizes in CSS stylesheet. Any suggestion on this?

    Thread Starter raj137

    (@raj137)

    And for widget, I am not able to understand how I can use it.

    As I said before, I do not mind even going otherway i.e. putting WP sidebar on non-WP site. If that is an easier option.

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

The topic ‘Adding external website sidebar to wordpress sidebar area’ is closed to new replies.