Title: How to update code in header
Last modified: August 31, 2016

---

# How to update code in header

 *  Resolved [kobireed](https://wordpress.org/support/users/kobireed/)
 * (@kobireed)
 * [10 years ago](https://wordpress.org/support/topic/how-to-update-code-in-header/)
 * Hello, we’ve updated to new Pro Free plugin!
 * This was our old code in the header. Can you please let me know how to update
   it so it will work with the new updated Plugin?
 * Thank you so much.
 *     ```
       <?php
       				{
       					// AD SERVER LOGIC
       					if (isset($pagename) && $pagename == 'intl') {
       						if(function_exists('drawAdsPlace')) drawAdsPlace(array('id' => 5), array('before' => '<div class="ad">', 'after' => '</div>'));
       					} else {
       						if(in_category('intl', get_the_ID())) {
       							if(function_exists('drawAdsPlace')) drawAdsPlace(array('id' => 5), array('before' => '<div class="ad">', 'after' => '</div>'));
       						} else {
       							if(function_exists('drawAdsPlace')) drawAdsPlace(array('id' => 1), array('before' => '<div class="ad">', 'after' => '</div>'));
       						}
       					}
       					$html = array();
       					echo implode("\n",$html);
       				}
       			?>
       ```
   
 * _[Moderator Note: Please post code & markup between backticks or use the code
   button. Your posted code may now have been damaged by the forum’s parser.]_
 * [https://wordpress.org/plugins/sam-pro-free/](https://wordpress.org/plugins/sam-pro-free/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [minimus](https://wordpress.org/support/users/minimus/)
 * (@minimus)
 * [10 years ago](https://wordpress.org/support/topic/how-to-update-code-in-header/#post-7300035)
 *     ```
       <?php
       	{
       		// AD SERVER LOGIC
       		if (isset($pagename) && $pagename == 'intl') {
       			if(function_exists('samProDrawPlace')) samProDrawPlace(5, null, array('before' => '<div class="ad">', 'after' => '</div>'));
       		} else {
       			if(in_category('intl', get_the_ID())) {
       				if(function_exists('samProDrawPlace')) samProDrawPlace(5, null, array('before' => '<div class="ad">', 'after' => '</div>'));
       			} else {
       				if(function_exists('samProDrawPlace')) samProDrawPlace(1, null, array('before' => '<div class="ad">', 'after' => '</div>'));
       			}
       		}
       		$html = array();
       		echo implode("\n",$html);
       	}
       ?>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘How to update code in header’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sam-pro-free_a48db3.svg)
 * [SAM Pro (Free Edition)](https://wordpress.org/plugins/sam-pro-free/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sam-pro-free/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sam-pro-free/)
 * [Active Topics](https://wordpress.org/support/plugin/sam-pro-free/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sam-pro-free/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sam-pro-free/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * 1 reply
 * 2 participants
 * Last reply from: [minimus](https://wordpress.org/support/users/minimus/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/how-to-update-code-in-header/#post-7300035)
 * Status: resolved