previous_post_link and next_post_link only on individual post
-
Hi! ??
I own this website,
https://www.runtimecomics.com/ (only +18)
and I have previous_post_link and next_post_link template tags, but they are shown in the homepage and individual posts. How can I do that they only show in individual posts? (not in homepage).
There’s no single.php file in the theme, so I don’t know how to make it…
Any help? Thanks in advance! ??
This is the code of index.php:<?php get_header(); ?> <div id="bd" class="yui-navset"> <div id="yui-main"> <div class="yui-b" > <div class="yui-ge"><div class="yui-u first"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <!-- item --> <!--noshare--> <div class="item entry" id="post-<?php the_ID(); ?>"> <div class="itemhead"> <h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3> <div class="chronodata"><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></div> </div> <div class="storycontent"> <?php the_content('Read more ?'); ?> </div> <small class="metadata"> <span class="category">Archivado en: <?php the_category(', ') ?> <? if(!is_single()) echo "|"; ?> <?php edit_post_link('Edit', '', ' | '); ?> <font face="arial"><font size="3"><b><?php comments_popup_link('?Comenta!', '?1 Comentario!', '?% Comentarios!'); ?></span></b></font></font> <IMG SRC="https://www.runtimecomics.com/botones/bcomenta.gif"> <?php if ( function_exists('wp_tag_cloud') ) : ?> <?php the_tags('<span class="tags">Etiquetas: ', ', ' , '</span>'); ?> <iframe src="https://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=standard&show_faces=false&width=500&action=like&colorscheme=dark" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; padding-top:2px; overflow:hidden; width:650px; height:25px"></iframe> <?php endif; ?><br> <b><?php previous_post_link(); ?></b> <span style="float:right"><b><?php next_post_link(); ?></b></span> </small> </div> <!-- end item --> <?php comments_template(); // Get wp-comments.php template ?> <?php endwhile; ?> <div class="navigation"> <b><font face= arial><font size=4> <div class="alignleft"><?php next_posts_link('? Cómics anteriores') ?></div> <div class="alignright"><?php previous_posts_link('Cómics siguientes ?') ?></div> </font></font></b> </div> <?php else : ?> <h2 class="center">?Joder, no se encuentra la página!</h2> <p class="center">Lo siento, lo que buscas no está aquí. Sigue buscando xD!</p> <?php endif; ?> <!-- end content --> <!-- 2nd sidebar --> </div><!-- end yiu-u --><div class="yui-u" id="third"><?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('rightsidebar') ) : ?><h4>Extra Column</h4><p>You can fill this column by editing the index.php theme file. Or by Widget support.</p><?php endif; ?></div> <!-- end 2nd sidebar --> </div> </div> </div> <div class="yui-b" id="secondary"> <?php get_sidebar(); ?> </div> </div> <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘previous_post_link and next_post_link only on individual post’ is closed to new replies.