Results 1 to 2 of 2

Thread: Pop-Up not working on posts only home page and archive pages.

  1. #1

    Pop-Up not working on posts only home page and archive pages.

    Hello,

    I have a "daily tip" custom post type and I use the following code to display the most recent post in my sidebar (below).
    The pop up only shows up on the home page, and archive pages, not on posts.

    I remove the code and everything works fine again.

    Do I need to use different code for this purpose? or is there something I can change to make everything work?

    thank you!


    my site is: http://photoshoptrainingchannel.com


    Code:
    <div class="sidebar_tip_day widget">
    <div class="widget-wrap">
    <div class="in_page_tip_day">
    
    <?php
    $args = array( 'post_type' => 'tip_of_the_day', 'posts_per_page' => 1 );
    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post();
    	echo '<div class="tip-content">';
    	echo '<div class="page_tip_date">';
    	echo '<a href="';
    	echo the_permalink();
    	echo '"/>';
    	echo the_date();
    	echo '</a> ';
    	echo '</div>';
    	
    	echo '<h4>Tip Of The Day</h4>';
    	the_content();
    	echo '</div>';
    	
    	echo '<div class="tip_facebook">';
      	echo '<div class="fb-like" data-href="';
      	echo the_permalink();
      	echo '" data-send="false" data-layout="button_count" data-width="95" data-show-faces="false"></div>';
    	echo '</div>';
    	
    	echo '<div class="tip_google">';
        echo '<g:plusone href="';
        echo get_permalink($postid);
    	echo '" size="medium"></g:plusone></div>';
    
    	echo '<div class="tip_twitter"> <a href="http://twitter.com/share" class="twitter-share-button" data-url="';
    	echo the_permalink();
    	echo '" data-count="horizantal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>';
    	
    	endwhile;
    ?>
    
    
    </div>		 
    <div class="tip_outro"><p>Click the social share buttons above &uarr; <br/>if you liked today's <a href="http://photoshoptrainingchannel.com/tips/" title="Click Here To See Past Tips Of The Day">Tip of The Day!</a></p></div>
    </div>
    
    </div>

  2. #2
    WPS Team
    Join Date
    Feb 2012
    Location
    Canillo, Andorra
    Posts
    284
    Hi,

    Is it posible for you to activate your "daily tip" for a moment just for me to see the issue on live ?

    Say me when you activate it

    Regards,

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •