• I have wordpress installed in a sub-folder /members area which is password protected using htaccess/apache. I have a non wordpress page in the root which I’m pulling the featured images to. The problem is it’s giving the popup login prompt. Anyone know how to get around that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • What code or method are you using to pull the featured images to your static html page?

    Thread Starter bcyber

    (@bcyber)

    Here’s what I’m doing.

    At the top of body –

    <?php include 'path/to/members/wp-load.php'; ?>

    This is how I’m getting the featured images.

    <?php   $do_not_duplicate = array(); ?>
    				<?php   $mosaics = new WP_Query('posts_per_page=1'); ?>
    				<?php   while ($mosaics->have_posts()) : $mosaics->the_post(); ?>
    				<?php   $do_not_duplicate[] = $post->ID; ?>
    
    				 <?php 
    
    if (class_exists('MultiPostThumbnails')) : 
    
    MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'tour-thumb', NULL,  'post-tour-thumb-thumbnail');
    
    endif;
    
    ?>
    				<?php   endwhile; wp_reset_postdata(); ?>
    
    				</p>
    
    		 		<hr>
    		 		<p><?php   $mosaics = new WP_Query( array( 'posts_per_page' => 1, 'post__not_in' => $do_not_duplicate ) ); ?>
    <?php   while ($mosaics->have_posts()) : $mosaics->the_post(); ?>
    <?php   $do_not_duplicate[] = $post->ID; ?>
    				 <?php 
    
    if (class_exists('MultiPostThumbnails')) : 
    
    MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'tour-thumb', NULL,  'post-tour-thumb-thumbnail');
    
    endif;
    
    ?>
    <?php   endwhile; wp_reset_postdata(); ?></p>
    Moderator bcworkz

    (@bcworkz)

    Add another .htaccess file to the uploads folder that contains “Satisfy any”. This does mean anyone with the correct URL can access any uploads files without a password. You can’t have your cake and eat it too.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Grab featured images from members area?’ is closed to new replies.