Wsparcie » Wtyczki » Komentarze bez okienka (Strona www)

  • Może ktoś będzie mógł pomóc.

    Chcę wywalić z formularza KOMENTARZY okienko www. Nie znalazłem rozwiązania pomimo wielu wątków.

    Moja strona to https://www.orkiestron.pl

    Będę wdzięczny za pomoc. Dziękuję
    Andrzej

Viewing 4 replies - 1 through 4 (of 4 total)
  • Wygląd-> edytor wybierasz po prawej „Komentarze (comments.php)”

    Musisz wyszukać kodu:

    <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="32" /><label for="url"><?php _e('Website', 'wpzoom') ?></label></p>

    Będzie wyglądał podobnie jak ten (nie dokładnie tak samo)

    I wstaw przed niego //

    Jeśli nie podziała to możesz spróbować usunąć tę część kodu 🙂 Ale zapisz gdzieś na wszelki wypadek.

    Thread Starter KuszaA

    (@kuszaa)

    Moj kod wygląda tak

    <?php
    /* If a post password is required or no comments are given and comments/pings are closed, return. */
    if ( post_password_required() || ( !have_comments() && !comments_open() && !pings_open() ) )
            return;
    
    if ( comments_open() ) { ?>
    
        <section id="comments" class="comments">
            <div class="comments-number">
                <h3>
                    <?php comments_number( __( 'Skomentuj pierwszy', 'tracks' ), __( 'Komentarz', 'tracks'), __( '% Komentarz', 'tracks' ) ); ?>
                </h3>
            </div>
                <ol class="comment-list">
                        <?php wp_list_comments(array( 'callback'=>'ct_tracks_customize_comments', 'max_depth'=>'7') ); ?>
                </ol><!-- .comment-list -->
                <?php
                if( (get_option('page_comments') == 1) && (get_comment_pages_count() > 1) ) { ?>
                    <nav class="comment-pagination">
                        <p class="previous-comment"><?php previous_comments_link(); ?></p><p class="next-comment"><?php next_comments_link(); ?></p>
                    </nav>
                <?php } ?>
                <?php comment_form(); ?>
        </section><!-- #comments -->
    <?php
    } elseif(!comments_open() && have_comments() && pings_open() ) { ?>
        <section id="comments" class="comments">
            <div class="comments-number">
                <h3>
    <?php comments_number( __( 'Be First to Comment', 'tracks' ), __( 'One Comment', 'tracks'), __( '% Comments', 'tracks' ) ); ?>
                </h3>
            </div>
                <ol class="comment-list">
                        <?php wp_list_comments(array( 'callback'=>'ct_tracks_customize_comments', 'max_depth'=>'3') ); ?>
                </ol><!-- .comment-list -->
                <?php
                if( (get_option('page_comments') == 1) && (get_comment_pages_count() > 1) ) { ?>
                    <nav class="comment-pagination">
                        <p class="previous-comment"><?php previous_comments_link(); ?></p><p class="next-comment"><?php next_comments_link(); ?></p>
                    </nav>
                <?php } ?>
                <p class="comments-closed pings-open">
                        <?php printf( __( 'Comments are closed, but <a href="%s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', 'tracks' ), esc_url( get_trackback_url() ) ); ?>
                </p><!-- .comments-closed .pings-open -->
        </section><!-- #comments -->
    <?php
    } elseif ( !comments_open() && have_comments() ) { ?>
        <section id="comments" class="comments">
            <div class="comments-number">
                <h3>
    <?php comments_number( __( 'Be First to Comment', 'tracks' ), __( 'One Comment', 'tracks'), __( '% Comments', 'tracks' ) ); ?>
                </h3>
            </div>
                <ol class="comment-list">
                        <?php wp_list_comments(array( 'callback'=>'ct_tracks_customize_comments', 'max_depth'=>'3') ); ?>
                </ol><!-- .comment-list -->
                <?php
                if( (get_option('page_comments') == 1) && (get_comment_pages_count() > 1) ) { ?>
                    <nav class="comment-pagination">
                        <p class="previous-comment"><?php previous_comments_link(); ?></p><p class="next-comment"><?php next_comments_link(); ?></p>
                    </nav>
                <?php } ?>
                <p class="comments-closed">
                    <?php _e( 'Comments are closed.', 'tracks' ); ?>
                </p><!-- .comments-closed -->
        </section><!-- #comments -->
    <?php
    } else { ?>
    
        <p class="comments-closed">
                <?php _e( '', 'tracks' ); ?>
        </p><!-- .comments-closed -->
    
    <?php } ?>

    W pliku functions.php w katalogu motywu dodaj kod:

    function remove_comment_field( $fields ) {
        unset( $fields['url'] );
        return $fields;
    }

    add_filter( 'comment_form_default_fields’, 'remove_comment_field’ );

    Thread Starter KuszaA

    (@kuszaa)

    Cześć,

    niestety nie pracuje, ale dzięki za chęci

    Pozdrawiam,
    Andrzej

Viewing 4 replies - 1 through 4 (of 4 total)
  • Temat ‘Komentarze bez okienka (Strona www)’ jest zamknięty na nowe odpowiedzi.