Support » Theme: SemPress » Why does get_bloginfo not work?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Do you have a separate footer.php file in your theme folder? I believe you should be able to find this information inside footer.php of your parent theme’s (SemPress) folder. If you have a separate footer.php as I mentioned, your copy that line into yours and it should work.

    Please let me know if this answers your question.

    Theme Author Matthias Pfefferle

    (@pfefferle)

    Oh, this is a bug in the current version. Thanks for reporting. To quick fix the problem, replace the current meta-element with:

    <meta itemprop="name" content="<?php echo get_bloginfo( 'name', 'display' ); ?>" />

    I just downloaded and activated the theme. In their native footer.php there is a major mistake. It says
    <meta itemprop="name" content="get_bloginfo( 'name', 'display' )" />

    while it should say
    <meta itemprop="name" content="<?php echo get_bloginfo( 'name', 'display' ); ?>" />

    First of all get_bloginfo returns the value but does not print it. It is used to catch the value against some variable for later use. In order to use get_bloginfo() to display something on screen immediately, we need to echo it like echo get_bloginfo('name', 'display').

    Or you can just use bloginfo('name') to display it on screen immediately.

    So the meta information line should be either:
    <meta itemprop="name" content="<?php echo get_bloginfo( 'name', 'display' ); ?>" />

    or

    <meta itemprop="name" content="<?php bloginfo( 'name', 'display' ); ?>" />

    Hope this helps.

    Theme Author Matthias Pfefferle

    (@pfefferle)

    @subrataemfluence correct, thanks for your support!

    Hi Matthias,
    No problem. Glad to help!

    Thanks both @subrataemfluence and @pfefferle.

    Very helpful.

    No problem! If your problem is solved please can you mark this as “Resolved”?
    Thank you!

    Yes, all done.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.