gpt4 book ai didi

php - WP WordPress 主题问题

转载 作者:行者123 更新时间:2023-12-04 06:19:58 25 4
gpt4 key购买 nike

我正在构建一个免费的 WP 主题,但对 PHP 几乎一无所知。我不知道在这段代码周围放什么,如果有人能在它周围放正确的 PHP 标签,我将不胜感激,因为告诉我放什么有点像对我说拉丁语。我试过把 <?php开头和?>最后但它没有用:

if ( has_post_format( 'aside' ) {
// aside format post content here
} else if (has_post_format('gallery')) {
// stuff to display the gallery format post here
} else if (has_post_format('link')) {
// link format post content here
} else if (has_post_format('video')) {
// video format post content here
} else if (has_post_format('audio')) {
// audio format post content here
} else if (has_post_format('status')) {
// status format post content here
} else if (has_post_format('chat')) {
// chat format post content here
} else if (has_post_format('quote')) {
// quote format post content here
} else if (has_post_format('image')) {
// image format post content here
}else {
// code to display the normal format post here
}

最佳答案

<?php在每行不包含任何代码的前面(因此以 if 或 } 开头),
并以 ?> 结束这些行.

关于php - WP WordPress 主题问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6710729/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com