WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve Remove Leave A Reply From Templates (10 posts)

  1. rerartist
    Member
    Posted 1 year ago #

    Hello:
    URL : http://itsmn.com/tmj

    Please look at "Home" and "Find A Doctor"
    "Home" uses Front Page Template
    "Find A Doctor" uses Full-width Page Template, No Sidebar

    In Admin/Discussions, I unchecked everything. We don't want commenting on anything.

    ~ I successfully removed title from Front Page Template by creating content_NoTitle.php and copy/changing frontpage.php:
    <?php get_template_part( 'content_NoTitle', 'page' ); ?>

    ~ I created a TwentyTwelve child theme, and placed the modified files in it, along with a style.css which contains @import url("../twentytwelve/style.css");

    I searched the forum, there was only one thread that seemed to address this issue (http://tinyurl.com/b5oulk4), and I changed comment.php as suggested, with no success.

    PROBLEM: Each of these pages shows some form of "Leave A Reply", with "Post Comment" button. How do I remove that content from the templates?

    Thank you for your time,
    ~ Robert

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    We don't want commenting on anything.

    Uncheck "Allow comments" in the Discussion pane on the Edit page of each published Posts and Page. If you do not see this pane, click Screen Options at the very top of the page and check "Discussion".

  3. rerartist
    Member
    Posted 1 year ago #

    Thank you very much for your quick response, esmi. I feel a bit silly about something so simple.

    However, there is still legacy content on the front page (home), even though I removed the default "Hello Word" post.

    http://itsmn.com/tmj/
    "This entry was posted on January 10, 2013"

    How do I remove this?

    Thank you again for your quick response. This forum rocks!

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    You can just delete the Post by clicking Trash under its name in the All Posts list in your dashboard.

  5. rerartist
    Member
    Posted 1 year ago #

    Hi:
    I did delete the post, as I mentioned previously, but the "This entry was posted..." is still there. Any ideas why?

    Thanks for your trouble.
    ~ Robert

  6. rerartist
    Member
    Posted 1 year ago #

    I think I found it!

    http://wordpress.org/support/topic/a-way-to-remove-this-caption?replies=3

    "Navigate to your theme directory (wp-content/themes/*Your theme*/) and locate either the post.php or index.php files. Do a search of the file looking for the phrase "This entry was posted" and it should take you to the appropriate section of the file. Go ahead and delete the relevant code"

    The code looks like this:
    `
    // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.
    if ( $tag_list ) {
    $utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
    } elseif ( $categories_list ) {
    $utility_text = __( 'This entry was posted in %1$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
    } else {
    $utility_text = __( 'This entry was posted on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
    }

    printf(
    $utility_text,
    $categories_list,
    $tag_list,
    $date,
    $author
    );
    }
    endif;

    So now I'll copy functions.php to child theme folder and see how it works. (maybe you have a suggestion on what to modify?)
    I'll happily post my results.
    Again, thank you. You have been a great help.
    ~ Robert

  7. rerartist
    Member
    Posted 1 year ago #

    SUCCESS !!!

    You must edit parent theme functions.php. If you copy functions.php to child theme and edit that file, you will receive a 'Fatal Error' message.

    Find this part:

    printf(
    $utility_text,
    $categories_list,
    $tag_list,
    $date,
    $author

    Remove the line $utility_text, so that it looks like this:

    printf(
    $categories_list,
    $tag_list,
    $date,
    $author

    That's all I have.
    Thanks.

  8. paulwpxp
    Font hero
    Posted 1 year ago #

    SUCCESS !!!

    You must edit parent theme functions.php. If you copy functions.php to child theme and edit that file, you will receive a 'Fatal Error' message.

    This is so wrong.

    The twentytwelve_entry_meta() is pluggable.
    It's wrapped in if ( ! function_exists() )

    So if you have a sound reason to redeclare that in child's function.php then just do it, the Fatal Error is saying that you did something wrong (php-wise) in your function.

    Also, your theme's front-page.php and/or content-page.php is messed up, TwentyTwelve by default doesn't use twentytwelve_entry_meta() on page, meaning there won't be any "post on" and "post in" stuff in it already.

  9. rerartist
    Member
    Posted 1 year ago #

    Many thanks paulwp.
    You pointed me in the right direction.

  10. JayMarvalous
    Member
    Posted 1 year ago #

    Thanks esmi, the bit about not seeing the pane and clicking Screen Options was exactly what I was looking for.

Topic Closed

This topic has been closed to new replies.

About this Topic