Add blog content to other site footer

  • Unknown's avatar

    I have a website that I’m adding a large footer to. One of the sections of the footers I would like to have 2 or 3 of my lasts posts from my WordPress blog. Also can I control what is displayed, ie blog title, blog text & author, ignoring dates or photos or whatever else. Then I’d have the title linked to actual blog.
    Is this possible?
    Thanks in advance…:-)

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Your blog has an RSS feed – http://rabbidblog.wordpress.com/feed/

    You could display that in your footer on your other web site if you know how to insert the feed

  • Unknown's avatar

    thanks, i do not know how to insert feed, maybe now ill have better search results though

  • Unknown's avatar

    any javascripters out there? i found this code and inserted it into columns and it works. now id just like to tweak it a bit.
    id like to remove the date line
    remove the filed under and add a comment line
    add author line after post text.

    <ul id=”entries”><li class=”loading”>Loading…

    <script type=”text/javascript” src=”//www.google.com/jsapi”></script>
    <script type=”text/javascript”>

    // ================================================
    // Your info here
    // ================================================
    var feedURL = ‘http://rabbidblog.wordpress.com/feed’;
    var numEntries = 3;
    var blogURL = ‘http://rabbidblog.wordpress.com/’;
    var blogLink = ‘View full blog »’;
    // ================================================

    google.load(“feeds”, “1”);

    function formatDate(d, f) {
    var d = new Date(d);
    var months = [‘January’, ‘February’, ‘March’, ‘April’, ‘May’, ‘June’, ‘July’, ‘August’, ‘September’, ‘October’, ‘November’, ‘December’];
    var days = [‘Sunday’, ‘Monday’, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’, ‘Saturday’];
    return f.replace(/(yyyy|mmmm|mmm|mm|dddd|ddd|dd|hh|nn|ss|a/p)/gi,
    function($1) {
    switch ($1.toLowerCase()) {
    case ‘yyyy’: return d.getFullYear();
    case ‘mmmm’: return months[d.getMonth()];
    case ‘mmm’: return months[d.getMonth()].substr(0, 3);
    case ‘mm’: return (d.getMonth() + 1);
    case ‘dddd’: return days[d.getDay()];
    case ‘ddd’: return days[d.getDay()].substr(0, 3);
    case ‘dd’: return d.getDate();
    case ‘hh’: return ((h = d.getHours() % 12) ? h : 12);
    case ‘nn’: return d.getMinutes();
    case ‘ss’: return d.getSeconds();
    case ‘a/p’: return d.getHours() < 12 ? ‘a’ : ‘p’;
    }
    }
    );
    }

    function initialize() {
    var feed = new google.feeds.Feed(feedURL);
    feed.setNumEntries(numEntries);
    feed.load(function(result) {

    if(result.error) return;

    var list = document.getElementById(‘entries’);
    list.removeChild(list.firstChild);

    for(var i = 0; i < result.feed.entries.length; i++) {
    var entry = result.feed.entries[i];
    var link = document.createElement(‘a’);
    link.setAttribute(‘href’, entry.link);
    link.appendChild(document.createTextNode(entry.title));
    var title = document.createElement(‘h2’);
    title.appendChild(link);
    var date = document.createElement(‘p’);
    date.setAttribute(‘class’, ‘blog_date’);
    date.appendChild(document.createTextNode(formatDate(entry.publishedDate, ‘mmmm dd, yyyy’)));
    var content = document.createElement(‘div’);
    content.innerHTML = entry.content;
    var li = document.createElement(‘li’);
    li.appendChild(title);
    li.appendChild(date);
    li.appendChild(content);
    list.appendChild(li);
    }

    });
    }
    google.setOnLoadCallback(initialize);
    </script>

    im live testing at http://www.rabbiddesign.com/icontest/
    Thanks for any input!

  • The topic ‘Add blog content to other site footer’ is closed to new replies.