• suntower

    (@suntower)


    Hi,

    I’ve got an existing web site https://www.jchmusic.com and I’d like to stylistically incorporate my blog into the look and feel of the existing site. I am fairly new to PHP so I have some questions. I hope this is the right spot to do so.

    My plan is to have the blog live in the main ‘container of the site with the site’s main sidebar menu at left and a custom header at top.

    1. The blog ‘lives’ in a wordpress folder under the main site. I use SSI’s to include the menu and an appropriate header on each page. I know I can’t use #includes with PHP so how do I ‘include’ the menu—and not break all the links that are in that shtml code snippet?

    2. And again, how do I ‘include’ the main site’s ‘header shtml so that the graphics -it- refers to are properly referenced while the blog is active?

    TIA,

    —JC

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter suntower

    (@suntower)

    I just wanted to show where I had -tried- to get this to work inside HEADER.PHP

    <body>
    <div id=”container”>
    <?php if($_SERVER[‘HTTP_REFERER’] == “https://jchmusic.com/&#8221;)
    {
    //this throws an error no matter what permutations I tried.
    virtual (“https://jchmusic.com/sidemenu.shtml&#8221;);
    virtual (“https://jchmusic.com/top.shtml&#8221;);
    }
    else{
    echo “<div id=’header’ class=’clearboth’>”;
    echo “<table><tr><td width=’50%’>”;

    jrav001

    (@jrav001)

    In php you would…
    <?php include ‘https://jchmusic.com/sidemenu.shtml&#8217;; ?>

    However, WordPress theming is so flexible you can easily make it reproduce your existing site. Watch this screencast:
    https://css-tricks.com/video-screencasts/73-wordpress-theme/
    If you are already familiar with html and css, you won’t have any trouble making your blog look exactly like your existing site.

    Thread Starter suntower

    (@suntower)

    …and here is an example of the error if I try to use require_once()

    Warning: require_once() [function.require-once]: URL file-access is disabled in the server configuration in /home/suntower/www/www/wordpress/wp-content/themes/stripped-mc/header.php on line 38

    Warning: require_once(https://www.suntowermusic.com/sidemenu.shtml) [function.require-once]: failed to open stream: no suitable wrapper could be found in /home/suntower/www/www/wordpress/wp-content/themes/stripped-mc/header.php on line 38

    Help?

    Thread Starter suntower

    (@suntower)

    OK the problem was that my isp had not enabled php includes. That’s sorted. But I’m still at a loss.

    What I want to know is how to integrate the -directories- of my main site into the wordpress posts. IOW: my blog is in a /wordpress directory beneath the main www site.

    Now… if I ‘include’ the menu code into the blog, then the hrefs are invalid because the blog ‘lives’ in the wordpress directory. So… how does one set the ‘path’ (to borrow from OS programming) so that when I click on a menu item, I move to the main site for all hrefs but then I properly go back to the /wordpress folder when the link goes to a blog post?

    Does any of that make sense?

    TIA,

    —JC

    Thread Starter suntower

    (@suntower)

    …I want to add that what I’m trying to do is be able to refer to images and hrefs from the main site while still in the wordpress blog pages. Is there a way to ‘add a path’ to the blog so that I don’t have to recode every href or src with an explicit path?

    TIA,

    —JC

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘incorporating theme into existing web site’ is closed to new replies.