• Morning all,

    I am implementing Matt’s Asides via this fine tutorial -https://fernando.dubtribe.com/archives/2004/10/28/using-matts-asides-with-kubrick/ – but I get a parse error….

    Parse error: parse error, unexpected T_ELSE in /home/public_html/news/wp-content/themes/eo_mrk2/index.php on line 48

    Line 48 is this: ‘<?php } else { ?>’

    This is my full index source.

    https://phpfi.com/62182

    Does it mean I need to add another ‘else’ somewhere?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • as far as I can see you?′re using else twice, line 38 and 48. That won?′t work.

    Thread Starter elyonline

    (@elyonline)

    Is there a way around this?

    You could try removing line 48, I would guess it?′s not needed. Since I haven?′t looked into the code that much I?′m not sure, but that?′s what I would do.

    hold on. Replace <?php } else { ?> with <?php } ?>

    Thread Starter elyonline

    (@elyonline)

    Hi there,

    Thanks for that but it didn’t work.

    Basically I am trying to say if we have 3 posts show them (Asides and other posts) otherwise show older entries as a list.

    Thanks

    Thread Starter elyonline

    (@elyonline)

    Hi,

    Sorry to be a pain but I am no further forward here and my lack of knowledge is evident ??

    I think the problem lies here but not sure how to rectify:

    ‘<?php if ($i < 3) { ?>’

    ‘<?php if (in_category(25) && !$single) { ?>
    <ul class=”asides”>
    <li id=”p<?php the_ID(); ?>”><?php echo wptexturize($post->post_content); echo ‘ ‘; comments_popup_link(‘(0)’, ‘(1)’, ‘(%)’)?> <?php edit_post_link(‘(e)’); ?>

    ‘<?php } else { ?>’

    ‘<h3 class=”wp” id=”post-<?php the_ID(); ?>”>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_title(); ?></h3>’

    ‘<p class=”posted”> Posted <?php the_time(‘D F jS, Y’) ?>, <?php time_of_day ($post->ID);?> by <?php the_author() ?>’

    ‘<?php the_content(‘<span class=”more”>Read full entry</span>’); ?>’

    ‘<p class=”posted”><span class=”file-img”><?php _e(“Filed:”); ?> <?php the_category(‘,’) ?></span> <span class=”comm-img”><?php _e(“Speak:”); ?></span> <?php comments_popup_link(‘Want to reply?’, ‘1 Comment’, ‘% Comments’); ?>’

    ‘<?php } else { ?>’

    ‘<?php if ($displayed == ‘no’) { ?>’

    Full code here: https://phpfi.com/62182

    Thanks ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘unexpected T_ELSE – whats causing this please?’ is closed to new replies.