Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8100195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:40:59+00:00 2026-06-05T22:40:59+00:00

I’ve recently started developing a portfolio website which I would like to link to

  • 0

I’ve recently started developing a portfolio website which I would like to link to my wordpress blog using simplepie. It’s been quite a smooth process so far – loading names and descriptions of posts, and linking them to the full post was quite easy. However, I would like the option to render the posts in my own website as well. Getting the full content of a given post is simple, but what I would like to do is provide a list of recent posts which link to a php page on my portfolio website that takes a GET variable of some sort to identify the post, so that I can render the full content there.

That’s where I’ve run into problems – there doesn’t seem to be any way to look up a post according to a specific id or name or similar. Is there any way I can pull some unique identifier from a post object on one page, then pass the identifier to another page and look up the specific post there? If that’s impossible, is there any way for me to simply pass the entire post object, or temporarily store it somewhere so it can be used by the other page?

Thank you for your time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:41:00+00:00Added an answer on June 5, 2026 at 10:41 pm

    I stumbled across your question looking for something else about simplepie. But I do work with an identifier while using simplepie. So this seems to be the answer to your question:

    My getFeedPosts-function in PHP looks like this:

    public function getFeedPosts($numberPosts = null) {
        $feed = new SimplePie();    // default options
        $feed->set_feed_url('http://yourname.blogspot.com');    // Set the feed
        $feed->enable_cache(true);  /* Enable caching */
        $feed->set_cache_duration(1800);    /* seconds to cache the feed */         
        $feed->init();  // Run SimplePie.
        $feed->handle_content_type();
        $allFeeds = array();
        $number = $numberPosts>0 ? $numberPosts : 0;
        foreach ($feed->get_items(0, $number) as $item) {
            $singleFeed = array(
                'author'=>$item->get_author(),
                'categories'=>$item->get_categories(),
                'copyright'=>$item->get_copyright(),
                'content'=>$item->get_content(),
                'date'=>$item->get_date("d.m.Y H:i"),
                'description'=>$item->get_description(),
                'id'=>$item->get_id(),
                'latitude'=>$item->get_latitude(),
                'longitude'=>$item->get_longitude(),
                'permalink'=>$item->get_permalink(),
                'title'=>$item->get_title()
            );
            array_push($allFeeds, $singleFeed);
        }
        $feed = null;
        return json_encode($allFeeds);
    }
    

    As you can see, I build a associative array and return it as JSON what makes it really easy using jQuery and ajax (in my case) on the client side.

    The ‘id’ is a unique identifier of every post in my blog. So this is the key to identify the same post also in another function/on another page. You just have to iterate the posts and compare this id. As far as I can see, there is no get_item($ID)-function. There is an get_item($key)-function but it is also just taking out a specific post from the list of all posts by the array-position (which is nearly the same way I suggest).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to run a str_replace or preg_replace which looks for certain words
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.