WordPress.org

Ready to get started?Download WordPress

Forums

Code Snippets
[resolved] I did not understand (11 posts)

  1. masmaz
    Member
    Posted 11 months ago #

    hi all

    I installed and activated the plugin, then I entered the code it saved and I activated the snippets ..

    but I did not understand then what should I do ...
    sorry but I have some problems with English ....

    regards
    max

    http://wordpress.org/extend/plugins/code-snippets/

  2. Shea Bunge
    Member
    Plugin Author

    Posted 11 months ago #

    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.

  3. masmaz
    Member
    Posted 11 months ago #

    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

  4. masmaz
    Member
    Posted 11 months ago #

    my theme is montezuma, virtual templates

  5. Shea Bunge
    Member
    Plugin Author

    Posted 11 months ago #

    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' );

  6. masmaz
    Member
    Posted 11 months ago #

    <? php include_once( WP_CONTENT_DIR . '/plugins/wp-newsticker/news.php' );?>

    not work

    grrrrr :-(

  7. Shea Bunge
    Member
    Plugin Author

    Posted 11 months ago #

    Try removing the <?php and ?> tags from the beginning and end

  8. masmaz
    Member
    Posted 11 months ago #

    yes yes I've tried it, but it appears the code and nothing else...

  9. Shea Bunge
    Member
    Plugin Author

    Posted 11 months ago #

    What you're trying to do can't be done using this plugin. Instead, use the [newsticker] shortcode in your posts.

  10. masmaz
    Member
    Posted 11 months ago #

    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

  11. Shea Bunge
    Member
    Plugin Author

    Posted 10 months ago #

    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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.