I have just updated to the wordpress laest version. And this message is showing on the homepage.

Notice: Trying to get property of non-object in /home/jafa9363696/public_html/xn--9dba0af7bd.com/wp-includes/nav-menu.php on line 727 Notice: Trying to get property of non-object in /home/jafa9363696/public_html/xn--9dba0af7bd.com/wp-includes/nav-menu.php on line 731

This is from line 723-732

$menu_item->url = get_permalink( $menu_item->object_id );
$original_object = get_post( $menu_item->object_id );
/** This filter is documented in wp-includes/post-template.php */
$original_title = apply_filters( 'the_title', $original_object->post_title, $original_object->ID );
if ( '' === $original_title ) {
    /* translators: %d: ID of a post */
    $original_title = sprintf( __( '#%d (no title)' ), $original_object->ID );
  • What are the original contents of $menu_item and original_object? These are the important ones.
    – Johansson
    Commented Apr 30, 2017 at 16:11
  • This is the website שומרון.com in English realestate.bidgates.com ,,, used real estate theme,,, I am not good at php
    – Ehsan
    Commented Apr 30, 2017 at 16:14

1 Answer 1


This code tries to retrieve a post instance, but it is failing for some reason.

On top of my head I don’t think this should ever happen within normal operation of menus. I would suspect that menu structure is somehow corrupt.

Without diving into development side of it, an attempt of easy fix might be examining menu in admin and maybe removing entries which appear invalid and/or trying to re–save it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.