how to display an excerpt of the latest post on the homepage?

To show the excerpt from the latest post you can use query_posts. Example Query Posts Showing the Latest Post with the Featured Image: <?php query_posts(‘showposts=1’); ?> <?php while (have_posts()) : the_post(); ?> <h3 class=”home link”><a href=”https://wordpress.stackexchange.com/questions/1575/<?php the_permalink(); ?>”><?php the_title(); ?></a></h3> <?php the_post_thumbnail(); ?> <?php the_excerpt(); ?> <?php endwhile; ?> You will need to reset the … Read more

Custom Field IF/ELSE PHP

You mean something like this? $customhref = get_post_meta( $post->ID, ‘_ct_text_4dc9e9f74d000’, true ); if ( $customhref ) { ?> <a href=”https://wordpress.stackexchange.com/questions/16913/<?php echo $customhref; ?>”>Go To Store!</a> <?php } else { echo ‘N/A’; }

get post id using custom filed value

Try something like this $posts = get_posts( array( ‘numberposts’ => -1, ‘meta_key’ => ‘prime’, ‘meta_value’ => ‘yes’ ) ); $post_ids = array(); if ( $posts ) { foreach ( $posts as $post ) { // Push post’s IDs into array array_push( $post_ids, $post->ID ); } } code isn’t tested but it should work. If you … Read more