Grow your CSS skills. Land your dream job.

WordPress Integration (Help!)

  • # December 26, 2012 at 9:49 am

    Hi! I’m looking to integrate a **Wordpress Blog** in my static website(mydomain.com/blog) but i’m having a really hard time doing it. I’ve searched the whole web for something/someone that can help me but to no avail. I’ve found several blogs and videos about it but they just couldn’t make it so that a wordpress **_newbie_** like myself could easily understand it. The closest i got to a really great tutorial is [this](http://www.burnseo.com/blog/2009/10/23/integrate-wordpress-into-existing-website-tutorial/ “burn”) but some of the codes provided has some errors to it and i just couldn’t make the it work. Can anyone provide a detailed tutorial on **how to Integrate WordPress to a static website in a subfolder**. i dont wanna use iFrame. Any help/advice/tutorial/comments will be really appreciated.

    p.s please help me understand this cause im really nearing my mental limit

    # December 26, 2012 at 10:04 am

    additional info:

    i already tried to do the different tutorials i’ve found and each tutorial gives a different version of this code. i’ve been trying to solve the different problems with the little bit of php knowledge that i currently have.

    Parse error: syntax error, unexpected ‘;’ in D:hosting10182362htmlblogwp-contentthemestwentyelevenheader.php on line 19

    # December 26, 2012 at 10:18 am

    There is a [nice article](http://codex.wordpress.org/Integrating_WordPress_with_Your_Website) on the WordPress Codex, this should work for you.

    In the end is the codex the best reference for WordPress :)

    # December 26, 2012 at 10:33 am

    thanks for the link :) i already looked in that. but still i dont know why it doesnt work :(

    # December 26, 2012 at 11:02 am

    OK, so when you installed WordPress (the famous “5-second install”), that went all fine? It connected to the database and all that?

    When I look at the actual error message you get, it just says there’s a semicolon that shouldn’t be there. Did you edit HEADER.PHP by any chance? Cause when I look at that file in my install, it just says this line:

    >

    So check if that’s the same with you.

    If you DIDN’T get to the install point, this is the generic list of things to do, let us know what part you’re having problems with:

    1. set up an empty MySQL database and a user that has full access to it
    2. enter the database details (server, table, user and password) in WP-CONFIG.PHP
    3. install WordPress by going to http://mydomain.com/wp-install

    # December 26, 2012 at 11:33 am

    well i’m having progress cause i managed to put the “recent blog” widget or something. on my static front page. (oh yeah!) now what im trying to accomplish is incorporating the wordpress using my design. here is my site http://yukisaito.me and i want http://yukisaito.me/blog to use the design of my main static page.

    # December 26, 2012 at 1:22 pm

    Another suggestion, since on your site you’ve got large type displayed front-and-center, would be to use the @font-face method. Windows renders text differently and can produce some pretty terrifying results when linking to web fonts (not to mention Google web fonts being pretty unpredictable).

    Here is an OK article to get started. Font Squirrel has a really easy to use @font-face Kit Generator, plus a good selection of free and licensed fonts (make sure you can legally use the fonts you make a kit out of).

    This is a good article if you want to dig further into how fonts are rendered on the web. Though you can go down-the-rabbit-hole a bit researching the best cross-browser implementation.

    # December 26, 2012 at 1:38 pm

    I am going to go out on a limb here and say “Instead of integrating WordPress into your website, you should be integrating your website into WordPress.”

    # December 26, 2012 at 4:03 pm

    I think scottnix is right on the money. You should be installing WordPress in your root folder and running everything off that. Before going to your site I assumed you were running something that would make that difficult, such as integrated third-party apps, custom backend, membership or shopping scripts, but you’re not doing any of those.

    By all appearances, your site is basic enough to run off of wordpress entirely. Perhaps you just think of WordPress as just a blog, but it does have “pages” for your static content. Take a look at the following:
    http://en.support.wordpress.com/post-vs-page/
    http://codex.wordpress.org/Pages

    If you must have it in a subfolder, then it’s basically going to be its own entity and you’ll have to maintain two sets of mirrored designs for your site: one for your blog, and one for everything else.

    # December 26, 2012 at 4:23 pm

    I actually never install WP into a root directory, I hate looking all the files and I imagine clients do too.

    You can use a subdirectory install and have it use the root url as normal, [Codex Docs](http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install “WordPress Sub Directory Install”).

    # December 27, 2012 at 3:23 am

    thanks for the feedback guys!
    i might just build my website in WP!
    @chris_jordan Thanks! i’ll definately look into @font_face.

    for those newbies like me who would stumble in this thread, i found a really neat up-to-date WP theme making tutorial.

    http://themeshaper.com/2012/10/22/the-themeshaper-wordpress-theme-tutorial-2nd-edition/

    Hope this helps! :)

    # December 27, 2012 at 6:58 am

    If you have decided to build your website in wordpress. Watch this video [YouTube…](http://www.youtube.com/watch?v=wLKui1x1JFk “YouTubeVideo”). This video explains each step on how to install wordpress.

    # December 29, 2012 at 8:14 am

    can anbody tell me how to call the style.css on a wordpress hosted locally?

    # December 29, 2012 at 8:18 am
    # December 29, 2012 at 8:19 am
    Viewing 15 posts - 1 through 15 (of 18 total)

    You must be logged in to reply to this topic.

    Projects

    Colophon

    CSS-Tricks* is created, written by, and maintained by Chris Coyier. It is built on WordPress, hosted by MediaTemple, and the assets are served by MaxCDN. The fonts are Source Sans and Source Code Pro. It is made possible by viewers like you who subscribe to The Lodge and through advertising for products and services I like.

    *May or may not contain any actual "CSS" or "Tricks".