• Resolved fotofio

    (@fotofio)


    My client has a need for one of the pages containing posts to present a single post view and not allow comments on the post. As single.php is that presentation page, how do I arrange for a customized version of single.php(sans the comments template) to be the presentation page?

    Other presentation aspects of the site blog entries do require single.php to have a comments template.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Make a copy of single.php page, rename it, and make a template out of it…see stepping into templates in the docs here. Just remove the comments code from that template.

    Thread Starter fotofio

    (@fotofio)

    Yes, I did figure that part out, but how to make that newly named template page be the one that goes into action when called. I do appreciate your help on that point.

    When you write a new page, you select that template — look to the right of the page editing window.

    Thread Starter fotofio

    (@fotofio)

    Let me begin again. I created a template for articles.php presenting a selection of blog entries from the specific category “articles”. Articles.php, as a template does not present an opportunity for comments. However, when the visitor click as a title link, they are presented with a solitary post view, one title and its content, via single.php

    Within the WP loop, single.php is the presentation page. If I customize that, how do I link articles.php to customSingle.php for a solitary post view only from articles.php?

    Figaro, I thank you again.

    Thread Starter fotofio

    (@fotofio)

    What I find in the codex regarding templates, template hierarchy, and conditional tags is not that helpful; more confusion than not. For example, It seems to be suggested that if I create a version of single.php for my need and rename it single-9.php (9 is the category ID for the two related posts I am attempting to present without comment opportunity) Then based on the query string and the fact that there is a document called single with related category number, according to template hierachy, the linked blog entry and the designated “single” should find each other.

    Is there a parent->child relationship between the page that carries three or four blog entries and the “single” that presents one of them as a selected item?

    The Loop has me spinning!

    S.

    figaro, this option exists for the default template, but not for classic. Why? I’ve copied all the function code from default to classic, but I don’t get any options for choosing templates.

    Any help appreciated. I’ve scoured this site.

    @plebe

    page templates only work for pages and not posts.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Customizing Single.php as a template for no comments’ is closed to new replies.