本文整理汇总了PHP中post_custom函数的典型用法代码示例。如果您正苦于以下问题:PHP post_custom函数的具体用法?PHP post_custom怎么用?PHP post_custom使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了post_custom函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
<li><a class="fn-pageScroll" href="#link-contact">お問い合わせ</a></li>
<li><a href="https://tixeebox.tv/lp/how-to/" target="_blank">tixeeboxご利用方法</a></li>
</ul>
</div>
</nav>
</section>
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
?>
<div class="c-mainPanel">
<div class="c-mainPanel_body">
<?php
echo wp_get_attachment_image(post_custom('cf_keyVisual'), 'full');
?>
</div>
</div>
<?php
}
}
?>
<div class="container">
<div class="row u-mt20">
<div class="col s12">
<?php
$ctm_linkspecial = get_post_meta($post->ID, 'cf_linkSpecialLP', true);
?>
<?php
示例2: post_custom
<p>
<?php
echo post_custom("s-area-m");
?>
m<sup>2</sup>
</p>
<?php
}
?>
<p>
<?php
if (post_custom('s-price')) {
?>
<?php
echo post_custom("s-price");
?>
<?php
}
?>
</p>
</a>
<?php
}
?>
<?php
the_posts_navigation();
?>
示例3: get_posts
<h3>おすすめアクティビティ オプショナル optional</h3>
</div>
<?php
$myposts = get_posts('category_name=optional_pickup&posts_per_page=999');
?>
<?php
foreach ($myposts as $post) {
?>
<?php
setup_postdata($post);
?>
<div class="box"> <a href="<?php
the_permalink();
?>
" target="_top"><?php
echo post_custom('banner_img');
?>
</a>
<?php
/*?><p><?php echo post_custom('banner_copy'); ?></p><?php */
?>
</div>
<?php
}
?>
<div class="more"><a href="/optional/">もっと見る</a></div>
</div>
<div class="side_f"></div>
</div>
<?php
}
示例4: seo_description
function seo_description()
{
global $post;
//カスタムフィールドがある場合
if (is_single() && get_post_meta($post->ID, 'tcd-w_meta_description', true) or is_page() && get_post_meta($post->ID, 'tcd-w_meta_description', true)) {
$trim_content = post_custom('tcd-w_meta_description');
$trim_content = str_replace(array("\r\n", "\r", "\n"), "", $trim_content);
$trim_content = htmlspecialchars($trim_content);
echo $trim_content;
} elseif (is_single() && has_excerpt() or is_page() && has_excerpt()) {
$trim_content = get_the_excerpt();
$trim_content = str_replace(array("\r\n", "\r", "\n"), "", $trim_content);
echo $trim_content;
} elseif (is_single() or is_page()) {
$base_content = $post->post_content;
$base_content = preg_replace('!<style.*?>.*?</style.*?>!is', '', $base_content);
$base_content = preg_replace('!<script.*?>.*?</script.*?>!is', '', $base_content);
$base_content = preg_replace('/\\[.+\\]/', '', $base_content);
$base_content = strip_tags($base_content);
$trim_content = mb_substr($base_content, 0, 120, "utf-8");
$trim_content = str_replace(']]>', ']]>', $trim_content);
$trim_content = str_replace(array("\r\n", "\r", "\n"), "", $trim_content);
$trim_content = htmlspecialchars($trim_content);
if (preg_match("/。/", $trim_content)) {
//指定した文字数内にある、最後の「。」以降をカットして表示
mb_regex_encoding("UTF-8");
$trim_content = mb_ereg_replace('。[^。]*$', '。', $trim_content);
echo $trim_content;
} else {
//指定した文字数内に「。」が無い場合は、指定した文字数の文章を表示し、末尾に「…」を表示
echo $trim_content . '...';
}
//シングルページと固定ページ以外はサイトのディスクリプションを表示
} else {
echo get_bloginfo('description');
}
}
示例5: _e
<i class="fa fa-external-link-square"></i>
</a></td>
<td><?php
_e(post_custom('apt_code'));
?>
</td>
<td><?php
_e(post_custom('apt_prazo'));
?>
</td>
<td><?php
_e('R$ ' . number_format(post_custom('apt_value'), 2, ',', '.'));
?>
</td>
<td><?php
_e(date('d/m/Y', strtotime(post_custom('apt_expiration'))));
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
示例6: get_header
get_header();
pressmark();
?>
<p id="blurb">
Pressmark is a bookmark manager using Wordpress.<br>
You can download it on <a href="http://github.com/alx/pressmark">GitHub</a> and install it on your webhost.
</p>
<?php
if (have_posts()) {
$previous_user = "";
while (have_posts()) {
the_post();
$url = post_custom("pressmark-url");
the_date('', '<h2 style="margin-bottom: 0; color: #000; text-decoration: none;">', '</h2><div style="text-align: right; font-family: Verdana; font-size: 11px; margin: 0 0 10px 0;"></div>', true);
?>
<div class="article_bar" id="article_bar_<?php
the_ID();
?>
">
<span style="display:none;" id="urltitle<?php
the_ID();
?>
"><?php
the_title();
?>
</span>
<a id="article_link_<?php
示例7: the_views
function the_views($display = true, $prefix = '', $postfix = '', $always = false)
{
$post_views = intval(post_custom('views'));
$views_options = get_option('views_options');
if ($always || should_views_be_displayed($views_options)) {
$output = $prefix . str_replace('%VIEW_COUNT%', number_format_i18n($post_views), $views_options['template']) . $postfix;
if ($display) {
echo apply_filters('the_views', $output);
} else {
return apply_filters('the_views', $output);
}
} elseif (!$display) {
return '';
}
}
示例8: the_permalink_rss
function the_permalink_rss()
{
echo apply_filters('the_permalink_rss', post_custom("pressmark-url"));
}
示例9: elseif
?>
<p class="rank"><img src="/img/osusume_rank3-5_s.jpg" width="133" height="12" alt="3 ~5つ星"></p>
<?php
} elseif (get_post_meta($post->ID, 'baligirl_rank', true) == '4-5') {
?>
<p class="rank"><img src="/img/osusume_rank4-5_s.jpg" width="148" height="12" alt="4 ~5つ星"></p>
<?php
}
?>
<?php
}
?>
<div class="link">
<div class="tourBtn">
<a href="http://www.tabikobo.com/tour/tourresult?media=plumeriabali®ion_id=1&country_id=3&hotel_id=<?php
echo post_custom('hotel_id');
?>
">
ツアー詳細へ
</a>
</div>
<div class="hotelLink"><a href="<?php
the_permalink();
?>
">ホテル詳細はこちら</a></div>
</div>
</div>
</span>
</div>
<?php
}
示例10: get_header
*/
include '../wp-load.php';
include 'php/config.php';
include 'php/function.php';
$title = 'お問い合わせ';
//$description = '';
//$keword = '';
$css = '<link href="/carsharing/lp/contact/css/contact.css" rel="stylesheet" type="text/css" media="screen,print" />';
//$js = '';
get_header();
if ($INPUT_id) {
$args = array('page_id' => $INPUT_id);
query_posts($args);
if (have_posts()) {
the_post();
if (post_custom('pdf')) {
$file_arr = get_imagefield('pdf');
$pdf_url = $file_arr['url'];
}
$permalink = get_permalink($post->ID);
}
wp_reset_query();
}
?>
<?php
/**
* 入力チェック
*/
$flag_check = false;
示例11: biz_vektor_getHeadKeywords
function biz_vektor_getHeadKeywords()
{
$options = biz_vektor_get_theme_options();
$commonKeyWords = $options['commonKeyWords'];
// get custom field
$entryKeyWords = post_custom('metaKeyword');
// display common keywords
echo $commonKeyWords;
// If common and individual keywords exist, print ','.
if ($commonKeyWords && $entryKeyWords) {
echo ',';
}
// print individual keywords
echo $entryKeyWords;
}
示例12: the_post_thumbnail
" rel="bookmark"><?php
the_post_thumbnail();
?>
</a>
<div class="table-responsive">
<table class="table table-striped"><tbody>
<tr><th>家賃</th><td><div class="text-danger"><strong><?php
echo post_custom('textfield_common1');
?>
</strong></div></td></tr>
<tr><th>間取り</th><td><?php
echo post_custom('textfield_common3');
?>
</td></tr>
<tr><th>地域</th><td><?php
echo post_custom('radio_common2');
?>
</td></tr>
</tbody>
</table></div>
</article>
</div><!--col-->
<?php
}
?>
</div><!--front-->
<div class="row">
<div class="pager">
<?php
global $wp_rewrite;
$paginate_base = get_pagenum_link(1);
示例13: get_the_title
<?php
$title = get_the_title();
$description = esc_html(post_custom('description'));
$keword = esc_html(post_custom('keword'));
//$css = '';
//$js = '';
get_header();
the_post();
?>
<?php
the_content();
?>
<div class="btnContact"><a href="/carsharing/lp/contact/?id=<?php
the_ID();
?>
"><img src="<?php
bloginfo('template_url');
?>
/images/btn_contact.gif" alt="お問い合わせはこちら" class="over" /></a></div>
<?php
get_footer();
?>
示例14: biz_vektor_getHeadKeywords
function biz_vektor_getHeadKeywords()
{
$options = biz_vektor_get_theme_options();
if (isset($options['commonKeyWords'])) {
$commonKeyWords = esc_html($options['commonKeyWords']);
// display common keywords
echo $commonKeyWords;
}
if (is_page() || is_single()) {
// get custom field
$entryKeyWords = esc_html(post_custom('metaKeyword'));
}
// If common and individual keywords exist, print ','.
if (isset($commonKeyWords) && $commonKeyWords && isset($entryKeyWords) && $entryKeyWords) {
echo ',';
}
// print individual keywords
echo isset($entryKeyWords) ? $entryKeyWords : '';
}
示例15: updated_send_email
//.........这里部分代码省略.........
$posttags = get_the_tags();
if ($posttags) {
foreach ($posttags as $tag) {
$option_tag_tag = $tag->name . ' ';
}
}
// subject
$subject = "依頼ID:{$postid}" . "_{$category}" . "/{$categorystatus}";
// デフォルトメッセージフォームメッセージフォームから追加メッセージとあったが
// 結局コメントボックスだけでやることになったのでコメントアウト
// $defaultmess = get_field('defaultmess');
// //コンテンツ本文取得
// global $post;
// $contents = mb_substr($post->post_content, 0, 30);
// $contenttemp = nl2br($contents);
// コメント取得
// The Query
$comments_query_args = array('post_type' => 'post', 'number' => 1, 'status' => 'approve', 'post_id' => $post_id);
$comments_query = new WP_Comment_Query();
$recent_comments = $comments_query->query($comments_query_args);
// Comment Loop
if ($recent_comments) {
foreach ($recent_comments as $recent_comment) {
$quickpostcom = $recent_comment->comment_content;
}
}
// 申請者メールアドレス取得
$post = get_post($post_id);
if ($post) {
$author = get_userdata($post->post_author);
$user_email = $author->user_email;
}
// mailaddress
$ccaddress = post_custom('e_mail_cc');
// 本番用メルアド
// catoms-admin@cyberagent.co.jp
// ----------------------------------------------------------ヘッダーへ収納
$mail_address = array('fujiyamaseiji@gmail.com', $ccaddress, $user_email);
// カテゴリー判定
$category = get_the_category();
$cat_id = $category[0]->cat_ID;
$cat_name = $category[0]->cat_name;
$cat_slug = $category[0]->category_nicename;
//
//----------------------------------------------------------AWSアカウント発行申請 message
//
if (in_category('awsacountpassrequest')) {
$headers = array('Content-Type: text/html; charset=UTF-8');
$messagetest = <<<EOS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━<br>
※このメールには返信しないでください!<br>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━<br><br>
作業依頼内容URL<br>
[編集画面] {$adminurl}<br>
IDとPASSが必要です。<br><br>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━<br>
{$statusdiscription}<br>
{$quickpostcom}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━<br><br>
[社員番号] {$post_stuff}<br>
[依頼期日] {$date}<br>
[連絡先(電話番号)] {$tel}<br>