• How do I show the attachment (photo) to the last entry in each category, ie not recently added to the system, but added to an entry in this category.

    Thank you in advance for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • i have the same problem

    i tryed
    <?php echo(get_category_parents($cat, TRUE, ‘ » ‘)); ?>
    and
    <?php echo get_the_category($post->post_parent) ?>
    it didn`t work

    Thread Starter papajas

    (@papajas)

    I have such a thing, but I want to get a direct link to the jpg, I want to open this picture in the window .. now shows only the image size specified in the file: function.php

    my code:

    $args = array(
    ‘cat’ => 21,
    ‘showposts’ => 1,
    ‘orderby’ => ‘modified’
    );
    query_posts($args);
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    echo ‘<h2 class=”widgettitle”>Rysunek dnia</h2>’;
    echo get_the_post_thumbnail($post->ID, ‘rysunekdnia’);
    // if(has_post_thumbnail()) the_post_thumbnail(‘rysunekdnia’);
    endwhile; else: endif;
    wp_reset_query();

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘View Attachment of entry category’ is closed to new replies.