WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WordPress bloginfo() function. (4 posts)

  1. Muhammad
    Member
    Posted 6 years ago #

    I want to access bloginfo() function in plugin file to get the root URL of wordpress? I get the following error when I use bloginfo() function:

    Fatal error: Call to undefined function bloginfo()

    What is the solution?

  2. Kafkaesqui

    Posted 6 years ago #

    Try the get_option() function:

    $blog_addr = get_option('home');
    $wp_addr = get_option('siteurl');
  3. Muhammad
    Member
    Posted 6 years ago #

    Call to undefined function get_option()

    :S

  4. Kafkaesqui

    Posted 6 years ago #

    When exactly are you calling these functions in your plugin?

Topic Closed

This topic has been closed to new replies.

About this Topic