• Resolved JCKnoell

    (@jcknoell)


    I have started over on designing my website’s blog.
    beta.cleantelligent.com/blog
    I am trying to use a custom template (t-blog.php) to design the page. It will also need a custom sidebar in order to list archives, etc.
    This is different from my main website.

    I can’t seem to get the blog template, or the blog sidebar to work. Nor is it displaying my posts. I have changed the settings in Reading so that “Blog” is my posts page.

    Any idea why it’s not working at all? (The title of the page seems to be calling my most recent posts title, but the blog post itself is not there.)

Viewing 15 replies - 1 through 15 (of 23 total)
  • I am trying to use a custom template (t-blog.php) to design the page.

    What page?

    Thread Starter JCKnoell

    (@jcknoell)

    beta.cleantelligent.com/blog

    A static front page or your site’s main posts page?.

    Thread Starter JCKnoell

    (@jcknoell)

    the main posts page. the static site is the home page. I’m trying to design the blog based on a custom template. It is set up in the settings as my posts page.

    The main posts page on any WP site will always use the index.php template file automatically – irrespective of any page template that you try to apply via the back end. So you need to work on that template file – not a custom one.

    Thread Starter JCKnoell

    (@jcknoell)

    I’m sorry, I am a little bit confused. Isn’t the index.php used by the main static page, then the page.php is used by the posts page? That’s how I always thought it was. Am I backward?

    Thread Starter JCKnoell

    (@jcknoell)

    And wouldn’t it override anyway if I change the template in the Page Attributes options?
    All of my other pages are organized into categories and I’ve assigned them a template and sidebar using the page attributes. (See the Tour items in the main nav. They’re all atyled the same way.)
    Wouldn’t I do the same with my blog? I’d like to use the same template on the blog as well as some secondary blog related pages, such as webinars, etc.

    And wouldn’t it override anyway if I change the template in the Page Attributes options?

    Nope. By design, the main posts page always uses the index.php template file. Any custom template in the Page template dropdown is simply ignored. Is there any reason why you can’t edit index.php instead?

    Thread Starter JCKnoell

    (@jcknoell)

    Sure I can, but I just don’t understand what you mean… If it always uses index.php, then what’s the point of the custom templates? Or is that only for static pages?

    Or is that only for static pages?

    Pretty much, yes. The main posts page is a special case.

    Thread Starter JCKnoell

    (@jcknoell)

    Well okay then. That was never made clear before. Thanks Esmi. You’ve always seemed to be a huge help on this forum. I always hope it will be you who answers my questions. ??

    Thread Starter JCKnoell

    (@jcknoell)

    So, is that the “default template”?

    Thread Starter JCKnoell

    (@jcknoell)

    I answered that myself. It seems to be working now. Thanks a load!

    No problem. You might want to bookmark the Template_Hierarchy page to try and avoid this kind of frustration in future. ??

    Thread Starter JCKnoell

    (@jcknoell)

    Esmi,

    If you’re still around for answers, I have a related question. So, the blog is recognizing my posts now, but the sidebar is gone, as well as the option in page attributes for the sidebar.

    I have <?php get_sidebar(); ?> in my index.php, but the option isn’t there in the blog edit page… How do I load one of my WP sidebar widgets onto this blog page?

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘WordPress Templates and Sidebars not working’ is closed to new replies.