markdown WP中的转储字段(非木材/树枝)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown WP中的转储字段(非木材/树枝)相关的知识,希望对你有一定的参考价值。
# My Improvements on the CSS Tricks code
This outputs arrays as preformatted arrays so I can actually see and use their info!!!
```php
<h3>All Post Meta</h3>
<?php $getPostCustom=get_post_custom(); // Get all the data ?>
<?php
$fields = get_fields();
if( $fields ): ?>
<ul>
<?php foreach( $fields as $name => $value ):
if (gettype($value) !== 'array') {?>
<li><b><?php echo $name; ?></b> <?php echo $value; ?></li>
<?php } else { ?>
<li><b><?php echo $name; ?></b> <pre><?php print_r($value); ?></pre></li>
<?php } endforeach; ?>
</ul>
<?php endif; ?>
<?php
foreach($getPostCustom as $name=>$value) {
echo "<strong>".$name."</strong>"." => ";
foreach($value as $nameAr=>$valueAr) {
echo "<br /> ";
echo $nameAr." => ";
echo var_dump($valueAr);
}
echo "<br /><br />";
}
?>
```
From [CSS Tricks](https://css-tricks.com/snippets/wordpress/dump-all-custom-fields/) we get:
```php
<h3>All Post Meta</h3>
<?php $getPostCustom=get_post_custom(); // Get all the data ?>
<?php
foreach($getPostCustom as $name=>$value) {
echo "<strong>".$name."</strong>"." => ";
foreach($value as $nameAr=>$valueAr) {
echo "<br /> ";
echo $nameAr." => ";
echo var_dump($valueAr);
}
echo "<br /><br />";
}
?>
```
From [ACF](https://www.advancedcustomfields.com/resources/get_fields/) comes the following:
```php
<?php
$fields = get_fields();
if( $fields ): ?>
<ul>
<?php foreach( $fields as $name => $value ): ?>
<li><b><?php echo $name; ?></b> <?php echo $value; ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
```
以上是关于markdown WP中的转储字段(非木材/树枝)的主要内容,如果未能解决你的问题,请参考以下文章
木材是不是有像 404 一样的默认 500 模板?
木材是否有默认500模板,就像它有404?
EasyAdmin:更改树枝中的 formTypeOptions 属性字段时出错
如何检查表单字段中是不是有呈现控制器的树枝模板中的数据
markdown 在树枝中生成链接
交响乐:在树枝文件中的字段之间添加 <br/>