• Resolved RaymaN

    (@rayman)


    (First of all, sorry for my bad english) Hi, I recently upgraded my blog to the last version of WordPress, and I have a problem with asides and the tags.

    Im using the asides code for show different posts, but now, when I try to show the tags in the index.php, they not show, but yes in single.php

    I think that is a problem with the loop of index.php and the asides code. What can I do? Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • I’m experiencing the same problem. I’m trying to add tags to my theme and in the single.php they show up but on the index they do not. It’s the same piece of code in each file. I am also using Matt’s inline asides hack.

    The Template Tag, the tags(), must be in The Loop so if your code in your index.php doesn’t have The Loop the you won’t get the tags.

    Thread Starter RaymaN

    (@rayman)

    MichaelH, The Loop of my index.php is different because I use the code for asides, how can I solve this? 🙁

    This is my code from the index.php with the asides hack in it.

    [moderated code here http://wordpress.pastebin.ca/719530 ]

    What needs changing to allow the tags in index.php to show up?

    Thread Starter RaymaN

    (@rayman)

    Nobody knows the solution? 🙁

    Thread Starter RaymaN

    (@rayman)

    I have find the solution!! This is the code of the index.php:

    <?php get_header();?>
    <div id="content">
    <div id="content-main">
    		<?php function stupid_hack($str) {
    				return preg_replace('|</ul>\s*<ul class="asides">|', '', $str);
    				}
    				ob_start('stupid_hack');
    		?>
    		<?php if (have_posts()) : ?>
    		<?php while (have_posts()) : the_post(); ?>
    		<?php if ( in_category(1) && !is_single() ) : ?>
    			<ul class="asides">
    			<li id="p<?php the_ID(); ?>"><?php echo wptexturize(get_the_content(”)); ?><br/>
    			<p class="postmetadata2"><img src="/blog/images/comments.png" align="absmiddle"> <?php comments_popup_link('0', '1','%')?> | <a href="<?php the_permalink(); ?>" title="Permalink: <?php echo wptexturize(strip_tags(stripslashes($post->post_title), '')); ?>" rel="bookmark">#</a> <?php edit_post_link('(edit)'); ?></p></li>
    			</ul>
    			<?php else: // If it's a regular post or a permalink page ?>
    			<div class="post" id="post-<?php the_ID(); ?>">
    				<div class="posttitle">
    					<h2><img src="/blog/images/post.gif"></img> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    				</div>
    				<div class="entry">
    					<?php the_content('Continuar leyendo...'); ?>
    					<?php wp_link_pages(); ?>
    				</div>
    				<div class="postmetadata">
    					<img src="/blog/images/calendar_view_month.png" align="absmiddle"></img> <?php the_time('l, j/m/y') ?> a las <? the_time('G:i') ?> <?php edit_post_link('[Editar]', ''); ?>| <img src="/blog/images/comments.png" align="absmiddle"></img> <?php comments_popup_link('Sin comentarios', '1 Comentario', '% Comentarios'); ?> | <?php akst_share_link(); ?><?php akst_share_form(); ?><br>
    					<img src="/blog/images/folder_page.png" align="absmiddle" /> <?php the_category(', ') ?> | <img src="/blog/images/tag_orange.png" align="absmiddle" /> <?php the_tags('', ', ', ''); ?></div>
    					<?php comments_template(); ?>
    			</div><?php endif; // end if in category ?>
    <?php endwhile; ?><?php endif; ?>
    	<p align="center"><?php if(function_exists('pagination')) pagination(3,array("Anterior","Siguiente")); ?></p>
    </div><!-- end id:content-main -->
    <?php get_sidebar();?>
    <?php get_footer();?>
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Problem with asides and tags’ is closed to new replies.