Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Zaiquiri

    (@zaiquiri)

    Sorry, I was just a little resistant because there’s some other stuff going on here that might muddle the issue. But I’m pasting the entire section I’m working on. I appreciate any insight you might be able to offer.

    <ul>
                      <?php
    
                       $tags = wp_get_post_tags($post->ID);
                       if ($tags) {
                       $first_tag = $tags[0]->term_id;
                       $args=array(
                       'tag__in' => array($first_tag),
                       'post__not_in' => array($post->ID),
                       'showposts'=>5,
                       'caller_get_posts'=>1
                       );
    
                       $my_query = new WP_Query($args);
                       if( $my_query->have_posts() ) {
                       while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
                                <li>
    
                               <?php
                                foreach((get_the_category()) as $category) {
                                    echo $category->cat_name . ' ';
                                }
                                ?></li>
    
                            <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
                       <?php the_title(); ?></a>
                            <br />
    
                                <span class="single-post-issue-content-author">
                                <?php
                                        $key="Author";
                                        $themeta = get_post_meta($post->ID, $key, TRUE);
                                        if($themeta != '') {
                                        echo get_post_meta($post->ID, $key, true);
                                        } else {
                                        the_author();
                                        }
                                        ?>
                                </span>
                            </li>
    
                       <?php endwhile; }
                       wp_reset_query();
                       }
                       ?>
                            </ul>
    Thread Starter Zaiquiri

    (@zaiquiri)

    I’m developing my own theme. The code is just listing posts assigned to a tag, and I’m including the function to retrieve the category name. It’s very basic, not even worth pasting here.

    I’m using WP_Query.

    You mean swipebox.min.css. And thank you!

Viewing 3 replies - 1 through 3 (of 3 total)