Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7885129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:58:54+00:00 2026-06-03T04:58:54+00:00

<?php $options = get_option(‘kittens_options’); if ($options[‘copyright’]!=) echo $options[‘copyright’]; else echo ‘&copy; ‘.date(‘Y’).’ ‘.bloginfo(‘name’).’. All

  • 0
<?php $options = get_option('kittens_options'); if ($options['copyright']!="") echo $options['copyright']; else echo '&copy; '.date('Y').' '.bloginfo('name').'. All Rights Reserved.'; ?>

Works perfectly except '.bloginfo('name').' although properly showing what it’s suppose to, falls out of sequence in the sentence structure.

So what should show as:

© 2012 Testing. All Rights Reserved.

shows as:

Testing© 2012. All Rights Reserved.

Since '.bloginfo('name').' isn’t a native PHP function does it need to be filtered or escaped or something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:58:55+00:00Added an answer on June 3, 2026 at 4:58 am

    That’s becauase bloginfoCodex is an output function. It does output but not return the string. You need a return function, try with adding get_ in front: get_bloginfoCodex.

    Function with get_ at the beginning of their name often return strings instead of outputting them in wordpress, like the get_option function you already use.

    Code-Example:

    if ("" == ($copyright = $options['copyright'])) 
        $copyright = '&copy; '.date('Y').' '.get_bloginfo('name').'. All Rights Reserved.'
        ;                                  # ^^^^ #
    echo $copyright;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In functions php, this works like a charm: <textarea name=menu1anchor id=menu1anchor cols=40 rows=1><?php echo
I just signed up for BlueHost and one of their PHP config options is
I need to override an abstract Block in Magento : app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit/Options/Abstract.php I need to
I've reviewed a couple options for jquery-based RTE that required PHP. I'm running a
I have not changed any of the configuration options for sessions in my php.ini.
I have the following jquery code: jQuery(function(){ jQuery(select#rooms).change(function(){ var options = ''; jQuery.getJSON(/admin/selection.php,{id: jQuery(this).val(),
I'm following this tutorial to create custom Wordpress options the function within theme/functions/admin-menu.php which
I am generating options for my dropdown using // view.php foreach ($plants as $row):
What is in my functions: $var = get_option('to_twitter_feed'); array( name => Twitter Username, desc
This is a PHP problem in WordPress while using a custom theme options panel.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.