WordPress.org

Forums

Related Posts via Taxonomies
[resolved] Further customizing (2 posts)

  1. breathelifein
    Member
    Posted 2 years ago #

    I'm using this plugin on a media website, to show related videos and such. It works great, but I was wondering if/how I could customize it further to match the rest of the website's content.
    For instance, I have a "latest videos" (that's simply the latest posts) and "featured" (a few videos I choose using the Featured Post With Thumbnail plugin), and both of them (as well as the archives) use this code to show the posts:

    <span class="title">(e.g.)Latest videos:</span>
    <p align="center"><div class="newsmain">
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    
    <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td>
    	<img src="<?php echo get_option('home'); ?>/wp-content/uploads/thumbs/<?php $key="file_name"; echo get_post_meta($post->ID, $key, true); ?>.png"/>
    </td><td>
    	<span class="h3"><a href="<?php echo get_permalink() ?>" rel="bookmark" <?php the_title(); ?>><?php the_title(); ?></a></span>
    	<?php the_excerpt(); ?>
    	<p><strong>Views:</strong> <?php $key="pvc_views"; echo get_post_meta($post->ID, $key, true); ?><br />
    	<strong>Duration:</strong> <?php $key="duration"; echo get_post_meta($post->ID, $key, true); ?><br/>
    	<strong>Sent:</strong> <?php the_time('d m Y'); ?><br /></p>
    </td></tr></table>
    
    <?php endwhile; ?>
    <?php endif; ?>
    </div></p>

    Since it's a media website, I only post videos and audio files. The excerpt is a brief explanation of the video when you see it as a list, but not on the post itself. So, there's no thumbnail (why this topic didn't do me much good). I have to use this code <?php echo get_option('home'); ?>/wp-content/uploads/thumbs/<?php $key="file_name"; echo get_post_meta($post->ID, $key, true); ?> to get a image for each post. The thing is, whenever I try putting this into the plugin settings, it doesn't work. I did manage to get the ~overall~ look (class="newsmain", class="h3", even the table, and whatnot), but none of the php works.
    I tried editing the related-posts-via-taxonomies.php, but couldn't make it work.

    Could anyone help me out? I mean, is it at lest possible?
    If needed, this is the website: http://stanakaticbrasil.com/midias/ (don't mind the mess, I'm still testing it)

    http://wordpress.org/extend/plugins/related-posts-via-taxonomies/

  2. breathelifein
    Member
    Posted 2 years ago #

    Nevermind, found another plugin that allows me this kind of customization.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Related Posts via Taxonomies
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic