• wp.rook

    (@wordpressrook)


    Hello, I’m trying to make my own WP template, seems to be going well except when I click on the title link of a blog post (which I think should take me to the permanent location for the post) it says ‘page not found’

    I think my code <a href=”<?php the_permalink(); ?>“><?php the_title(); ?></a> is correct, but maybe not?

    <div id="blogroll" style="border: 1px solid white;">
    			<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
    				<?php if (!in_category('welcome')) {?>
    				<p class="dotted"><?php the_date(); ?></p>
    				<div class="post" id="post-<?php the_ID(); ?>">
    					<a href=”<?php the_permalink(); ?>“><?php the_title(); ?></a>
    					<div class="entry">
    						<?php the_content(); ?>
    						<p class="postmetadata">
    						<?php _e('Filed under:'); ?> <?php the_category(', ') ?> <?php _e('by'); ?> <?php  the_author(); ?><br />
    						<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <?php edit_post_link('Edit', ' | ', ''); ?>
    				</p>
    					</div>
Viewing 3 replies - 1 through 3 (of 3 total)
  • Where’s the end of the <?php if (!in_category('welcome')) {?> if loop? I’d also suggest you get rid of the angled doubel-quotes:

    <a href=”<?php the_permalink(); ?>“><?php the_title(); ?></a>

    It should be:

    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>

    Thread Starter wp.rook

    (@wordpressrook)

    Thanks, I got rid of the angled quotes..

    Here is the full code: `<div id=”blogroll” style=”border: 1px solid white;”>
    <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
    <?php if (!in_category(‘welcome’)) {?>
    <p class=”dotted”><?php the_date(); ?></p>
    <div class=”post” id=”post-<?php the_ID(); ?>”>
    “><?php the_title(); ?>
    <div class=”entry”>
    <?php the_content(); ?>
    <p class=”postmetadata”>
    <?php _e(‘Filed under:’); ?> <?php the_category(‘, ‘) ?> <?php _e(‘by’); ?> <?php the_author(); ?>
    <?php comments_popup_link(‘No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?> <?php edit_post_link(‘Edit’, ‘ | ‘, ”); ?>
    </p>
    </div>
    </div>
    <?php } ?>
    <?php endwhile; ?>
    <div class=”navigation”>
    <?php posts_nav_link(); ?>
    </div>
    <?php endif; ?>
    </div>`

    Is there a template file that WP looks for when you click on a blog title (which links to the permalink) ?

    Thanks!

    Please post small code snippets between backticks or use the pastebin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘standard permalinks not working.’ is closed to new replies.