WordPress.org

Ready to get started?Download WordPress

Forums

WP-Newsticker
php code not work (7 posts)

  1. masmaz
    Member
    Posted 11 months ago #

    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/

  2. David Sullivan
    Member
    Posted 11 months ago #

    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

  3. masmaz
    Member
    Posted 11 months ago #

    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

  4. emereuwa
    Member
    Posted 11 months ago #

    what theme are you using?

  5. masmaz
    Member
    Posted 11 months ago #

  6. emereuwa
    Member
    Posted 11 months ago #

    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.

  7. masmaz
    Member
    Posted 11 months ago #

    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?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.