• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP post_custom函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中post_custom函数的典型用法代码示例。如果您正苦于以下问题:PHP post_custom函数的具体用法?PHP post_custom怎么用?PHP post_custom使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了post_custom函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 
开发者ID:jb-matsunaga,项目名称:dev-wocker,代码行数:31,代码来源:single.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();
    ?>
开发者ID:keizo0211,项目名称:aina,代码行数:30,代码来源:archive-sale.php


示例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 
    }
开发者ID:bibibaonam,项目名称:tmp_project,代码行数:31,代码来源:sidebar.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(']]>', ']]&gt;', $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');
    }
}
开发者ID:aim-web-projects,项目名称:kobe-chuoh,代码行数:37,代码来源:seo.php


示例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>
开发者ID:djgoulart,项目名称:intra-callcenter,代码行数:31,代码来源:page-promo.php


示例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 
开发者ID:alx,项目名称:pressmark,代码行数:30,代码来源:index.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 '';
    }
}
开发者ID:alexanderiano,项目名称:raneen,代码行数:15,代码来源:wp-postviews.php


示例8: the_permalink_rss

function the_permalink_rss()
{
    echo apply_filters('the_permalink_rss', post_custom("pressmark-url"));
}
开发者ID:versvs,项目名称:pressmark,代码行数:4,代码来源:feed.php


示例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&region_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 
    }
开发者ID:bibibaonam,项目名称:tmp_project,代码行数:31,代码来源:index.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;
开发者ID:hiroki-namekawa,项目名称:test-upr,代码行数:31,代码来源:index.php


示例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;
}
开发者ID:aim-web-projects,项目名称:kobe-chuoh,代码行数:15,代码来源:theme-options.php


示例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);
开发者ID:noboo,项目名称:db-fswp,代码行数:31,代码来源:index.php


示例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();
?>

开发者ID:hiroki-namekawa,项目名称:test-upr,代码行数:28,代码来源:page.php


示例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 : '';
}
开发者ID:liuminhan,项目名称:wordpress,代码行数:19,代码来源:theme-options.php


示例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');
    // 本番用メルアド
    // [email protected]
    // ----------------------------------------------------------ヘッダーへ収納
    $mail_address = array('[email protected]', $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>
开发者ID:hujiyama,项目名称:wordpress,代码行数:67,代码来源:postmail.php


示例16: post_views

function post_views($post_id, $echo = true, $unit = ' views')
{
    $count_key = 'views';
    $views = get_post_custom($post_id);
    $views = intval($views['views'][0]);
    $post_views = intval(post_custom('views'));
    if ($views == '') {
        //return '';
        echo '0' . $unit;
    } else {
        if ($echo) {
            echo format_number($views) . $unit;
        } else {
            return format_number($views) . $unit;
        }
    }
}
开发者ID:nooldey,项目名称:WordPress-theme-BooDing,代码行数:17,代码来源:functions.php


示例17: the_content

        ?>
" class="materialboxed" alt = "間取り図" >
	</div>
<?php 
    }
    ?>

<h2>物件イメージ</h2>
<div class="estate-gallery">
	<?php 
    the_content();
    ?>
</div>

<?php 
    if (post_custom('l-map')) {
        ?>
<h2>地図</h2>
<div class="g−map">
<?php 
        $location = get_field('l-map');
        if (!empty($location)) {
            ?>
<div class="acf-map">
	<div class="marker" data-lat="<?php 
            echo $location['lat'];
            ?>
" data-lng="<?php 
            echo $location['lng'];
            ?>
"></div>
开发者ID:keizo0211,项目名称:aina,代码行数:31,代码来源:single-rent.php


示例18: get_posts

<div class="box">
<?php 
$myposts = get_posts('category_name=spa-jimbaran-uluwatu-pickup&posts_per_page=999');
/*SPA記事ピックアップリスティング*/
foreach ($myposts as $post) {
    ?>
  <?php 
    setup_postdata($post);
    ?>
    <div class="left">
    <a href="<?php 
    the_permalink();
    ?>
" target="_top"><?php 
    echo post_custom('cityThumb');
    ?>
</a>
  <a href="<?php 
    the_permalink();
    ?>
" target="_top"><?php 
    the_title();
    ?>
</a>
    </div>
<?php 
}
?>

<div class="list">
开发者ID:bibibaonam,项目名称:tmp_project,代码行数:30,代码来源:jim.php


示例19: array

<?php 
    if (post_custom('tokuten1') && !(post_custom('tokuten_txt') && post_custom('tokuten2'))) {
        //if(is_single('padma-resort-bali-at-legian')):
        if (is_single_hotel()) {
        } else {
            $tokuten_names = array(1 => 'ハネムーン特典', 2 => 'バースデイ特典', 3 => 'お部屋アップグレード', 4 => 'レイトチェックアウト', 5 => 'スパ付き', 6 => 'ランチもしくはディナー付き');
            $tokutens1 = explode(',', post_custom('tokuten1'));
            $inner_html = '<div id="icon_box">';
            foreach ($tokutens1 as $tokuten1) {
                $inner_html .= sprintf('<div class="icon_list"><img src="/img/tokuten_icon%02d.gif" width="32" height="32" alt="%s"></div>', $tokuten1, $tokuten_names[$tokuten1]);
            }
            if (post_custom('tokuten_txt') && post_custom('tokuten2')) {
                $tokuten_text = post_custom('tokuten_txt');
                $inner_html .= sprintf('<br /><br /><br /><br />%s<br /><br />', $tokuten_text);
                $tokutens2 = explode(',', post_custom('tokuten2'));
                foreach ($tokutens2 as $tokuten2) {
                    $inner_html .= sprintf('<div class="icon_list"><img src="/img/tokuten_icon%02d.gif" width="32" height="32" alt="%s"></div>', $tokuten2, $tokuten_names[$tokuten2]);
                }
            }
            $inner_html .= '<br /><br /><br /><div class="icon_btn"><a href="/icon/icon2.html" target="window_name" onClick="disp(\'/icon/icon2.html\')">特典アイコンについて</a></div></div>';
            ?>
<div id="tokuten_hidden" style="display:none;"><?php 
            echo $inner_html;
            ?>
</div>
<script type="text/javascript">
$(function(){
  try{
    $("div#rooms_toku table tbody tr td").append($("div#tokuten_hidden").html());
  }catch(e){}
开发者ID:bibibaonam,项目名称:tmp_project,代码行数:30,代码来源:content-single-villa.php


示例20: the_content

        ?>
" class="materialboxed" alt = "間取り図" >
 </div>
<?php 
    }
    ?>

<h2>物件イメージ</h2>
<div class="estate-gallery">
 <?php 
    the_content();
    ?>
</div>

<?php 
    if (post_custom('s-map')) {
        ?>
 <h2>地図</h2>
 <div class="g−map">
  <?php 
        $location = get_field('s-map');
        if (!empty($location)) {
            ?>
  <div class="acf-map">
   <div class="marker" data-lat="<?php 
            echo $location['lat'];
            ?>
" data-lng="<?php 
            echo $location['lng'];
            ?>
"></div>
开发者ID:keizo0211,项目名称:aina,代码行数:31,代码来源:single-sale.php



注:本文中的post_custom函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP post_data函数代码示例发布时间:2022-05-15
下一篇:
PHP post_comments_feed_link函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap