Title: php code not work
Last modified: August 21, 2016

---

# php code not work

 *  [masmaz](https://wordpress.org/support/users/masmaz/)
 * (@masmaz)
 * [13 years ago](https://wordpress.org/support/topic/php-code-not-work/)
 * I all
 * I insert the php code in my heather theme, but che newsticker not work, not see
   in the front page…
 * `<?php include (ABSPATH . '/wp-content/plugins/wp-newsticker/news.php');?>`
 * why??
    regards max
 * [http://wordpress.org/extend/plugins/wp-newsticker/](http://wordpress.org/extend/plugins/wp-newsticker/)

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

 *  [David Sullivan](https://wordpress.org/support/users/sullivandavid/)
 * (@sullivandavid)
 * [13 years ago](https://wordpress.org/support/topic/php-code-not-work/#post-3757924)
 * masmax,
 * Where did you insert this code? Did you insert it into the page content, or did
   you use an editor to insert it into the page template’s source? The latter is
   what you do if you are editing the template.
 * If you just want the news ticker to show up in your page’s content, then place
   the shortcode [newsticker] in your page content where you want it displayed.
 * DS
 *  Thread Starter [masmaz](https://wordpress.org/support/users/masmaz/)
 * (@masmaz)
 * [13 years ago](https://wordpress.org/support/topic/php-code-not-work/#post-3757927)
 * I DS
 * I tried adn also put it on other pages. php site but not seen
 * if I insert the shortcode [ticker] in my page content, you see.
 * I do not understand why it’s so … and yet there must be a solution
 * i insert the code in this page index.php
 *     ```
       <div id="banner-bg" class="cf">
         	<div id="banner" class="row">
                   <script type="text/javascript"><!--
       google_ad_client = "ca-pub-2171832733352315";
       /* headernonavevodubbi */
       google_ad_slot = "5766175822";
       google_ad_width = 468;
       google_ad_height = 60;
       //-->
       </script>
       <script type="text/javascript"
       src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
       </script>
                   	<div id="logo-area" class="col5">
               <!--file logo-->
                     <a href="http://www.nonavevodubbi.it"><img src="http://www.nonavevodubbi.it/wp-content/themes/montezuma/images/logo.png" title="nonavevodubbi.it" alt=" Non Avevo Dubbi"/>
       			<!--<<?php bfa_if_front_else( 'h1', 'h3' ); ?> id="sitetitle">
       				<a href="<?php echo home_url(); ?>"><?php bloginfo( 'name' ); ?></a>
       			</<?php bfa_if_front_else( 'h1', 'h3' ); ?>>
       			<p id="tagline"><?php bloginfo( 'description' ); ?></p>-->
       		</div>
       		<?php wp_nav_menu( array(
       			'container' => 'nav',
       			'container_class' => 'menu-wrapper col7',
       			'container_id' => 'menu1-wrapper',
       			'menu_id' => 'menu1',
       			'menu_class' => 'cf menu',
       			'theme_location' => 'menu1',
       			'fallback_cb' => 'bfa_page_menu'
       		) ); ?>
       	</div>
       </div>
   
       <a href="<?php bloginfo( 'rss2_url' ); ?>" class="rsslink" title="<?php _e( 'Subscribe to RSS Feed', 'montezuma' ); ?>"></a>
   
       <div id="breadcrumbs1-bg">
       	<nav id="breadcrumbs1" class="breadcrumbs lw">
       		<?php bfa_breadcrumbs( 'breadcrumbs1' ); ?>
             	</nav>
           </div>
         <?php include ('/wp-content/plugins/wp-newsticker/news.php');?>
       ```
   
 * regards
    max
 *  [emereuwa](https://wordpress.org/support/users/emereuwa/)
 * (@emereuwa)
 * [13 years ago](https://wordpress.org/support/topic/php-code-not-work/#post-3757928)
 * what theme are you using?
 *  Thread Starter [masmaz](https://wordpress.org/support/users/masmaz/)
 * (@masmaz)
 * [13 years ago](https://wordpress.org/support/topic/php-code-not-work/#post-3757929)
 * montezuma
 * [http://forum.bytesforall.com/](http://forum.bytesforall.com/)
 *  [emereuwa](https://wordpress.org/support/users/emereuwa/)
 * (@emereuwa)
 * [13 years ago](https://wordpress.org/support/topic/php-code-not-work/#post-3757969)
 * I added the file to the head.php file and it displayed.
    So where exactly do 
   you want it displayed?
 * The best approach is to create a physical file and put your code in it.
    The 
   theme works on a virtual templating system and the documentation says You cannot
   use arbitrary PHP code.
 *  Thread Starter [masmaz](https://wordpress.org/support/users/masmaz/)
 * (@masmaz)
 * [13 years ago](https://wordpress.org/support/topic/php-code-not-work/#post-3757972)
 * I created a php file, I put in the code, then I called the
    `<? php include ("
   namefile.php") /?>`
 * but does not work
 * please, can you explain me with an example?

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

The topic ‘php code not work’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-newsticker.svg)
 * [WP-Newsticker](https://wordpress.org/plugins/wp-newsticker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-newsticker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-newsticker/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-newsticker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-newsticker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-newsticker/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [masmaz](https://wordpress.org/support/users/masmaz/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/php-code-not-work/#post-3757972)
 * Status: not resolved