Support » Plugins » Read more post help

  • Hey guys! I recently created a portfolio CPT (my first ever Custom Post type) for my WordPress theme. Like many portfolio’s mine has a grid based layout, with each section having the post’s featured image and an excerpt of the text.

    However, when I want the text to display the full post (by clicking ‘more’) I get a link to the whole featured image, not the post.

    The link has the following code
    <a title="<?=$title?>: <?=$desc?>" rel="lightbox[work]" href="<?php print portfolio_thumbnail_url($post->ID) ?>">(more)</a>

    I’m pretty sure i need to change the:


    But I’m not sure what to?

    This is probably quite easy, but I’m a beginner with php and wordpress, as I said it’s my first Custom Post type.

    Thanks a lot!


Viewing 4 replies - 1 through 4 (of 4 total)
  • try changing

    <?php print portfolio_thumbnail_url($post->ID); ?>


    <?php the_permalink(); ?>

    I told you it’s simple! Thanks It worked.

    One thing though, If i wanted to place the image (which was set as a featued image for CPT, as an example for the portfolio) On the permalink page, how would I do it?

    You just have to call that image with something like this (this is from my portfolio page)

    <?php if (has_post_thumbnail($post->ID))
    	the_post_thumbnail( 'thumbnail' );
    	echo '<img src="' . bloginfo( 'template_url' ) . '/images/mix-of-sites.png" alt="picture" />';

    That code checks does your post have featured image
    – if yes, display thumbnail size of it
    – if not, display ‘mix-of-sites.png’ from images folder
    That code is inside the loop of my portfolio-page.php, which is set up to display only portfolio items.
    Hope that makes sense. 🙂

    Wow, sorry for late reply.

    I think there might be an issue with that snippet. It prints my images url as text instead of into the html.

    Also should i put it in page.php, or single.php? As that’s where my portfolio defaults to once you click an item.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Read more post help’ is closed to new replies.