• Hi,

    I am using a custom theme and followed the advice in the pages codex to sort of embed the header and footer for my property search which comes from an external site.

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

    <?php get_header(); ?>

    The function is basically working but there seems to be a conflict that I cannot resolve. If you take a look at http://www.mlsfinder.com/ma_mlspin/myrealtorjake/ you will see that in firefox the search tools are pulled far over to the right and in IE they are centered as they should be but the map function is not performing as it should. Can anyone shed any light on this?

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

    (@otto42)

    WordPress.org Admin

    You should not be editing the root index.php file, you should only edit the files in your theme directory.

    Put the root index.php back to the way it was. Modify the theme instead.

    Thread Starter myrealtorjake

    (@myrealtorjake)

    Hi,

    I haven’t edited the index.php and I have no control whatsoever over the invalid markups on the external site (the 1523 errors etc).

    Anyone else have any thoughts?

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Err. The code you posted shows the root index.php file. So, if that’s the file, then yes, you edited it.

    And if you can’t fix the errors on the site, then you can’t fix the site at all, can you?

    @myrealtorjake
    — Moment of confusion when you had topic of “embedding” external site, which meant to me as-is but into WP. Checking back, instead of embedding external site into WP, you embedded the WP header and footer into the external site. The following is a possible solution only to EMBEDDING EXTERNAL SITE INTO WORDPRESS:
    — To embed external site into WP, you don’t need to edit the index.php at the
    a) root, http://myrealtorjake.com/index.php as Otto mentioned above because that code you posted is for such page
    b) NOR in your theme index.php, http://myrealtorjake.com/wp-content/themes/myrealtorjake/index.php
    — You can embed the external site via iframe by creating a custom page template which you upload to your theme folder and publish in Write Page by choosing from dropdown. Page Template could be as simple like this:

    <?php
    /*
    Template Name: MLSFinder
    */
    ?>
    <?php get_header(); ?>
    <div id="iframemls">
    <iframe src="http://www.mlsfinder.com/ma_mlspin/myrealtorjake/" frameborder="0" width="100%" height="1000">MLS Finder</iframe>
    </div>
    <?php get_footer(); ?>

    and style accordingly in your theme’s style.css

    Thread Starter myrealtorjake

    (@myrealtorjake)

    Hi Mercime and Otto,

    Thanks for your responses. I guess I should have tried to clarify a bit better and give more background. Before migrating over to WordPress I was able to easily embed my websites header and footer into the external site. I was using html and tables then and was able to accomplish this by following the specifications given to me by this external search provider. Enter WordPress…I did have an iframe for the search in my site in initially but then when a visitor clicks on an mls finder link outside of the website (like via daily property emails, or when I post links to specific town searches in newsletters etc) there is no header/footer and the info is just floating in space and has no branding or way to get back to the rest of the website. Does that make sense? So I didn’t really change anything on my index.php file, I just created two new files (http://myrealtorjake.com/idxheader.php and idxfooter.php) and had the mlsfinder folks use them as includes as that is the only option they give me. I am thinking at this point that I might need to re-create html headers and footers that mimic the wordpress versions and try it the old way?

    Sorry for the confusion, this is all very new to me and I am really stuck on this one! I appreciate your insight.

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

The topic ‘Problems “embedding” external site’ is closed to new replies.