add php to html print formated %1$s, %2$s, %3$s

2019-08-02 06:35发布

I want to add custom filed:

<?php if( get_field('custom_filed') ): ?>

      <h4>Some text: <?php the_field('custom_field');?></h4>

<?php endif; ?>

to

  $html_format = '
   <div class="%7$s">
    <div class="cruises-layout">
     <div class="image-wrapper">
        %1$s
        %3$s
        %9$s
     </div>
   <div class="content-wrapper">
     <div class="content">
        %2$s
        %4$s
        %8$s
        %5$s
        %6$s
     </div>
    </div>
   </div>
  </div>';

   $html_options = array(
    'html_format'      => $html_format,
    'open_row'         => '<div class="row">',
    'close_row'        => '</div>',
   );

and I can't find the way, because this $html_format doesn't support php, also I can't find where are those fileds set up to "printf_format" so I could do same for custom field.

Thanks for help,

A

标签: php wordpress
0条回答
登录 后发表回答