Jump to content

Recommended Posts

I was trying to get adsense ads to appear in each post so I started playing with the single.php file.

 

Now all of my "single posts" are out of alignment and bleed off the screen.

 

Can anyone tell me where I went wrong, fix the code for me and tell where I insert the adsense code so ads will appear at the very bottom center of each post? I also have some dishes that need doing so if you are near by.....

 

Just kidding about the dishes. My site is www.jenecho.com/blog

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/240272-wordpress-singlephp/
Share on other sites

I think the question was more along the lines of, "How do I navigate to the single posts, which you've identified as the thing you're wanting help with after I've clicked on the link you provided, so that I may see firsthand the problem you've described and perhaps get a better understanding of what it is that needs to be fixed, along with possibly viewing the HTML source of the page in question since that is likely where any formatting problem would reside?"

 

And FYI, most people will not down load an attached file. You're better off to post the relevant part of the code within

 . . . 

tags.

Link to comment
https://forums.phpfreaks.com/topic/240272-wordpress-singlephp/#findComment-1234173
Share on other sites

Oh of course.

 

I thought you had looked as you reference to the footer seemed almost telepathic.

 

Go to  http://www.jenecho.com/blog/?p=232   

 

The text continues off the right side of the page and the footer too has extended way past the edge.

 

Chances are I have played with the footer too.

 

Link to comment
https://forums.phpfreaks.com/topic/240272-wordpress-singlephp/#findComment-1234174
Share on other sites

OK here is the single.php. I think it contains an error that is making everything move off the right hand side of the screen. It is also affecting the footer illustrated here. http://www.jenecho.com/blog/?p=179

 

SINGLE.PHP FILE

<?php get_header(); ?>
<div id="main">
<div id="content" class="posts"><div class="inset">

<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
	<div class="post" id="post-<?php the_ID(); ?>">
	<div class="snapshot"><?php the_time('m') ?>.<?php the_time('j') ?><br /><span class="gray"><?php the_time('y') ?></span></div>
	<h2><?php the_title(); ?></h2>
	<h5> by <?php the_author() ?> ·</h5>

	<div class="entry">
<table border=”0? width=”302? id=”table1? cellspacing=”3? cellpadding=”3? height=”252? align=”left”>
<tr>
  <td>
<?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?>

			<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
			<?php the_tags( '<p>Tags: ', ', ', '</p>'); ?>

			<p class="postmetadata alt">
				<small>
					This entry was posted
					<?php /* This is commented, because it requires a little adjusting sometimes.
						You'll need to download this plugin, and follow the instructions:
						http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
						/* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?>
					on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
					and is filed under <?php the_category(', ') ?>.
					You can follow any responses to this entry through the <?php post_comments_feed_link('RSS 2.0'); ?> feed.

					<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
						// Both Comments and Pings are open ?>
						You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(); ?>" rel="trackback">trackback</a> from your own site.

					<?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(); ?> " 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>

<?php comments_template(); ?>

<?php endwhile; else: ?>

	<p>Sorry, no posts matched your criteria.</p>

<?php endif; ?>

	<div class="navigation">
		<div class="alignleft"><?php previous_post_link('« %link') ?></div>
		<div class="alignright"><?php next_post_link('%link »') ?></div>
	</div>


	</div><!-- inset --></div><!-- content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

Link to comment
https://forums.phpfreaks.com/topic/240272-wordpress-singlephp/#findComment-1234176
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.