• Resolved bjbangs

    (@bjbangs)


    I reviewed several comments and can’t seem to resolve this.
    Here’s the code on what I believe is the comment box. However, I have a comment form to contact me on the page as well. I’m no expert in php.

    Help!!

    <?php
    /**
    * Handles Comment Post to WordPress and prevents duplicate comment posting.
    *
    * @package WordPress
    */

    if ( ‘POST’ != $_SERVER[‘REQUEST_METHOD’] ) {
    header(‘Allow: POST’);
    header(‘HTTP/1.1 405 Method Not Allowed’);
    header(‘Content-Type: text/plain’);
    exit;
    }

    /** Sets up the WordPress Environment. */
    require( dirname(__FILE__) . ‘/wp-load.php’ );

    nocache_headers();

    $comment_post_ID = isset($_POST[‘comment_post_ID’]) ? (int) $_POST[‘comment_post_ID’] : 0;

    $post = get_post($comment_post_ID);

    if ( empty($post->comment_status) ) {
    do_action(‘comment_id_not_found’, $comment_post_ID);
    exit;

Viewing 9 replies - 1 through 9 (of 9 total)
  • Admin Dashboard>Posts>All Posts>Find your post and hover over the Title with your mouse>Click ‘Quick edit’>Allow Comments>Uncheck>Update>If your theme still shows some part of the theme comment form use CSS to hide the elements.

    What theme are you using? It’s generally easier to just hide that text using CSS – a link to your site would be necessary to look at that.

    EDIT – beat out by 30 seconds! Must be that slick new machine, Seacoast :)!

    try to add to style.css of your theme:
    .form-allowed-tags { display: none; }

    or edit comments.php of your theme, find the line with comment_form();
    and change to:
    comment_form(array('comment_notes_after' => ''));

    what you posted is likely a core file which should not be edited.

    Thread Starter bjbangs

    (@bjbangs)

    My site is Paws for Reflection at https://www.bjbangs.net

    Using ChipZero theme.

    Do you mean enable CSS in the theme itself under options?? Which pages should I be looking at??

    Thread Starter bjbangs

    (@bjbangs)

    Can I do this under the theme options??

    if you are referring to my suggestions, you will need to either add the suggested style to style.css of your theme; for instance by editing style.css under dashboard – appearance – editor

    or edit comments.php under dashboard – appearance – editor and locate comment_form(); near the end of the file; and change it.

    Thread Starter bjbangs

    (@bjbangs)

    Hey thanks so much. This worked and was simple and slick. No more ugly HTML code under my theme. Next is to figure out how to do a landing page as a home page with my most recent post and how to link flickr or photobucket, picassa photos as a featured image. Any suggestions??

    Thanks alchymyth!

    Thanks alchymyth!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘remove html code from under comment box’ is closed to new replies.