• Hello everybody! How can I use the_permalink in stead of the fancybox (line 11)? I tried everything I found in the Codex but could not solve the problem.

    <?php if (mytheme_option('recent_works', TRUE)) { ?>
    <div id="recent-works">
    <h1 class="title"><?php echo mytheme_option('recent_works_title', '?') ?></h1>
    <ul id="portfolio-items" class="clearfix">
    <?php
    query_posts(array('post_type' => 'portfolio', 'posts_per_page' => mytheme_option('recent_works_count', 4)));
    $count = 1;
    while (have_posts()) {
    the_post();
    echo '<li class="' . (!($count++ % 4) ? 'last' : '') . '">';
    echo '<a href="' . wp_get_attachment_url(get_post_thumbnail_id()) . '" class="fancybox">';
    echo the_post_thumbnail('recent');
    echo '</a>';
    echo '<span class="title">';
    the_title();
    echo '</span>';
    echo '<span class="cat">';
    echo get_the_category_list();
    echo '</span>';
    echo '</li>';
    }
    ?>
    </ul>
    </div>
  • The topic ‘Finding a way to use the_permalink’ is closed to new replies.