• I keep getting this error, no matter how my index is saved. It always says this. Always line 45. It doesn’t seem to matter what is actually on that line….

    Parse error: syntax error, unexpected T_STRING in /f5/zeroplot/public/wp-content/themes/zeroplot/index.php on line 45

    The address is http://zeroplot.nfshost.com/
    and any help would be greatly appreciated. I know html, css, and even a little C++, but I can’t seem to ever get php working… 🙁

    snippet: (the index.php referenced above… I know that the main section of the page is kinda screwed up, but I was following a wordpress tutorial and I think it still works – I just need to see what it looks like so I can ‘tweak’ it)

    <?php get_header(); ?>
    
    <div class="updates_border" style="margin-top:80px;">
    
    	<div class="updates">
    
    		<div class="headtype">
    
    			Header!
    
    		</div>
    
    		<div class="datetype">
    
    			20/10/10
    
    		</div>
    
    		Hi this is a test this is a test is a test a test test est st t Hi this is a test this is a test is a test a test test est st t Hi this is a test this is a test is a test a test test est st t Hi this is a test this is a test is a test a test test est st t
    	</div>
    
    </div>
    
    <?php while(have_posts()) : the_post(); ?>
    <div class="post">
    	<div class="title">
    		<h2><a href="<?php the_permalink(); ?> "><?php the_title(); ?></a></h2>
    	</div>
    
    	<div class="info">
    		<ul>
    		<li><?php the_time('F dS, Y') ?></li>
    		<li><?php the_category(', '); ?></li>
    		<li><em><?php the_author(); ?></em></li>
    		</ul>
    	</div>
    
    	<div class="text">
    		<?php the_content("); ?>
    		<span class="more"><em><a href="<?php the_permalink(); ?>">Continue reading</a></em></span>
    	</div>
    </div>
    
    <div class="divider"></div>
    <?php endwhile; ?>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    I think it might be a problem with the sidebar; it was originally on line 45:

    <ul>
    <?php wp_list_cats('sort_column=menu_order&depth=1&title_li=&show_count=1'); ?>
    </ul>

    I actually don’t want my main page to have a sidebar, but i’m not sure how that’s exactly done without seeing what this produces so I can, again, ‘tweak’ it.

    Again, the php bits were from a wordpress tutorial here.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Try removing that double quote in <?php the_content("); ?>.

    Thread Starter Alexander Houghton

    (@alexander-houghton)

      Thank you! It works now, but it’s really kind of ugly. Might there be any reason the CSS isn’t working? I thought I linked to it correctly…

    Edit-1: Nevermind! I figured it out. 😀
    I still gotta move lots of stuff around, but I’m makin’ progress.

    Edit-2: Gah, ok, so how do I get wordpress to keep the styling on all of the posts in a page (not just the most recent)? Also, the top image isn’t as dark as it’s supposed to be, which is normal for the internet, I guess.

    I’ve updated the first post with the updated code.

    Thread Starter Alexander Houghton

    (@alexander-houghton)

    Oh, I can’t edit that anymore… :[

    Well, here (and just so you know, the sidebar file is now empty):

    <div class="updates_border" style="margin-top:80px;">
    
    	<div class="updates">
    
    		<div class="headtype">
    
    <?php while(have_posts()) : the_post(); ?>
    <div class="post">
    <div class="title">
    <h2><a href="<?php the_permalink(); ?> "><?php the_title(); ?></a></h2>
    </div>
    
    		</div>
    
    		<div class="datetype">
    
    <div class="info">
    <ul>
    <?php the_time('F dS, Y') ?>
    <!-- <?php the_category(', '); ?>
    <em><?php the_author(); ?></em> -->
    </ul>
    </div>
    
    		</div>
    
    <div class="text">
    <?php the_content(); ?>
    <span class="more"><em><a href="<?php the_permalink(); ?>">Continue reading</a></em></span>
    </div>
    
    	</div>
    
    </div>
    
    </div>
    <div class="divider"></div>
    <?php endwhile; ?>

    Gah, ok, so how do I get wordpress to keep the styling on all of the posts in a page (not just the most recent)?

    Sorry, I don’t quite follow. What are you trying to do?

    Thread Starter Alexander Houghton

    (@alexander-houghton)

    On the page, you may notice that there are 2 posts. Only one of them (the most recent) has styling. It would be nice if all of the posts had styling….

    Sorry I wasn’t clear enough.

    You need to put the three </div> near the end outside the while loop:

    <div class="divider"></div>
    <?php endwhile; ?>
    	</div>
    
    </div>
    
    </div>

    Thread Starter Alexander Houghton

    (@alexander-houghton)

    It worked, thanks a ton! Awesome awesome awesome and I think I understand what that’s for now too. Next up is getting the posts to seperate a bit and making the links colored correctly.
    Is there a specific file I should go into to change the link colors? Changing them via styles doesn’t appear to work after they’ve been put into WordPress.

    For the links, you need to set color to the <a> element. For example, your post titles:

    .title a {
    	color: #fff;
    }

    Thread Starter Alexander Houghton

    (@alexander-houghton)

    You are an amazing God. I love you.

    I had something similar to what you suggested, but it only applied to the top part of the page after the wordpress install. Thank you! I never expected to get this far today.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘unexpected T_STRING’ is closed to new replies.