Grow your CSS skills. Land your dream job.

Lynda.com course – Create and Edit Custom Theme

  • # February 21, 2013 at 6:03 pm

    This is a really good course from Chris Coyier which I highly recommend. It covers creating the psd mockup of the site and converting the psd to HTML and CSS as well as then converting it to a custom wp theme. Along the way Chris points out some really useful photoshop tips and wordpress resources. I learned a ton.

    One embarrassing question – I can’t get the index.php or the home.php page to display by clicking on the menu item ‘home’. Everything else is working nicely – the header, sidebar, footer, comments, single page, blog page, products and category pages all do what they’re supposed to. From the dashboard, clicking on ‘visit site’ works, displaying the home page properly but why wont it show up when clicking on the menu item from within the site itself?

    I’ve used wp version 3.5.1 which is the latest version – is there some setting I need to alter?

    # February 21, 2013 at 6:14 pm

    Could you post up a link?

    # February 21, 2013 at 6:35 pm

    I developed it locally as a learning project.

    Just to clarify, when I click on the nav link to home or click on a nav item which doesn’t have a specific page template set up the sidebar, header and footer display but nothing else and the layout is incorrect.

    If I key in the full url e.g. localhost/widgetCorp/index.php or localhost/widgetCorp/home.php or localhost/widgetCorp/

    Within the dashboard, from the pages menu if I click on view page, then I just get the header, sidebar and footer templates with the layout awry. Is this something to do with how the pages are set up? currently they are set to default template.

    # February 21, 2013 at 6:50 pm

    It’s really difficult to answer this question. Can you post the code you have in your index.php? This might help us better understand what is going on.

    You might want to check out [WordPress Template Hierarchy](http://codex.wordpress.org/Template_Hierarchy). To better understand how WordPress template files work.

    # February 21, 2013 at 8:14 pm

    Yea, I appreciate that its difficult without being able to access the site and the code. I’ll try and put it up tomorrow. In the meantime, here’s the code for index.php

    < ?php get_header(); ?>

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

    id=”post-< ?php the_ID(); ?>“>

    “>< ?php the_title(); ?>

    < ?php include (TEMPLATEPATH . '/inc/meta.php' ); ?>

    < ?php the_content(); ?>

    < ?php endwhile; ?>

    < ?php include (TEMPLATEPATH . '/inc/nav.php' ); ?>

    < ?php else : ?>

    Not Found

    < ?php endif; ?>

    < ?php get_sidebar(); ?>

    < ?php get_footer(); ?>

    and this is home.php

    < ?php get_header(); ?>

    Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    Donec non elementum nunc. Vestibulum orci nisl, vulputate nec elementum nec,
    aliquet at est. Cras porta leo nec leo porttitor pharetra. In id eros nibh,
    eu tincidunt libero. Duis a metus nibh. Quisque sit amet ipsum sit amet
    lorem luctus elementum.

    We are able to do the quote we do because of the quality of these widgets.
    - Frank James, Tick Tock Corp.

    Featured Widgets

    Web Special of the Week

    Buy two sprockets get the third free!

    < ?php get_sidebar(); ?>

    < ?php get_footer(); ?>

    # February 21, 2013 at 8:27 pm

    I’m not sure if the comment box on this site is breaking your code. But the line after this:

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

    says:

    id=”post-< ?php the_ID(); ?>“>”>

    Which is invalid syntax.

    Check out [index.php](https://github.com/murtaugh/HTML5-Reset-Wordpress-Theme/blob/master/index.php) of HTML5 Reset WordPress theme.

    # February 22, 2013 at 10:00 am

    The problem was down to a page.php script in the theme which I didn’t realise was there, so I just needed to update that script. Always a good call to revisit the template hierarchy, thanks.

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

You must be logged in to reply to this topic.

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