Title: Miioff's Replies | WordPress.org

---

# Miioff

  [  ](https://wordpress.org/support/users/miioff/)

 *   [Profile](https://wordpress.org/support/users/miioff/)
 *   [Topics Started](https://wordpress.org/support/users/miioff/topics/)
 *   [Replies Created](https://wordpress.org/support/users/miioff/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/miioff/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/miioff/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/miioff/engagements/)
 *   [Favorites](https://wordpress.org/support/users/miioff/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Zip Attachments] Zip Attachments with galleries](https://wordpress.org/support/topic/zip-attachments-with-galleries/)
 *  Thread Starter [Miioff](https://wordpress.org/support/users/miioff/)
 * (@miioff)
 * [12 years ago](https://wordpress.org/support/topic/zip-attachments-with-galleries/#post-4985484)
 * Perfect!
 * I just needed to replace a bit of my old code with this this:
 *     ```
       <?php if ( !post_password_required() ) : ?>
   
       	<?=function_exists('za_show_button') ? za_show_button("Download photos") : ’’?>
   
       <?php endif;?>
       ```
   
 * in the content-single.php -file and now it works!
 * Thanx a lot! 🙂
    Miika
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Zip Attachments] Zip Attachments with galleries](https://wordpress.org/support/topic/zip-attachments-with-galleries/)
 *  Thread Starter [Miioff](https://wordpress.org/support/users/miioff/)
 * (@miioff)
 * [12 years ago](https://wordpress.org/support/topic/zip-attachments-with-galleries/#post-4985472)
 * Oh true! They aren’t!
    I just had to attach them to the posts and now it works!
   Thanx!
 * I have another problem too. I want to show the link only in posts, never in the
   pages. So now my content-single.php looks like this:
 *     ```
       <?php
       /**
        * The template used for displaying page content in page.php
        *
        * @package ThemeGrill
        * @subpackage Accelerate
        * @since Accelerate 1.0
        */
       ?>
   
       <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
       	<?php do_action( 'accelerate_before_post_content' ); ?>
   
       	<header class="entry-header">
       		<h1 class="entry-title">
       			<?php the_title(); ?>
       		</h1>
       	</header>
   
       	<?php accelerate_entry_meta(); ?>
       <?=function_exists('za_show_button') ? za_show_button("Download photos") : ’’?>
   
       	<div class="entry-content clearfix">
       		<?php
       			the_content();
       			wp_link_pages( array(
       				'before'            => '<div style="clear: both;"></div><div class="pagination 	clearfix">'.__( 'Pages:', 'accelerate' ),
       				'after'             => '</div>',
       				'link_before'       => '<span>',
       				'link_after'        => '</span>'
       	      ) );
   
       		?>
   
       	</div>
   
       	<?php do_action( 'accelerate_after_post_content' ); ?>
       </article>
       ```
   
 * But unfortunately most of my posts are protected with password, and now you can
   still download the photos even if you don’t know the password. ([Look at this post.](http://kuvat.kosloff.me/tapahtumat/wanhat-2014/))
   
   So I want to show the download link only in the posts and only if you know the
   password.
 * Is it possible? 🙂
 * Miika

Viewing 2 replies - 1 through 2 (of 2 total)