简体   繁体   中英

Strange label as value of html tag inside php file of WordPress template

I am quite new in PHP and in WordPress. I am modifying this template:

In some php files I found something like this:

<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>

As you can see, instead of the values for some tag as href, title, datetime I find some label (like %1$s , %2$s , %4$s )

What it mean and what are reference to?

Tnx

Andrea

Those are just placeholders, where variables (some value) will be placed when the page loads. Wordpress uses templates, which is why you are seeing those instead of hard coded values that you would generally see on a regular .html file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM