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 9202475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:16:02+00:00 2026-06-17T23:16:02+00:00

I have 2 custom post types in WordPress: ‘homepage’ and ‘story’ and I have

  • 0

I have 2 custom post types in WordPress: ‘homepage’ and ‘story’ and I have installed a plugin ‘Post from Site’. When I try to post into ‘story’ from front page with this plugin i get a few errors.

You can try too here: http://www.teenbetween.relationshipsireland.com/your-family-life/accepting-the-decision/ – you will find below image a link, use it.

And the article is posted but i get the error.

Notice: Trying to get property of non-object in teenbetween.relationshipsireland.com/wp-content/themes/teenbetween/includes/homepage.php on line 79 
Notice: Undefined index: link_homepage in teenbetween.relationshipsireland.com/wp-content/themes/teenbetween/includes/homepage.php on line 79 
Notice: Trying to get property of non-object in teenbetween.relationshipsireland.com/wp-content/themes/teenbetween/includes/story.php on line 45 
Notice: Trying to get property of non-object in teenbetween.relationshipsireland.com/wp-includes/capabilities.php on line 1069 
Notice: Trying to get property of non-object in teenbetween.relationshipsireland.com/wp-includes/capabilities.php on line 1073 
Notice: Trying to get property of non-object in teenbetween.relationshipsireland.com/wp-includes/capabilities.php on line 1075 
Notice: Trying to get property of non-object in teenbetween.relationshipsireland.com/wp-includes/capabilities.php on line 1076 
Notice: Trying to get property of non-object in teenbetween.relationshipsireland.com/wp-includes/capabilities.php on line 1079 
Notice: Trying to get property of non-object in teenbetween.relationshipsireland.com/wp-content/themes/teenbetween/includes/story.php on line 46 {"image":"none","error":"","success":"Post added, please wait to return to the previous page.","post":1139}

This is story.php 45:

if ( !current_user_can( 'edit_post', $post->ID )){
    return $post->ID;
}

and homepage.php 79:

add_action('save_post', 'save_details');
function save_details(){ 
global $post;   
update_post_meta($post->ID, "link_homepage", $_POST["link_homepage"]);  // homepage.php 79
}

Any help please?

  • 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-17T23:16:03+00:00Added an answer on June 17, 2026 at 11:16 pm

    The $post object isn’t available during the save_details function. When you call the function, pass in the $post_id as the first parameter. You’ll also want to move the authorization code in story.php into the save_details function.

    function save_details($post_id){ 
        update_post_meta($post_id, "link_homepage", $_POST["link_homepage"]);  // homepage.php 79
    }
    

    See this for reference: http://codex.wordpress.org/Plugin_API/Action_Reference/save_post

    If that doesn’t work you can try http://wordpress.org/extend/plugins/advanced-custom-fields/

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

Sidebar

Related Questions

I am currently working on a Wordpress site I have created some custom Post
I have the following being echoed from a custom wordpress post type by get-client-logos.php
I am having some trouble pulling multiple custom post types from a Custom Wordpress
I have a Wordpress Installation. I have about 3 x custom post types on
I have three Custom Post Types in Wordpress: artists, writers, stories Is it possible
I have a custom post type news in my Wordpress site. I am using
I've installed a plugin for Wordpress Titled CMS Press onto my Site. I have
I have a custom posttype in Wordpress 3. I would like to every post
I have 2 custom post types - offered and wanted. I want these items
I'm using custom post types in WordPress 3.0 to manage 'courses' (or seminars, lectures,

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.