Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Junior Member Mongoose's Avatar
    Join Date
    Apr 2007
    Location
    WA, USA
    Posts
    4
    Member #
    15072
    I have a personal site all set up and pretty (http://evanmeagher.net/) and I want to add blogish functionality to it so I can publish articles and whatnot easily. Is there a way to implement blog software into an existing layout? I tried Wordpress, but I don't want to have to create a custom skin to match my site... I want to just stick the blog within the existing layout.

    Anybody got any ideas? Keep in mind that I know close to nothing about PHP/MySQL.

  2.  

  3. #2
    Senior Member Eddy Bones's Avatar
    Join Date
    Jan 2004
    Location
    Washington, USA
    Posts
    1,054
    Member #
    4651
    You don't really have to make a custom skin for Wordpress. You can take the Wordpress tags that you need and put them in your current layout. If you already have the layout coded, then you already have the skin--you just need to add the WP tags in the right places and maybe change a few elements in CSS to match your site's look.

    As it stands, if you don't know PHP then you don't have many other options that integrating Wordpress or some other CMS, and they'll all take just as much effort. If you wanted to learn PHP you could develop your own blog system, but it would be equivalent to reinventing the wheel.

    It takes all of a few hours to integrate Wordpress anyway, and if you have any questions or need some help, you can always ask here for help.

  4. #3
    Junior Member Mongoose's Avatar
    Join Date
    Apr 2007
    Location
    WA, USA
    Posts
    4
    Member #
    15072
    Cool. I'll try Wordpress again. What kind of tags and stuff am I going to want to insert?

  5. #4
    Senior Member Eddy Bones's Avatar
    Join Date
    Jan 2004
    Location
    Washington, USA
    Posts
    1,054
    Member #
    4651
    I think the easiest way to use Wordpress is to take what's already been given. What I usually do is take the classic template (wp-content/themes/classic) and make a copy of it.

    Once you've made that copy, open it up and look at the template files you'll be working with. The first thing to think about is the CSS file called stylesheet.css. It will always be called stylesheet.css because if you change the name, the template won't work. What you can do is copy and paste your own CSS into it from the CSS that you've used already for you site.

    Once that's through, all that you need to do is change the template files. Start with header.php. All that you really need to do here is replace a few HTML tags. For your site, you'd probably want to change these few lines:
    HTML Code:
    <div id="rap">
    <h1 id="header"><a href="<?php bloginfo('url'); ?>/"><?php bloginfo('name'); ?></a></h1>
    
    <div id="content">
    to this:
    HTML Code:
    <h1 class="branding"><a href="http://evanmeagher.net/" title="evanmeagher.net">evanmeagher.net</a></h1>
    
    <div id="wrapper">
    <span id="roundRight"></span>
    
    <div id="menu">
    
    <ul>
    
    <li id="home">
    <a href="http://evanmeagher.net/" title="Home"><span>Home</span></a>
    </li>
    
    <li id="portfolio">
    <a href="/portfolio/" title="Portfolio"><span>Portfolio</span></a>
    </li>
    
    <li id="tutorials">
    <a href="/tutorials/" title="Tutorials"><span>Tutorials</span></a>
    </li>
    
    <li id="contact">
    <a href="/contact/" title="Contact"><span>Contact</span></a>
    
    </li>
    </ul>
    </div>	<!-- menu -->
    Everything that's going to be on top every page will go in there.

    Looking at the source code of your site, the next thing that comes is the sidebar. So close header.php and open up sidebar.php. Again, you'll need to replace a lot of what they have in there with your own code. I think all that sidebar.php will have for your template right now is this:

    HTML Code:
    <div id="sidebar">
    <h1>Music</h1>
    <a class="lastdotfm" href="http://www.last.fm/user/Mongoose1337/?chartstyle=artistsg"><img src="http://imagegen.last.fm/artistsg/artists/7/Mongoose1337.gif" border="0" /></a>
    
    <h1>Diggs</h1>
    <a class="digg_feed" href="http://digg.com/rss/Mongoose/index2.xml" title="RSS Feed"><img  src="/img/rss_icon.gif" alt="RSS Feed" /></a>
    <script language="JavaScript" src="http://digg.com/tools/diggjs/user/dugg/Mongoose/9" type="text/javascript"></script>
    
    <span id="sidebar_bottom"></span>
    </div>	<!-- sidebar -->
    Keep in mind that we can add to this later to show archives and things.

    The main content of the blog is a bit trickier because there's some PHP that you need to wade through. So open up index.php and take a look at it. The things that you must keep are outlined below (I've added the default line numbers in case it helps):

    HTML Code:
    [1]<?php
    [2]get_header();
    [3]?>
    
    [5]<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    This first block of code includes the header that you created earlier. After that it queries the database and if it selected anything, it prepares to display it in a loop.

    At this point (after line 5) you'll insert the code to format your posts. You can use the original code that they give you and see what happens, and then modify it as needed. Just note the way they use classes and IDs because you can add your own styling to those in stylesheet.css.

    Continuing on you'll need these lines of code (with the default line numbers still noted):
    HTML Code:
    [24]<?php comments_template(); // Get wp-comments.php template ?>
    
    [26]<?php endwhile; else: ?>
    [27]<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    [28]<?php endif; ?>
    
    [32]<?php get_footer(); ?>
    Line 24 includes the comment template. If you don't want to allow comments, you can remove that line.

    Lines 26-28 finish off the code loop that displays posts, so you need those or else you'll get an error.

    Line 32 includes the footer that you'll work on in footer.php. To do that, you do the same as in the header. You just need to remember to close any wrapper divs that you may have opened in header.php or elsewhere.

    Hopefully this gives you some sort of beginning. Please do ask if you have further questions, because this isn't the easiest process of all time.

  6. #5
    Junior Member Mongoose's Avatar
    Join Date
    Apr 2007
    Location
    WA, USA
    Posts
    4
    Member #
    15072
    Thank you very much, Eddy. That's exactly what I'm looking for.

  7. #6
    Senior Member Eddy Bones's Avatar
    Join Date
    Jan 2004
    Location
    Washington, USA
    Posts
    1,054
    Member #
    4651
    No problem. I should also mention that if you want detailed explanations of the template tags, you can check out this listing: http://codex.wordpress.org/Template_Tags

  8. #7
    Junior Member Mongoose's Avatar
    Join Date
    Apr 2007
    Location
    WA, USA
    Posts
    4
    Member #
    15072
    Serious grave-digging here, but I finally got around to attempting to insert WP into my site. I followed Eddy Bone's tips and came up with this.

    I'm not sure where to go from here. The idea of starting from scratch and skinning a new WP theme seems better now than before.

    I guess I have two questions:

    1. Where would I go from here if I was to continue attemping to put WP in my existing site?
    2. How much work is it to skin an existing WP theme to your liking?

    I'd like to end up with a site with functionality similar to http://bokardo.com/ or http://hyalineskies.com/.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:24 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com