Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Nible

    (@nible)

    As I suspected, I would face this problem again, this time while trying to output blog-post information, typing out the Chinese words for “by” and “posted in” using echo. Except for in the index.php file, it works everywhere, like in archive.php and search.php. Why is index.php different? Super frustrating.

    Here’s my code in the index.php (which outputs some random non-chinese characters):

    <p class="post-info"><?php the_time('M jS, Y'); ?> | <?php echo 由?>
    		<a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>"><?php the_author(); ?></a> | <?php echo 發佈在?>

    And here’s my code in the search.php (which outputs the Chinese characters as it should):

    `<p class=”post-info”><?php the_time(‘M jS, Y’); ?> | <?php echo 由?>
    <a href=”<?php echo get_author_posts_url(get_the_author_meta(‘ID’)); ?>”><?php the_author(); ?></a> | <?php echo 發佈在 ?>`

    Edit: To be clear, it outputs everything correctly in the code, however not on the actual website.

    Thread Starter Nible

    (@nible)

    Thanks a lot for the help! I’m sure I’ll be back with new problems shortly.

    Thread Starter Nible

    (@nible)

    Edit: Yes there was. Apparantly I had written site header instead of site-header.

    Thread Starter Nible

    (@nible)

    How exactly do I make sure it has the class site-header? Are classes things you make yourself? Should there be somewhere in the code where I’ve already introduced .site-header?

    Thread Starter Nible

    (@nible)

    I suppose I half figured it out? Apparently I can write Chinese in the WordPress editor, just not in the Notepad++. For now that seems good enough, but I wonder if it’ll cause problems in the future.

Viewing 5 replies - 1 through 5 (of 5 total)