- This topic is empty.
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- The forum ‘Other’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
working with a theme that shows homepage blog post on the homepage towards the bottom just above the signup for newsletter section.
http://inkthemes.com/wptheme/blackbird-interior/
The homepage section shows everything from the blog, I need to be sure passworded posts do not show at all. The theme options panel only has off or on for that section.
Solution options are to show only a certain category like Featured-News, or to add something to exclude the passworded posts.
Right now a password posts appears with the text asking for the password.
Thanks for any suggestions guidance and/or code suggestions.
$home_page_blog = inkthemes_get_option(‘inkthemes_home_blog_option’);
$home_page_blog_on = “on”;
if ($home_page_blog === $home_page_blog_on) {
?>
$args = array(
‘post_status’ => ‘publish’,
‘posts_per_page’ => -1,
‘caller_get_posts’ => 1,
‘order’ => ‘DESC’
);
$query = new WP_Query($args);
$count=0;
?>
have_posts()) : $query->the_post(); ?>
$content = $post->post_content;
$searchimages = ‘~]* />~’;
/*Run preg_match_all to grab all the images and save the results in $pics*/
preg_match_all( $searchimages, $content, $pics );
// Check to see if we have at least 1 image
$iNumberOfPics = count($pics[0]);
if (($iNumberOfPics > 0) && ($count <5) ){
$count++;
?>
}
endwhile;
?>
// Reset Query
wp_reset_query();
?>