Title: shortcodes do not work, why??
Last modified: August 22, 2016

---

# shortcodes do not work, why??

 *  [tommls](https://wordpress.org/support/users/tommls/)
 * (@tommls)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/shortcodes-do-not-work-why/)
 * Am trying to use this plugin with the following:
    <?php if(function_exists(‘chi_get_header_image_url’)){
   chi_get_header_image_url(); } echo chi_get_header_image_url(); ?>
 *  <div id=”header_image”> <img src=”<?php if (function_exists(‘chi_get_header_image_url’))
   echo chi_get_header_image_url(); ?>”> <h1><?php the_title(); ?></h1></div>
 *  <div id=”header_image”> <img src=”[image_url]”> <h1><?php the_title(); ?></h1
   ></div>
 * None of these work properly, why??
 * The plugin’s ‘settings’ page does not allow blank for height or width, only 0(
   zero), and the plugin IS enabled. I have url values specified for the home page
   but the desired header image does not appear…
 * Thank you, Tom
 * [https://wordpress.org/plugins/custom-header-images/](https://wordpress.org/plugins/custom-header-images/)

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

 *  Thread Starter [tommls](https://wordpress.org/support/users/tommls/)
 * (@tommls)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/shortcodes-do-not-work-why/#post-5630012)
 * actually the only way I could get this to work was with the ‘standard’ code, 
   none of the other function calls work, nor do the shortcodes…very puzzling why
   this plugin works sometimes and not other times…
 *  [dotmagic](https://wordpress.org/support/users/dotmagic/)
 * (@dotmagic)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/shortcodes-do-not-work-why/#post-5630137)
 * You have some obviously mistakes in your code. It really sucks you blame other
   peoples and her (free!) work if you don’t even know the basics.
 * `<?php if(function_exists('chi_get_header_image_url')) { chi_get_header_image_url();}
   echo chi_get_header_image_url(); ?>`
 * This will work aslong u enabled the plugin, but you call the `chi_get_header_image_url()`
   function twice and the first is ignored because you don’t output the returning
   result.
 * Just do the following and it won’t throw a error if the plugin is disabled:
    `
   <?php if(function_exists('chi_get_header_image_url')) { echo chi_get_header_image_url();}?
   >`
 * The shortcode is only to customize the output of the header, its not a replacement
   for the PHP Code!

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

The topic ‘shortcodes do not work, why??’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-header-images.svg)
 * [Custom Header Images](https://wordpress.org/plugins/custom-header-images/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-header-images/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-header-images/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-header-images/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-header-images/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-header-images/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [dotmagic](https://wordpress.org/support/users/dotmagic/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/shortcodes-do-not-work-why/#post-5630137)
 * Status: not resolved