Support » Fixing WordPress » Help integrating website with blog

  • So I have a website and I like it. I have a css stylesheet that I like as well, but I can’t for the life of me figure out how to just place my new word press blog onto one of my pages and make it look just like everything else. I have quite a bit of html and css experience and very little php experience. I’ve visited the sites which try and explain how to seamlessly integrate both things, but it all seems like gibberish to me. Would anyone be willing to help me with my specific situation?

    What I do understand is that index.php references each of the other parts of the page which are stored in different documents (much like frames). My page is structured in divs, is there any possible way I can just paste the reference code inside the divs, so that my structure is kept? or am I going to have to figure out how to somehow recreate my current layout exactly into php form?


Viewing 15 replies - 1 through 15 (of 18 total)
  • Alright cool. So if I take an existing HTML page with my divs, add that code to the top and paste those codes inside the divs, and rename the file index.php everything will be good?

    Do you want to pull content from WP into your main site? Or do you want to make WP look like your site? If it’s the former, use the info in the link above. If it’s the latter, you’ll need to build a custom theme or customise an existing theme.

    I went to both of those websites before I posed this thread. If I knew which of these would work with what I want, or even how to begin trying them, I would’ve tried them already.

    Can anyone try to address my questions directly instead of just directing me to other tutorials? I explained my entire situation already hoping someone could tell me what I need to do. I obviously have no idea what I’m doing, so a little bit of patience would be awesome.

    It comes down to which of the two options you want to use. If you just want to pull a few posts onto your main site and, effectively, not provide public access to the blog itself, I’d suggest going for Option A: integrating WP into your site.

    If you want a complete blog available for public display via your main site, go for Option B – creating/customising a theme that matches your site.

    Well I want the posts to show up in the body of my website, I want to give the visitors the ability to make comments on the posts, and I want my sidebar to the right so that they can navigate to older posts. I don’t need a header or a footer. Should I use option A?

    I think, once you start getting into commenting, it might be easier in the long run if you use Option B.

    Alright, so how would I begin transforming this skeleton layout into a theme? It’s in html format, not php. This tutorial just assumes your file is in php format.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns="">
    <link rel="Shortcut Icon" href="favicon.ico">
    <link rel="icon" href="/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
    <title> - a melting pot.
    <div id="wrapper">
    <div id="header"><a href="index.html"><img src="ksksbannerwhite.png" border="0"></a></div>
    <div id="links"><center>
    <a href="index.htm">music</a> //
    <a href="index.htm">film</a> //
    <a href="index.htm">art</a> //
    <a href="index.htm">photography</a> //
    <span class="current">blog</span> //
    <a href="index.htm">about</a>
    <div id="maincontent">
    Here's where the posts would go.

    Start by breaking down the HTML template into at least 4 distinct files:

    header.php – everything from <!DOCTYPE to <div id="header"><a href="index.html"><img src="ksksbannerwhite.png" border="0"></a></div>

    sidebar.php – everything from <div id="links"> to </center></div>

    index.php – <div id="maincontent"> to the first </div>

    footer.php – all the rest.

    Then read up on The Loop and wp_list_categories. You’ll need to former to display your posts and the latter to generate your (currently hardcoded) nav links.

    Also research what you must include in header.php and footer.php.

    I did the basic version which makes comments have to go to the blog site. Is there any way to keep this all in my site without having to link out to the wordpress site?

    awesome. thank you so much esmi. except my images aren’t showing up. Even after I made an “images” folder in my theme and referenced them.

    Don’t use relative urls unless it’s within CSS files. WP doesn’t handle relative urls very well.

    alright cool, well you knew I’d be back with a question. I want my nav links above the maincontent like they are, but I also want an actual sidebar with the archive and list of categrories and whatnot to the right. My sidebar.php file is already used with the nav links. What do I do??

    You can have as many sidebars as you want. If you call them names like sidebar-left.php or sidebar-two.php, you can use <?php get_sidebar('left');?> and/or <?php get_sidebar('two');?>.

    awesome awesome awesome. alright. I think this may be the last question I have. For my sidebar-two.php, I just copied and pasted the contents of the “default” theme’s sidebar.php. I was able to reclassify the headings (Archive, Categories..etc) so that I could manipulate the font, size etc with css. BUT I cant find the code where “Blogroll” is, so I cant manipulate it…I don’t even understand how it even knows its there.

    here’s the site:

    <div id="sidebar">
    			<?php 	/* Widgetized sidebar, if you have the plugin installed. */
    					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    				<?php get_search_form(); ?>
    			<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
    			<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
    			<?php if ( is_404() || is_category() || is_day() || is_month() ||
    						is_year() || is_search() || is_paged() ) {
    			<?php /* If this is a 404 page */ if (is_404()) { ?>
    			<?php /* If this is a category archive */ } elseif (is_category()) { ?>
    			<p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>
    			<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
    			<p>You are currently browsing the <a>/"><?php echo bloginfo('name'); ?></a> blog archives
    			for the day <?php the_time('l, F jS, Y'); ?>.</p>
    			<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    			<p>You are currently browsing the <a>/"><?php echo bloginfo('name'); ?></a> blog archives
    			for <?php the_time('F, Y'); ?>.</p>
    			<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    			<p>You are currently browsing the <a>/"><?php echo bloginfo('name'); ?></a> blog archives
    			for the year <?php the_time('Y'); ?>.</p>
    			<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
    			<p>You have searched the <a>/"><?php echo bloginfo('name'); ?></a> blog archives
    			for <strong>'<?php the_search_query(); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
    			<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    			<p>You are currently browsing the <a>/"><?php echo bloginfo('name'); ?></a> blog archives.</p>
    			<?php } ?>
    		<?php }?>
    		<ul role="navigation">
    				<?php wp_get_archives('type=monthly'); ?>
    			<?php wp_list_categories('show_count=1&title_li=<h3>Categories</h3>'); ?>
    			<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
    				<?php wp_list_bookmarks(); ?>
    					<?php wp_register(); ?>
    <li><?php wp_loginout(); ?></li>
    <li><a href="" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li>
    <li><a href=""><abbr title="XHTML Friends Network">XFN</abbr></a></li>
    <li><a href="" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li>
    					<?php wp_meta(); ?>
    			<?php } ?>
    			<?php endif; ?>
Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Help integrating website with blog’ is closed to new replies.