• I read with great interest the article from Moshu you can read: http://www.transycan.net/blogtest/2005/07/05/integrate/1/

    This is the proof that a specific documentation is necessary on wordpress website for people like with an existing design trying to integrate WordPress.

    1- In the tutorial the call on the wp-blog-header.php is incorrect from experience. It should be:

    <?php
    define(‘WP_USE_THEMES’, true);
    require(‘./blog/wp-blog-header.php’);
    ?>

    and not only:

    <?php
    require(‘./blog/wp-blog-header.php’);
    ?>

    2- It doesn’t work for me. At least not completely. I can only see my posts: http://www.fireworkszone.com
    But the footer disappeared and I cannot add the sidebar items: calendar, categories, etc in my left or right existing sidebars (belonging to the 3-column layout design already in place).

    I tried both: wordpress in the root directory and in a blog folder with the same results.

    3- Whooami let me know that my Server API is not Apache but CGI/ProXad. This is maybe what is the cause of the problem.

    Thanks for your help because I am bit desperate.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Integration with an existing site is really something that should only be attempted by experts. You not only need to know exactly how the existing site works, but also how WordPress works. Any tutorial is going to have to be vague, at best, because it cannot possibly tell you how your site already works.

    Moshu’s tutorial is good and helpful, but mainly it’s telling you how WordPress works, at the most basic level.

    And the tutorial is correct, you DON’T want to use themes. That’s the whole point of the tutorial, you’re integrating it into your existing site. If you turn on the use themes, then you’re not really integrating anything, it’s using the WordPress themes. The tutorial is telling you how you can use WordPress without themes, in order to make it go into your site instead of doing the theme.

    Thread Starter fireworkszone

    (@fireworkszone)

    Hi Otto42,

    That’s interesting and sounds logic.

    The tutorial is telling you how you can use WordPress without themes, in order to make it go into your site instead of doing the theme.

    Good,if you are not using themes you should therefore use this code:

    <?php
    require(‘./blog/wp-blog-header.php’);
    ?>

    I tested with the above code and I can’t see my posts anymore!

    Do I have to uncheck the use of themes in the administration panel or else ?

    If you are not using themes where do the posts come from?

    I am really really confused

    The posts are NOT stored in your themes – they are always in the MySQL database.

    [and Otto’s first sentence is very valid!]

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Moshu’s tutorial basically tells you how to include the base WordPress code, and then how to make a “Loop”. The_Loop (capital-L) is what actually displays your posts. All themes include a Loop, but this tutorial tells you how to insert a Loop into your own site, to display the posts.

    Until you insert a Loop, you won’t see any posts. That’s what The Loop does.

    Thread Starter fireworkszone

    (@fireworkszone)

    I tried this code on my index page in the root directory:

    <?php
    require(‘./wp-blog-header.php’);
    ?>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class=”post” id=”post-<?php the_ID(); ?>”>

    <div class=”storytitle”>
    <h3><?php get_cat_icon(); ?> ” rel=”bookmark”><?php the_title(); ?></h3>
    </div>

    <div class=”storycontent”>
    <?php the_content(__(‘(more…)’)); ?>
    </div>

    <div class=”meta”>
    <img src=”../pictures/icons/icon_clock.gif” alt=”clock” height=”16″ width=”16″/>

    <?php the_date(”,”,”); ?> <?php the_time() ?> <img src=”../pictures/icons/icon_user.gif” alt=”Your Comments” height=”16″ width=”16″/> posted by <?php the_author() ?> <img src=”http://www.fireworkszone.com/pictures/icons/comment_blue.gif&#8221; height=”16″ width=”16″/>

    <?php comments_popup_link(__(‘Comments (0)’), __(‘Comments (1)’), __(‘Comments (%)’)); ?>— <?php _e(“Filed under:”); ?> <?php the_category(‘,’) ?> </div>

    <div class=”feedback”>

    <?php wp_link_pages(); ?>

    </div>

    </div>

    <?php comments_template(); ?>

    <?php endwhile; else: ?>
    <?php _e(‘Sorry, no posts matched your criteria.’); ?>
    <?php endif; ?>

    <?php posts_nav_link(‘ — ‘, __(‘« Previous Page’), __(‘Next Page »’)); ?>

    And it works! See http://www.fireworkszone.com

    To integrate the calendar I added to my left sidebar this code:

    <?php
    require(‘./wp-blog-header.php’);
    ?>

    <?php get_calendar(); ?>

    And it works for the rest of other items: categories, search form, etc.

    However, I am now facing a new problem: the navigation inside the site is no longer working. I used to call different pages with a root.php file with switches inside:

    <?php
    include_once( $sources.”objet/RequeteObjet.php” );
    include_once( $sources.”objet/ComptageObjet.php” );

    switch ($root) {
    case”1″:
    include(“tuts_en.php”);
    break;
    case”2″:
    include( $sources.”incAffichageTutorial.php” );
    break;

    default:
    include(“central.php”);
    }
    ?>

    It is the central.php file which contains the code to call on wp (see at the top).

    For example: http://www.fireworkszone.com/?root=5&idLogiciel=4&extension=1 is no longer working

    Could you please help me fix this problem because I am now without navigation

    Thanks

    Thread Starter fireworkszone

    (@fireworkszone)

    1- With the method I described above (read top of the page), my posts are displayed correctly inside my existing design

    2- BUT as soon as I include this code (see below) to integrate the calendar for example in one of the two existing sidebars (right and left) my navigation system with the root.php won’t work

    <?php
    require(‘./wp-blog-header.php’);
    ?>

    <?php get_calendar(); ?>

    Could someone help me integrate the calendar, categories, meta, search, etc in my sidebars without affecting the navigation system

    I have never been so close as to integrate WP in my existing site

    Thread Starter fireworkszone

    (@fireworkszone)

    Any help please. I keep on struggling to integrate wp in my website.

    To display the calendar I also tried

    <?php
    include(‘./wp-config.php’);
    ?>
    <?php get_calendar(); ?>

    With the same result: the calendar is displayed correctly but the site navigation is down

    You can contact me: fireworkszone@free.fr

    Thanks

    Thread Starter fireworkszone

    (@fireworkszone)

    Any help would be appreciated

    I used this successfully:

    <?php
    define(‘WP_USE_THEMES’, false);
    require(‘./blog/wp-blog-header.php’);
    ?>

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Integrating WP in an existing site’ is closed to new replies.