奇怪的标签作为WordPress模板的php文件中的html标签的值

时间:2013-03-24 22:46:32

标签: php html wordpress xhtml wordpress-theming

我是PHP和WordPress的新手。我正在修改这个模板:

在一些php文件中我找到了类似的东西:

<span class="sep">Posted on </span>
                 <a href="%1$s" title="%2$s" rel="bookmark">
                    <time class="entry-date" datetime="%3$s" pubdate>%4$s</time>

                 </a>
                 <span class="by-author"> 
                    <span class="sep"> by bla</span> 
                    <span class="author vcard">
                        <a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a>
                        <p>CUCU</p>
                    </span>
                    <span>BLABLA</span>
                 </span>

正如您所看到的,我找到了一些标签(例如%1 $ s %2 $ s ,而不是某些标签的值,如href,title,datetime) ,%4 $ s

它的意思和含义是什么?

TNX

安德烈

1 个答案:

答案 0 :(得分:1)

这些只是占位符,当页面加载时将放置变量(某些值)。 Wordpress使用模板,这就是为什么你会看到那些而不是通常在常规.html文件中看到的硬编码值的原因。