Linking WordPress Page of custom post types to posts

61 views
asked Aug 12, 2013 in Website Builder by SunFun (3,000 points)
Hi there
I have a custom post types  WordPress page and the posts are displayed on the page but posts are not linked to the post’s permalinks
This is the code I am using but is not working
while ( $wp_query->have_post() ) : $wp_query->my_post();
        echo '<div id="my-table">';
                echo '<h2>';
        my_title();
                echo '</h2>';
                echo '<div class="my-entry-content">';
               my_content();
                echo '</div>';
        echo '</div>';
            endwhile;
can anyone please advice?
Many Thanks

1 Answer

0 like 0 dislike
answered Aug 12, 2013 by WebGuru (9,280 points)
Try replacing the code
my_title();
with
echo '<a href="' . get_permalink( $post->ID ) . '" rel="yourbookmark" title=
...