WordPress.org

Ready to get started?Download WordPress

Forums

Embedding and RSS feed from WordPress into a an XHTML page (10 posts)

  1. dougoftheabaci
    Member
    Posted 7 years ago #

    The title says exactly what I'm trying to do. I want to embed the RSS 2 feed into an XHTML page. I know I can view my feed with feed://dougstewartdesign.com/blog/?feed=rss2 but it has the navigation system along the right and the feed name along the top.

    What I'm wondering is there a way I can edit the template to remove those two elements or a way I can pull that feed into another .html document and that wouldn't show those elements so I can load it into an IFrame?

  2. Chris_K
    Member
    Posted 7 years ago #

    Navigation system? Huh?

    Are you viewing a transformed feed or the "raw" xml?

  3. dougoftheabaci
    Member
    Posted 7 years ago #

    I'm not sure. This is what I see when I view the link from my original post (feed://dougstewartdesign.com/blog/?feed=rss2):

    http://static.flickr.com/121/301514444_5b85091064_o.jpg

    It's a bit different from that when I view it in FireFox but it is still giving me elements I don't want. Any ideas?

  4. Chris_K
    Member
    Posted 7 years ago #

    Yeah, that's the browsers making with the transforms for your viewing pleasure. :-)

    Do a "view source" to see what a feed really looks like.

  5. dougoftheabaci
    Member
    Posted 7 years ago #

    OK so yeah feeling like an idiot... Can you tell I'm completely self-taught? Haha!

    The problem is that the information is still shown with that title and extra navigation on the right when I use an iFrame to place the content on an normal HTML page. I don't suppose you can suggest anything as a work-around or another way I could do this?

  6. Chris_K
    Member
    Posted 7 years ago #

    Well, let's step back and regroup a moment.

    What's the desired end result?

  7. dougoftheabaci
    Member
    Posted 7 years ago #

    Essentially, what I hope to do is take the feed from my WordPress blog and post it on my website via an iframe, something like this:

    http://www.peepshow.org.uk/
    (don't worry, it's really a design collective)

    And I know I can use an iframe tag in HTML to basically put a one page into another and I figured I could put the 10 latest entries from the RSS feed directly into the page that way since I don't know of another.

    I figure something like this would be much easier than building an entire CMS and database system completely from scratch to fit my needs since WordPress seems to already be able to do exactly what I want minus this one ability.

  8. Chris_K
    Member
    Posted 7 years ago #

    Ah. But the trick there is your browser is making the RSS feed look all pretty... but it really isn't. Not without those built-in transforms.

    However.

    Take a look at Creating_a_Static_Front_Page. In particular, the "integrating" section.

    Or, use your search engine of choice and look for RSS import/reader modules that you could use on your non-blog website to pull feeds from the blog and display them.

  9. dougoftheabaci
    Member
    Posted 7 years ago #

    Thanks for the link, it's helped me get a little closer. The mini-loop is getting towards what I'm looking to do, but I'm unsure how to customise aspects of it since my knowledge of PHP is virtually non-existent.

    I've gotten this far:
    http://www.dougstewartdesign.com/news.php

    Where it shows the titles for the posts, but not the articles themselves, which is what I would like in the end result.

    Do you know of another linked tutorial that would help or would it be better for me just to find a RSS import/reader module?

  10. Chris_K
    Member
    Posted 7 years ago #

    For the articles themselves you want to play with the_content or the_excerpt. The first shows the complete article, the latter just the first x characters.

    http://codex.wordpress.org/Template_Tags/the_content
    http://codex.wordpress.org/Template_Tags/the_excerpt

    If you look over The_Loop page. You'll see some examples. For that matter, if you look in any theme's index.php you'll see more examples.

    Hope that helps!

Topic Closed

This topic has been closed to new replies.

About this Topic