Combination of two php code
-
Hello,
I’m sure it can be very easy for some of you.
I need the combine two codes below:
It calls all posts of an author:
<?php $current_author = get_query_var('author'); $author_posts= get_posts( 'author='.$current_author.'&posts_per_page=-1' ); if($author_posts){ foreach ($author_posts as $author_post) { echo '<li><a href="'.get_permalink($author_post->ID).'">'.$author_post->post_title.'</a></li>'; } } ?>And it calls an image of custom field of every posts of an author:
<a href= "<? the_permalink(); ?>" title="<? the_title(); ?>"><img src="<? echo get_post_meta($post->ID, 'kapakliste', true) ?>" /></a>But the second code calls only five images. I need all.
All answers will be appreciated.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Combination of two php code’ is closed to new replies.