Grow your CSS skills. Land your dream job.

new WordPress site unable to view single posts

  • # February 4, 2010 at 11:21 am

    I’m redoing my portfolio site via WordPress by modifying another theme (in hindsight, not the best idea) and aside from changing the header, footer & background images, it’s close to being done.

    However, the main problems for me, aside from learning code as I go along, are that the site won’t let me go into individual posts on the front page. It simply links back to the home page, displaying "Page Not Found" in the title, but still showing all content. Bizarrely, when I preview other themes, this functionality is restored, but when activated, it’s the same as before.
    Any suggestions or ideas? The work in progress is at http://www.ciaranoconnor.com/wordpress/
    Thanks!

    # February 4, 2010 at 11:57 am

    It sounds like you don’t have a "single.php" in your theme files.

    http://codex.wordpress.org/Template_Hierarchy

    # February 5, 2010 at 7:14 am

    Nope, that file is definitely there.

    # February 5, 2010 at 12:31 pm

    Then it must have the exact same code as index.php.

    Post both the single.php and index.php code here.

    # February 6, 2010 at 9:38 am

    That would appear to be the case…
    Where & how are they supposed to differ?

    index.php -

    Code:
    < ?php get_header(); ?>

    < ?php if (have_posts()) : ?>
    < ?php while (have_posts()) : the_post(); ?>

    < ?php if (function_exists('wp_list_comments')): ?>

    >

    < ?php else : ?>

    < ?php endif; ?>

    “>< ?php the_title(); ?>

    by < ?php the_author_posts_link(); ?> on < ?php the_time('D d M Y') ?>, under < ?php the_category(', '); ?>

    < ?php the_content('(continue reading...)'); ?>

    < ?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?>

    < ?php the_tags(':‘, ‘, ‘, ”); ?>

    “>more…

    < ?php endwhile; ?>

    < ?php else : ?>

    “>Not Found

    Well holy God. Looks like you’ve been digging for something that I’ve either moved, deleted or perhaps never existed in the first place. Best beit is to search again by using this form or if all else fails, give me a yell.

    < ?php endif; ?>

    < ?php next_posts_link('« Older Entries') ?>
    < ?php previous_posts_link('Newer Entries »') ?>

    < ?php get_sidebar(); ?>

    < ?php get_footer(); ?>

    single.php

    Code:
    < ?php get_header(); ?>

    < ?php if (have_posts()) : ?>
    < ?php while (have_posts()) : the_post(); ?>

    “>< ?php the_title(); ?>

    by < ?php the_author_posts_link(); ?> on < ?php the_time('D d M Y') ?>, under < ?php the_category(', '); ?>

    < ?php the_content('(continue reading...)'); ?>

    < ?php wp_link_pages(); ?>

    < ?php if ( function_exists('the_tags') ) : ?>< ?php the_tags(':‘, ‘, ‘, ”); ?>< ?php endif; ?>

    < ?php edit_post_link('Edit this entry?','',''); ?>

    < ?php if (function_exists('wp_list_comments')): ?>

    < ?php comments_template('', true); ?>

    < ?php else : ?>

    < ?php comments_template(); ?>
    < ?php endif; ?>

    < ?php comments_rss_link(__('RSS feed for this post (comments)’)); ?>

    < ?php if ( pings_open() ) : ?> · ” rel=”trackback”>< ?php _e('TrackBack URI‘); ?>< ?php endif; ?>

    < ?php endwhile; ?>

    < ?php else : ?>

    “>Not Found

    Sorry, but you are looking for something that isn’t here. You can search again by using this form

    < ?php endif; ?>

    < ?php get_sidebar(); ?>

    < ?php get_footer(); ?>

    # February 12, 2010 at 3:57 am

    I still can’t get this to work. Anybody else know what I can do?

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Projects

*May or may not contain any actual "CSS" or "Tricks".