Scientific Living
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: php if statement makes whole screen go blankOk got it. Thanks!
Forum: Fixing WordPress
In reply to: php if statement makes whole screen go blankHoly cow…thanks for that link to the conditional tags reference. The function is_single ( ‘3970’) did the trick!
Forum: Fixing WordPress
In reply to: php if statement makes whole screen go blankThanks. Well, at least I can now get an if statement that does not make the screen turn blank. For example, the following article still appears:
When I have the code:
<?php the_ID(); $link = 'https://healingresearch.net/get-paid-to-use-unlimited-4g-mobile-service/'; // url link $src = 'https://healingresearch.net/wp-content/uploads/2012/09/solavei-banner-4.jpg'; // image url if(!is_page(3970)){ echo '<img src="'. $src .'" alt="" style="border:none;" />'; } ?>
If don’t know how this was different than other things I tried, but anyway, I’m glad something is displaying.
You can see that I put a print statement just to verify this post has the ID of 3970. I would expect then that on this particular post, the if statement would make sure that image is not displayed. Unfortunately, it is still displaying. Any ideas?
Also, I guess a moderator removed part of the echo statement that used the $link variable to actually make the image link to the page I wanted. Can someone show me how to add that back into the echo statement? It took me longer to figure that out the first time that I would like to admit.
Here is the code of my entire single.php:
<?php get_header(); ?> <div id="wrapper"> <div id="content"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <b> <div class="navigation"> <div class="alignleft">Older <?php previous_post_link('« %link') ?></div> <br> <div class="alignleft">Newer <?php next_post_link('» %link ') ?></div> <div style="clear:both;"></div> </div> </b> <div class="post" id="post-<?php the_ID(); ?>"> <?php the_ID(); $link = 'https://healingresearch.net/get-paid-to-use-unlimited-4g-mobile-service/'; // url link $src = 'https://healingresearch.net/wp-content/uploads/2012/09/solavei-banner-4.jpg'; // image url if(!is_page(3970)){ echo '<img src="'. $src .'" alt="" style="border:none;" />'; } ?> <h2><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php //include('adsense_singlepost_top_banner.php') ?> <div class="entrytext"> <?php include('adsense_singlepost_top_square.php') ?> <?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?> <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?> <div style="clear:both;"></div> <br><br> <b><font size=1> <div class="navigation"> <div class="alignleft">Older <?php previous_post_link('« %link') ?></div> <br> <div class="alignleft">Newer <?php next_post_link('» %link ') ?></div> <div style="clear:both;"></div> </div> </font> </b> <div> <p class="postmetadata alt"> <small> This entry was posted on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>. <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) { // Both Comments and Pings are open ?> <?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) { // Only Pings are Open ?> Responses are currently closed, but you can <a href="<?php trackback_url(true); ?> " rel="trackback">trackback</a> from your own site. <?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) { // Comments are open, Pings are not ?> You can skip to the end and leave a response. Pinging is currently not allowed. <?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) { // Neither Comments, nor Pings are open ?> Both comments and pings are currently closed. <?php } edit_post_link('Edit this entry.','',''); ?> </small> </p> </div> </div> </div> <?php include('adsense_singlepost_bottom_square.php') ?> <?php //include('adsense_singlepost_bottom_banner.php') ?> <?php comments_template(); ?> <?php endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?> </div> <?php get_sidebar(); ?> </div> <?php get_footer(); ?>
Thanks!
DavidForum: Fixing WordPress
In reply to: Rightmost sidebar pushed down by adjacent sidebarnevermind, solved it. I had sidebar at 390px width. Making it super big didn’t work, but making it EXACTLY 410 worked. Beats me…