WP POSTデータ変数覚書
投稿の本文
$post->post_content記事の抜粋取得
$post->post_excerpt記事の投稿日時
$post->post_date記事のタイトル取得
$post->post_title記事名(スラッグ)取得
$post->post_name記事のタイプ取得
$post->post_type記事のID取得
$post->IDスポンサーリンク
スポンサーリンク
特殊文字
シングルクォート : '
ダブルクォート : "
WP設定内表示前処理(htmlタグ許可項目)
$str = str_replace(‘<','<' ,$str);
$str = str_replace(‘>’,’>’ ,$str);
$str = str_replace(‘\”‘,’"’,$str);
$str = str_replace(“\'”,’'’ ,$str);
WO設定項目表示前処理(htmlタグ許可項目)
$str = str_replace(‘\”‘,'”‘,$str);
$str = str_replace(“\'”,”‘”,$str);
・テーマ
get_theme_root_uri()
get_theme_root()
・WP 情報
get_bloginfo( $show )
・Wp config FTP 情報 設置
define( ‘FTP_HOST’, ‘host’ );
define( ‘FTP_USER’, ‘id’ );
define( ‘FTP_PASS’, ‘pw’ );
define( ‘FTP_SSL’, false );
弾に使う
placeholder:ユーザー入力補助
Copyright © ゆずまるの技術情報 | HTML,CSS,PHP,ワードプレスカスタマイズ 技術情報資料