WordPress.org

Forums

Home Custom Menu Link (8 posts)

  1. arturocivit
    Member
    Posted 1 year ago #

    Hi there, I'm trying to have the menu link per default when using my custom menus, and in my functions document I have this:

    function home_page_menu_args( $args ) {
    $args['show_home'] = true;
    return $args;
    }
    add_filter( 'wp_page_menu_args', 'home_page_menu_args' );

    The thing is, in the custome menu options > pages I have this: "No items." So not sure what's going on, it was working in other websites but not in this one, any idea?

    Thanks!

    A.

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    That function should not be causing any problems.

  3. arturocivit
    Member
    Posted 1 year ago #

    I know, actually I have that function working with all my wordpress installations, but for some reason is not working here.

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    What makes you think that this function is the problem?

  5. arturocivit
    Member
    Posted 1 year ago #

    Well, not sure, but that site was working and that function was doing what is supposed to do, then, we clean the database and then placed the data again, and everything worked fine with the exception of that, so I assumed that's the function, but I might be wrong.

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    What are the symptoms on the site? Anything in the error logs?

  7. arturocivit
    Member
    Posted 1 year ago #

    How can I see the error logs?

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    Your hosts should be able to help you access the site's error logs. You could also try turning debug on and enabling error logging but don't leave it on too long on a live site.

Topic Closed

This topic has been closed to new replies.

About this Topic