WordPress.org

Ready to get started?Download WordPress

Forums

I've exhausted the search feature -- integration/The Loop -- Still stuck (3 posts)

  1. Lifline Marketing
    Member
    Posted 1 year ago #

    Hello community,

    I want to start off by thanking anyone in advance that may be willing to help with this issue. Communities like this are built around people taking time out of their schedules to help others and that's a very important thing so thank you! Quick run down, the website I built is a HTML/CSS with WordPress successfully installed on the server.

    I've followed this thread: http://codex.wordpress.org/Integrating_WordPress_with_Your_Website

    and countless others through the search. I made a sub-folder for the blog, I installed a custom theme with a style sheet, header, footer, & index .php files. Clearly, where I'm running into a problem is the php coding as going to http://www.lifline.com/blog merely brings up a completely blank page.

    Now, I've been pouring over this stuff for the last 2 days so I'm convinced, I've over-thought everything and I'm missing a very and completely obvious step in the process.

    So, dumb obvious question out of the way first, despite the theme and its .php files (which I'll post the code because I wouldn't be surprised at all if I flubbed in the coding), do I still need a shell .php file in my root directory to "host" the blog (a blog.php to call on the custom theme files)? Or, if I did it correctly in creating a custom theme (which I clearly didn't do), should http://www.lifline.com/blog just be a page that mirrors my overall design and has the blog content and I can just link to that through my main site nav?

    The style sheet is a 100% copy of the one used in the root directory but in the theme folder, as well. Ok, code. This is on the header page:

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', false);
    require('wp-blog-header.php');
    ?>
    <!DOCTYPE html>
    <!--[if IE 6]>
    <html id="ie6" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if IE 7]>
    <html id="ie7" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if IE 8]>
    <html id="ie8" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
    <html <?php language_attributes(); ?>>
    <!--<![endif]-->
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <meta name="viewport" content="width=device-width" />
    <title><?php
    	/*
    	 * Print the <title> tag based on what is being viewed.
    	 */
    	global $page, $paged;
    
    	wp_title( '|', true, 'right' );
    
    	// Add the blog name.
    	bloginfo( 'name' );
    
    	// Add the blog description for the home/front page.
    	$site_description = get_bloginfo( 'description', 'display' );
    	if ( $site_description && ( is_home() || is_front_page() ) )
    		echo " | $site_description";
    
    	// Add a page number if necessary:
    	if ( $paged >= 2 || $page >= 2 )
    		echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
    
    	?></title>
    <link rel="profile" href="http://gmpg.org/xfn/11" />
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( './style.css' ); ?>" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <!--[if lt IE 9]>
    <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
    <![endif]-->
    <?php
    	/* We add some JavaScript to pages with the comment form
    	 * to support sites with threaded comments (when in use).
    	 */
    	if ( is_singular() && get_option( 'thread_comments' ) )
    		wp_enqueue_script( 'comment-reply' );
    
    	/* Always have wp_head() just before the closing </head>
    	 * tag of your theme, or you will break many plugins, which
    	 * generally use this hook to add elements to <head> such
    	 * as styles, scripts, and meta tags.
    	 */
    	wp_head();
    ?>
    </head>
    <?php
    	get_header();
    ?>
    
    	<body>
    <div id="headerwrap" class="fullwidth">
    <div id="header" class="container_12">
        <div class="grid_4"> <a href="index.html"><img id="logo" src="images/site-logo.png" alt=""/></a> </div>
        <div class="grid_8">
          <p>Call us today about rental, leasing, and purchasing options!<br><span>304.423.5870</span></br><br>
          </p>
        </div>
        <div class="spacer20"></div>
      </div>
    </div>
    
    <div class="clear"></div>
    
    <div id="contentwrap" class="fullwidth">
      <div id="content" class="container_12 toprounded">
        <div class="grid_9"> <!-- TemplateBeginEditable name="MainContent" -->
          <h6>Home: Resources & Information: LIFLINE Blog</h6>
          <div class="spacer40"></div>
          <hr noshade size=1>
          <h1>LIFLINE Blog</h1>
          <hr noshade size=1>
          <div class="spacer20"></div>
                <div id="blogcontent">
    
    <?php if ( have_posts() ) : ?>
    <?php while ( have_posts() ) : the_post(); ?>
      <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
        <div class="post-header">
            <div class="date"><?php the_time( 'M j y' ); ?></div>
            <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
            <div class="author"><?php the_author(); ?></div>
        </div><!--end post header-->
        <div class="entry clear">
            <?php if ( function_exists( 'add_theme_support' ) ) the_post_thumbnail(); ?>
            <?php the_content(); ?>
            <?php edit_post_link(); ?>
            <?php wp_link_pages(); ?>
        </div><!--end entry-->
        <div class="post-footer">
            <div class="comments"><?php comments_popup_link( 'Leave a Comment', '1 Comment', '% Comments' ); ?></div>
        </div><!--end post footer-->
      </div><!--end post-->
    <?php endwhile; /* rewind or continue if all posts have been fetched */ ?>
      <div class="navigation index">
        <div class="alignleft"><?php next_posts_link( 'Older Entries' ); ?></div>
        <div class="alignright"><?php previous_posts_link( 'Newer Entries' ); ?></div>
      </div><!--end navigation-->
    <?php else : ?>
    <?php endif; ?>
    
                </div>
          <div class="clear"></div>
      </div>
    </div>
    
    <?php get_footer(); ?>

    And my footer:

    <!-- #BeginLibraryItem "/Library/footer.lbi" --><div id="footerwrap" class="fullwidth">
      <div id="footer" class="container_12">
        <div class="grid_2">
            <h4>Home</h4>
            <ul class="dotted">
    
    <li><a href="../twentytwelve/index.html">Home</a></li>
          </div>
          <div class="grid_2">
          <h4>Products</h4>
            <ul class="dotted">
    
    <li><a href="../twentytwelve/mobile.html">Mobile Units</a></li>
    <li><a href="../twentytwelve/track.html">Track Systems</a></li>
    <li><a href="../twentytwelve/rescue.html">Rescue Units</a></li>
    <li><a href="../twentytwelve/anchors.html">Reusable Anchors</a></li>
    <li><a href="../twentytwelve/ppe.html">PPE Harnesses & Accessories</a></li>
          </div>
          <div class="grid_2">
            <h4>Services</h4>
            <ul class="dotted">
    
    <li><a href="../twentytwelve/oshatrain.html">OSHA Training</a></li>
    <li><a href="../twentytwelve/safetyconsult.html">Independent Safety Consultation</a></li>
    <li><a href="../twentytwelve/customtrack.html">Custom Track Fabrication</a></li>
    <li><a href="../twentytwelve/customcat.html">Custom Catwalks & Portable Stairs</a></li>
          </div>
          <div class="grid_2">
            <h4>For Clients</h4>
            <ul class="dotted">
    
    <li><a href="../twentytwelve/about.html">About LIFLINE</a></li>
    <li><a href="../twentytwelve/ourclients.html">Our Clients</a></li>
    <li><a href="../twentytwelve/rentals.html">Rental & Leasing Options</a></li>
    <li><a href="../twentytwelve/videos.html">Product Videos</a></li>
    <li><a href="../twentytwelve/testimonials.html">Testimonials</a></li>
          </div>
          <div class="grid_2">
            <h4>Resources</h4>
            <ul class="dotted">
    
    <li><a href="../twentytwelve/stats.html">Workplace Accident Statistics</a></li>
    <li><a href="../twentytwelve/info.html">OSHA Information</a></li>
    <li><a href="../twentytwelve/tips.html">Safety Tips</a></li>
    <li><a href="../twentytwelve/blog.html">Blog</a></li>
          </div>
    
          <div class="grid_2">
            <h4>Contact</h4>
            <ul class="dotted">
    
    <li><a href="../twentytwelve/contactus.html">By Phone or E-mail</a></li>
    <li><a href="../twentytwelve/quote.html">Request a Quote</a></li>
    <ul>
              <li class="socialmediaicons"> <a href="https://www.facebook.com/pages/Lifline-Fall-Protection/127015640666071?fref=ts"></a> <a href="https://twitter.com/lifline1"></a> <a href="http://www.youtube.com/user/LiflineFP"></a></ul>
          </div>
    
          <div class="clear"></div>
        </div>
        <div class="clear"></div>
    
    </div>
    </div><!-- #EndLibraryItem -->
    
    <?php wp_footer(); ?>
    </body>
    </html>

    Again, I hope someone is able to help :)

  2. Lifline Marketing
    Member
    Posted 1 year ago #

    Still **stuck, but yes I also happen to be sucking quite a bit at getting this to work, ha ha.

  3. Lifline Marketing
    Member
    Posted 1 year ago #

    http://www.intmath.com/blog/adding-feeds-with-cg-feedread-a-tutorial/213

    Is using something like a feed reader easier? I was researching rss and feed readers and apparently the big downside to feeding it, is it doesn't display images? Can it display thumbnail images (We'll be featuring a lot of infographics)?

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic