Support

Account

Home Forums Bug Reports wp_title debug error with add_option_page

Solved

wp_title debug error with add_option_page

  • If I add the function:
    add_theme_support( ‘title-tag’ );

    combined with:
    acf_add_options_page(my settings…);

    Then I get wp_debug notice:
    Notice
    : Array to string conversion in
    /Users/imac/Sites/ak/wp-includes/general-template.php
    on line
    1005

    I am not the only one who found this,
    https://wordpress.org/support/topic/title_tag-causing-array-to-string-conversion-error?replies=4

    I use WP 4.5.1 and latest ACF5 pro.

  • The developer posted a comment on the link you provided, copied below.

    Hi guys

    Thanks for the tag.
    It sounds like using the variable $page is causing issues. Please note this can’t be replicated 100% of the time, so there must be something else to this story which is causing some function.php files to modify a global var instead of a local one.

    A simple fix is to place your ACF code within an action or function to avoid namespace issues!

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘wp_title debug error with add_option_page’ is closed to new replies.