Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Miioff

    (@miioff)

    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

    Thread Starter Miioff

    (@miioff)

    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.)
    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)