WordPress.org

Ready to get started?Download WordPress

Forums

where to add code in single.php and index.php (6 posts)

  1. Madshallas
    Member
    Posted 5 years ago #

    Hi

    Im have installed Vote it up, but need to add code in my single.php and index.php to make it work.

    i found them in editor under appearance, but where should i copypaste the code?

    <?php DisplayVotes(get_the_ID()); ?>

    all the best
    Mads Hallas

  2. Dagon Design
    Member
    Posted 5 years ago #

    If you want it to display right after the post content, just look for a line that mentions 'the_content' and add it after. It really just depends on the theme though.

  3. Madshallas
    Member
    Posted 5 years ago #

    cool that worked in the single.php :)

    but where should i put it in the index.php

  4. Dagon Design
    Member
    Posted 5 years ago #

    index.php should have a similar function in there - if not, what do you have in there?

  5. Madshallas
    Member
    Posted 5 years ago #

    <?php get_header(); ?>

    <div id="centercol" class="grid_10">
    <?php if (get_option('woo_show_blog') == false) { ?>

    <?php include(TEMPLATEPATH . '/includes/featured.php'); ?>

    <?php

    $layout = get_option('woo_layout');

    include('layouts/'.$layout);

    ?>

    <?php } else { include(TEMPLATEPATH . '/includes/stdblog.php'); } ?>

    </div><!--/centercol-->

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

  6. Dagon Design
    Member
    Posted 5 years ago #

    That structure is a bit different than that of a standard template. It seems to be referencing another file for the layout - from that code I cannot tell which file from the 'layouts' directory it is referencing - perhaps it is in the options? But you could try looking through that folder.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags