Archived

This topic is now archived and is closed to further replies.

  • 0

Google Rss Feed Api On Page


Question

Posted · Report post

Maybe it's because I don't know enough of Pagelines or Wordpress, but I want to create a special page withe the Google Feed API. This is Google's documentation:

<html>

<head>

<script type="text/javascript" src="https://www.google.com/jsapi"></script>

<script type="text/javascript">

google.load("feeds", "1");

function initialize() {

var feed = new google.feeds.Feed("http://fastpshb.appspot.com/feed/1/fastpshb");

feed.load(function(result) {

if (!result.error) {

var container = document.getElementById("feed");

for (var i = 0; i < result.feed.entries.length; i++) {

var entry = result.feed.entries[i];

var div = document.createElement("div");

div.appendChild(document.createTextNode(entry.title));

container.appendChild(div);

}

}

});

}

google.setonloadCallback(initialize);

</script>

</head>

<body>

<div id="feed"></div>

</body>

</html>

Now, I just don't know where I put this code in, because Pagelines doesn't have pages (page-id.php) for every page. And if i look at the page-alpha, beta etc code, it doesn't look like I can put the code in there because the pages are build in teh setup_pagelines_template function.

Any help appreciated,

John

Share this post


Link to post
Share on other sites

1 answer to this question

Posted · Report post

This code requires that you create a new file and add this code in there. Have you tried looking for a WP plugin solution that creates a Google RSS Feed?

Share this post


Link to post
Share on other sites