WordPress.org

Ready to get started?Download WordPress

Forums

First time WP - Difficulty Creating Portfolio Site (4 posts)

  1. a.saliga
    Member
    Posted 4 years ago #

    I've taken the on the task of re-designing our company website and I've decided to move it out of an all Flash environment and use WP's backend as a custom CMS. The fun part is that this is my first experience with WP.

    I work for a video production company, so this site is essentially a portfolio. To explain in greater detail, I have a custom page template for the "Motion Design" content. I've successfully coded this "Page" to gather all "Posts" within the "motion_design" category and display only the thumbnails (from a custom field). When a thumbnail is clicked, it loads a custom "single" template that displays the video and it's info.

    What I can't figure out how to add a next and previous button. For example, when the user clicks on "Motion Design" they see 9 thumbnails that correspond to videos (actually, videos embedded in posts with the category of "motion_deisgn") There are more than 9 videos, and don't want to use a scroll bar.

    I guess what I'm looking for is the PHP to get next/previous posts of a certain category, but continue to only display these thumbnail images that are pulled from a custom field.

    Thanks for your help, I apologize if this is very simple. I searched the forums, but couldn't find what I needed as this is a very specific scenario.

    -Andrew

  2. Jeremy Clark
    Moderator
    Posted 4 years ago #

    Basically what you need is the post_nav_link function.
    http://codex.wordpress.org/Next_and_Previous_Links

  3. a.saliga
    Member
    Posted 4 years ago #

    Basically. I'm having difficulty getting this to function as I need though. Below is the PHP I have in my page template for the "Motion Design" category.

    <?php query_posts('showposts=9&cat=12'); ?>
    <?php while (have_posts()) : the_post(); ?> 
    
    <div id="media">
    
    <div>
    <?php
    $thumbPath = get_post_meta($post->ID, 'thumb', true);
    if ($thumbPath) { ?>
    
    <a class="thumb" href="<?php the_permalink() ?>" >
    <img src="<?php echo $thumbPath ?>" alt="_thumbnail missing" width="150" height="84" />
    </a>
    
    <?php } ?>
  4. a.saliga
    Member
    Posted 4 years ago #

    Oops. and the loop close and div close.

    </div>
         </div>
    <?php endwhile; ?>
    </div>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.