• Resolved davy27

    (@davy27)


    I just don’t understand it! The following it the code and the link to the page showing the blatant error. Please could somebody help me? I’m losing my mind over re-learning PHP and sussing WP’s way of things.

    <?php
    $my_query = new WP_Query('category_name=portfolio');
    while ($my_query->have_posts()) : $my_query->the_post();
    $do_not_duplicate = $post->ID; ?>
    <h3><a>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?><?php the_excerpt();
    // here is the excerpt function misbehaving!?></a></h3>

    https://www.davy27.neoburn.net

Viewing 3 replies - 1 through 3 (of 3 total)
  • moshu

    (@moshu)

    I don’t see any error on your website and I don’t really understand the “misbehaving” part. Could you, please, elaborate?

    Les Bessant

    (@lesbessant)

    I think it’s this page: https://davy27.neoburn.net/portfolio/

    The reason all the text is appearing as a link is because that’s what the code is telling it to do. Move the closing </a> to before <?php the_excerpt()?> and you should see a change…

    Thread Starter davy27

    (@davy27)

    Moshu, sorry for not elaborating properly, I was v/tired when leaving that post. And very frustrated, too.

    And what if I want the image to be click able? A separate <a></a> wrap?

    LesBessant, thank you for help, but it just shows the same text without it being clickable.

    Umm…I’ve just opened up NotePad++ after a good night’s sleep and found what the problem was! The problem was I put the image url in the excerpt, but I tried putting the image url into the obvious <img src="image.png"> in the optional excerpt and voila!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘the_excerpt not rendering correctly?’ is closed to new replies.