首页 > 解决方案 > 更改文本以阅读更多内容和评论

问题描述

我有波兰语网站,这就是我想要翻译所有元素的原因。

去做:

我的wordpress模板:萨沃纳

我不知道在哪里可以找到文件中的元素来更改它。我从源浏览器上传带有信息的图像:

这里

这是我的 post-content.php

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<?php

if ( have_posts() ) :

    // Loop Start
    while ( have_posts() ) :

        the_post();

?>  

    <div class="post-media">
        <?php the_post_thumbnail('savona-full-thumbnail'); ?>
    </div>

    <header class="post-header">

        <?php

        $category_list = get_the_category_list( ',&nbsp;&nbsp;' );
        if ( savona_options( 'single_page_show_categories' ) === true && $category_list ) {
            echo '<div class="post-categories">' . ent2ncr($category_list) . ' </div>';
        }

        ?>

        <h1 class="post-title"><?php the_title(); ?></h1>

        <div class="post-meta clear-fix">
            <?php if ( savona_options( 'single_page_show_date' ) === true ) : ?>
            <span class="post-date"><?php the_time( get_option( 'date_format' ) ); ?></span>
            <?php endif; ?>
        </div>

    </header>

    <div class="post-content">

        <?php

        // The Post Content
        the_content('');

        // Post Pagination
        $defaults = array(
            'before' => '<p class="single-pagination">'. esc_html__( 'Pages:', 'savona' ),
            'after' => '</p>'
        );

        wp_link_pages( $defaults );

        ?>
    </div>

    <footer class="post-footer">



        <?php if ( savona_options( 'single_page_show_author' ) === true ) : ?>
        <span class="post-author"><?php esc_html_e( 'By', 'savona' ); ?>&nbsp;<?php the_author_posts_link(); ?></span>
        <?php endif; ?>

        <?php

        if ( savona_options( 'single_page_show_comments' ) === true && comments_open() ) {
            comments_popup_link( esc_html__( 'No Comments', 'savona' ), esc_html__( '1 Comment', 'savona' ), '% '. esc_html__( 'Comments', 'savona' ), 'post-comments');
        }

        ?>

    </footer>

<?php

    endwhile; // Loop End
endif; // have_posts()

?>

</article>

标签: phphtmlwordpress

解决方案


尽管这可能不是正确的方法,但您可以像下面这样轻松更改。

  1. “阅读更多”文本 - 替换'blog_page_more_text' => 'Read More','blog_page_more_text' => 'Czytaj dalej',“inc/customizer/customizer-defaults.php”中的内容。
  2. 无评论文本 - 将'templates/grid/blog-grid.php' 和 'templates/single/post-content.php' 中的出现'No Comments'替换为。'Brak komentarzy'

推荐阅读