WordPress.org

Ready to get started?Download WordPress

Forums

WordPress blog as an include page (3 posts)

  1. ivanm
    Member
    Posted 9 years ago #

    I have a slightly complex situation :) I'm using the latest wordpress (1.5.1.2).
    I have a pretty complex homepage, and I want to include the blog on the homepage with php. I have 2 concerns: first, the CSS. The CSS of the blog theme overrides the stylesheet for the homepage. Is there any way to fix this other than editing the theme's css and changing the names of the styles?

    Second, I want to get this page to validate in XHTML Transitional. My homepage already validates and so does the blog, but using the php include page function will include the doctype, head and html tags and that definitely won't validate. The question: is there any way to get the blog as an include page function which will validate? This is just for the index.php of the blog- if the user clicks archives or searches, this will be in the blog skin, not as an include page or anything. I've made a copy of the index.php file in my theme folder and have stripped it of the header and footer, which contain the tags that won't validate. Is there any way I can use this page instead of the index.php file to display the blog? I want the header and footer stripped just for this one page.

    Thanks in advance for any replies and for your time.

    Regards,

    Ivan.

  2. davidchait
    Member
    Posted 9 years ago #

    Option 1. Read up on "The Loop". You want to 'start' the wp engine, then use your own custom loop on your page, not include the normal index.php... I believe you include wp-blog-header and go from there.

    Option 2. Use something like CG-FeedRead to pull the RSS feed contents into your main page. This has the advantage of NOT pulling in the entire WP codebase EVERY pageload, as it caches the feed and only refreshes on a time period you can specify.

    Both options have been discussed at length in the forums here, but if you can't figure it out, post again and someone will get back to you. ;)

    -d

  3. ivanm
    Member
    Posted 9 years ago #

    Thanks, I'll try the loop method. I'm reading up on it now :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags