Make sure you’re using the right code. You need to use the type of code that you might paste in your functions.php file, like the kind found on WP-Snippets, WP Snipp and wpfunction.me. You can’t use code that you want to use in your posts.
Thread Starter
masmaz
(@masmaz)
sorry but I did not understand.
I have this code: <? php include (abspath. '/ wp-content/plugins/wp-newsticker/news.php');?>
where should I put it?
regards
max
Thread Starter
masmaz
(@masmaz)
my theme is montezuma, virtual templates
You should be able to add this as a snippet and activate it. However, there is an error in the code. Use this instead:
include_once( WP_CONTENT_DIR . '/plugins/wp-newsticker/news.php' );
Thread Starter
masmaz
(@masmaz)
<? php include_once( WP_CONTENT_DIR . ‘/plugins/wp-newsticker/news.php’ );?>
not work
grrrrr 🙁
Try removing the <?php
and ?>
tags from the beginning and end
Thread Starter
masmaz
(@masmaz)
yes yes I’ve tried it, but it appears the code and nothing else…
What you’re trying to do can’t be done using this plugin. Instead, use the [newsticker]
shortcode in your posts.
Thread Starter
masmaz
(@masmaz)
Yes, of course, that way works fine, but I do not want to put it in the post, does not make sense, I want to put it in front page header
You need to edit your theme’s template files, and put the <?php include_once( WP_CONTENT_DIR . '/plugins/wp-newsticker/news.php' ); ?>
code in one of the files. See http://codex.wordpress.org/Template_Hierarchy#Front_Page_display for more information on which template file to edit.