WordPress.org

Ready to get started?Download WordPress

Forums

Embedding to existing website (10 posts)

  1. vagabras
    Member
    Posted 1 year ago #

    I apologize if this has been asked but I have been reading for the past week and all I can find are 3 year old post on the subject.

    I have a html/css static website that all I want to do is have the wordpress content appear on the page. I do not want iframe or convert to a wordpress site. I would think that this would be a fairly simple process but I haven't found it yet. Can anyone point me in the right direction for help.

    Thanks,
    vagabras

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    have the wordpress content appear on the page

    Which page, one of the static HTML pages?

  3. vagabras
    Member
    Posted 1 year ago #

    Yes on one of the static pages.

  4. vagabras
    Member
    Posted 1 year ago #

    So I looked at the actile mentioned and below is where I put the code. I am far from a php expert but I know that I am missing something because it can't be that easy:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <!-- #BeginTemplate "master%20template%2011~9~12.dwt" -->
    <head>
    
    <!-- #BeginEditable "doctitle" -->
    <title>Journal</title><!-- Master template as of 11/9/12 -->
    <!-- #EndEditable -->
    
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    
    <!-- Site main css -->
    <!-- <link href="main_dev.css" rel="stylesheet" type="text/css" /> -->
    
    <link rel="stylesheet" type="text/css" href="main_dev1.css" />
    <link rel="alternate stylesheet" type="text/css" media="screen" title="blue-theme" href="main_dev2.css" />
    <link rel="alternate stylesheet" type="text/css" media="screen" title="blue-theme" href="main_dev3.css" />
    <link rel="alternate stylesheet" type="text/css" media="screen" title="blue-theme" href="main_dev4.css" />
    <!-- <link rel="alternate stylesheet" type="text/css" media="screen" title="blue-theme" href="master5.css" />
    <link rel="alternate stylesheet" type="text/css" media="screen" title="blue-theme" href="master6.css" />
    <link rel="alternate stylesheet" type="text/css" media="screen" title="blue-theme" href="master7.css" /> -->
    
    <!--This script should appear below your LINK stylesheet tags -->
    
    <script src="styleswitch.js" type="text/javascript">
    
    /***********************************************
    * Style Sheet Switcher v1.1- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
    ***********************************************/
    
    </script>
    
    <!-- Scrollbar css -->
    <link href="js/jquery.mCustomScrollbar.css" rel="stylesheet" type="text/css" />
    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
    <script type="text/javascript" src="js/jquery.mousewheel.min.js"></script>
    <script type="text/javascript" src="js/jquery.mCustomScrollbar.js"></script>
    
    <script type="text/javascript">
        (function($){
            $(window).load(function(){
                $("#container_text").mCustomScrollbar();
            });
        })(jQuery);
    </script>
    
    </head>
    
    <!-- #BeginEditable "body tag" -->
    <body id="onice_nav">
    <!-- #EndEditable -->
    
    <div id="header">
    <div id="masthead">
    
    <div id="top_nav">
    <a class="nav_bar" href="lauren.html">Lauren</a>
    <a class="nav_bar" href="quinn.html">Quinn</a>
    <a class="nav_bar" href="on_ice.html">On the Ice</a>
    <a class="nav_bar" href="journal.php">Journal</a>
    <a class="nav_bar" href="gallery.html">Photos</a>
    <a class="nav_bar" href="sponsors.html">Sponsors</a>
    <a class="nav_bar" href="contact.html">Contact</a>
    </div><!-- End of top_nav -->
    
    </div><!-- End of masthead -->
    </div><!-- End of header -->
    
    <div id="container">
    <!-- #BeginEditable "Content" -->
    
    <div id="container_photo"></div><!-- End of container_photo -->
    
    <div id="container_text">
    <h2>Journal</h2>
    <p>
    
    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', false);
    require('http://dev.leonesio-chambers.com/blog/wp-blog-header.php');
    ?>
    
    <?php query_posts('showposts=3'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a><br />
    <?php endwhile;?>
    
    </p>
    </div><!-- End of container_text -->
    
    <!-- #EndEditable -->
    
    </div><!-- End of container -->
    
    <!-- #BeginEditable "Footer" -->
    <div id="footer">
    <p class="copyright">Copyright © 2012 <a class="copyright" href="http://www.wheatdesigns.com">Wheat Designs</a>&nbsp; <br />
    All Rights Reserved</p></div><!-- End of footer -->
    <!-- #EndEditable -->
    
    </body>
    <!-- #EndTemplate -->
    </html>
  5. Did that work?

  6. vagabras
    Member
    Posted 1 year ago #

    Nope. Here is the page

  7. vagabras
    Member
    Posted 1 year ago #

    The link did not appear:

    Leonesio-Chambers

  8. Look at your page source and see that the php function isn't pulling in anything. Try using the correct php function.

  9. vagabras
    Member
    Posted 1 year ago #

    Sorry to sound stupid by I copied the code for the tutorial pasted to the page. I thought that was the correct php function? What did I miss?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.