静的ページへの記事の埋め込み
-
「自分が管理するウェブサイトのトップページ(index.html)に、同じサーバ内(wpディレクトリ)にあるWordpressの全カテゴリ・新着5件を表示。」の方法で、index.htmlの文字列が shift_jis の為、表示されるリストが化けてしまうのですが、うまく表示させる方法は有りませんでしょうか? よろしくお願いいたします。
<?php require(‘./wp/wp-blog-header.php’); ?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”ja” lang=”ja” dir=”ltr”><head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />
<title>○×ウェブサイト</title>
</head>
<body>
<h1>○×ウェブサイト</h1>
<p>ここは○×のウェブサイトです。</p><h2>最新エントリー</h2>
-
<?php
- <?php the_time(‘Y.m.d’) ?> “><?php the_title() ?>
$posts = get_posts(“numberposts=5&category=&orderby=post_date&offset=0”);
foreach ($posts as $post):
setup_postdata($post);
?><?php endforeach; ?>
</body>
</html>
8件の返信を表示中 - 1 - 8件目 (全8件中)
8件の返信を表示中 - 1 - 8件目 (全8件中)
- トピック「静的ページへの記事の埋め込み」には新たに返信することはできません。