• Resolved julesibulesi

    (@julesibulesi)


    Hi everyone.

    I’m using ‘category posts’ to display my latest projects on the front page. Now, my projects posts consist mainly of custom fields to display the project title, type, job description etc. I would like to display some of those fields in the category post widget (while NOT showing the excerpt) and have been wondering how it can be done.

    Stripping some of the fields while displaying others is not the problem, I just can’t figure out how I’d have to alter the code and where I’d have to put it in the plugin to make it work. I’d appreciate if someone could shed some light here.

    Thanks a lot.
    Jules

    https://www.ads-software.com/extend/plugins/category-posts/

Viewing 2 replies - 1 through 2 (of 2 total)
  • i would assume that the area you would need to edit starts at line 70 and goes to line 97

    <li class="cat-post-item">
    			<a class="post-title" href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
    
    			<?php
    				if (
    					function_exists('the_post_thumbnail') &&
    					current_theme_supports("post-thumbnails") &&
    					$instance["thumb"] &&
    					has_post_thumbnail()
    				) :
    			?>
    				<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
    				<?php the_post_thumbnail( 'cat_post_thumb_size'.$this->id ); ?>
    				</a>
    			<?php endif; ?>
    
    			<?php if ( $instance['date'] ) : ?>
    			<p class="post-date"><?php the_time("j M Y"); ?></p>
    			<?php endif; ?>
    
    			<?php if ( $instance['excerpt'] ) : ?>
    			<?php the_excerpt(); ?>
    			<?php endif; ?>
    
    			<?php if ( $instance['comment_num'] ) : ?>
    			<p class="comment-num">(<?php comments_number(); ?>)</p>
    			<?php endif; ?>
    		</li>
    Thread Starter julesibulesi

    (@julesibulesi)

    Just figured it out, but thanks! You’re right, putting in the code right after
    <li class="cat-post-item">
    does the trick. I guess my website is almost good to go now. ??

    Thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Category Posts Widget] Showing excerpt and post-meta – how?’ is closed to new replies.