Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Adam Capriola

    (@adamcapriola)

    If you don’t much very much about html or coding, you should probably find a developer to add the code for you. Your theme’s files likely need to be edited.

    Thread Starter lazyorganizer

    (@lazyorganizer)

    I think I can add it myself if you would just tell me where to put it.

    Is it single.php and page.php?

    Does the code look like this?

    <?php get_post_meta( $post->ID, 'views', true );  ?>


    If this is my code for single.php, where does it go?

    get_header(); ?>
    
    	<div id="primary" class="site-content">
    		<div id="content" role="main">
    
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<?php get_template_part( 'content', get_post_format() ); ?>
    
    				<nav class="nav-single">
    					<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>
    					<span class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentytwelve' ) . '</span> %title' ); ?></span>
    					<span class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentytwelve' ) . '</span>' ); ?></span>
    				</nav><!-- .nav-single -->
    
    				<?php comments_template( '', true ); ?>
    
    			<?php endwhile; // end of the loop. ?>
    
    		</div><!-- #content -->
    	</div><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    Plugin Author Adam Capriola

    (@adamcapriola)

    You can try putting this above comments_template:

    <?php get_post_meta( get_the_ID(), 'views', true ); ?>

    I don’t know where you want it positioned though. You’ll have to move it around until you get it where you want it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Help With Code’ is closed to new replies.