Typesを使って写真入力するときのalt指定

記事のタイトルを入れたいとき

<?php
echo types_render_field('ここにフィールドのスラッグ', array('alt' => get_the_title() , 'width'=>'500', 'height'=>'620', 'proportional'=>'false'));
?>

カスタムフィールドの何かを入れたいとき

<?php
$title = types_render_field('ここにフィールドのスラッグ', array()); 
echo types_render_field('ここにフィールドのスラッグ', array('alt' => get_the_title() , 'width'=>'500', 'height'=>'620', 'proportional'=>'false'));
?>

この記事を書いた人

mihoji

大阪でWEB屋さんをやっています。 WordPressを使ったサイト構築と、小規模な企業のマーケティング提案が得意です。 WordPressとIT系勉強会とビールがすき。