当前位置: 首页>>代码示例>>PHP>>正文


PHP print_custom_field函数代码示例

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


在下文中一共展示了print_custom_field函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: print_custom_field

</div>
			</div>
		  </div>
		</div>
	  </div>
	</div>
</div>
<div class="container">
  <div class="row">
	<div class="col-xs-8">
	  <h4>Bio <?php 
        print_custom_field('ChannelAuthor');
        ?>
</h4>
	  <p><?php 
        print_custom_field('bio');
        ?>
</p>
	  <?php 
        $value = get_custom_field('weburl');
        if (!empty($value)) {
            echo "<a href='{$value}'><strong>Web URL</strong></a>";
        }
        ?>
	</div>
  </div>
</div>
</div>
</div>
<?php 
    }
开发者ID:rmalina,项目名称:creativedisturbance,代码行数:31,代码来源:single-people.php

示例2: print_custom_field

</h2>
						<p>with <?php 
        print_custom_field('voices');
        ?>
</p>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<div class="container">
	<div class="row">
		<div class="col-xs-12 col-md-offset-1 col-md-9">
		<h2>Disturbances</h2>
		<p class="lead">Audio</p> 
		<p><strong>Detail</strong> <?php 
        print_custom_field('detail');
        ?>
<br /></p> 
		</div>
	</div>
<?php 
    }
}
// end of the loop.
?>

<?php 
get_footer();
开发者ID:rmalina,项目名称:creativedisturbance,代码行数:31,代码来源:single-disturbance.php

示例3: populate_custom_column_data

    /**
     * Populate the custom data for a given column.  This function should actually
     * *print* data, not just return it.
     * Oddly, WP doesn't even send the column this way unless it is something custom.
     * Note that things get all broken and wonky if you do not include the "post_title" 
     * column, so we rely on the $this->no_title_flag boolean variable (set in __call)
     * to trigger customizations here which print out the various eye-candy
     * "Edit/Trash/View" links when the post_title column has been omitted.
     *
     * See https://code.google.com/p/wordpress-custom-content-type-manager/issues/detail?id=443
     *
     * @param string $column name
     */
    public function populate_custom_column_data($column)
    {
        // See https://code.google.com/p/wordpress-custom-content-type-manager/wiki/CustomColumns
        $function_name = 'cctm_custom_column_' . $this->post_type . '_' . $column;
        if (function_exists($function_name)) {
            return $function_name();
        }
        global $post;
        if ($this->last_post != $post->ID) {
            $this->new_row = true;
        }
        // This attaches the Edit/Trash/View links to the first column if the post_title isn't there
        if ($this->no_title_flag && $this->new_row) {
            printf('<strong><a class="row-title" href="post.php?post=%s&amp;action=edit">', $post->ID);
        }
        $meta = get_custom_field_meta($column);
        if ($meta['type'] === "image") {
            $id = get_custom_field($column . ":raw");
            printf('<a target="_blank" href="%s">%s</a>', get_edit_post_link($id), wp_get_attachment_image($id, "thumbnail"));
        } elseif ($meta['type'] === "relation") {
            $id = get_custom_field($column . ":raw");
            printf('<a target="_blank" href="%s">%s</a>', get_edit_post_link($id), get_the_title($id));
        } else {
            print_custom_field($column);
        }
        // End the anchor
        if ($this->no_title_flag && $this->new_row) {
            print '</a></strong>
				<div class="row-actions"><span class="edit"><a href="post.php?post=' . $post->ID . '&amp;action=edit" title="' . __('Edit') . '">' . __('Edit') . '</a> | </span>
				<span class="inline hide-if-no-js"><a href="#" class="editinline">' . __('Quick Edit') . '</a> | </span><span class="trash"><a class="submitdelete" href="' . get_delete_post_link($post->ID) . '">' . __('Trash') . '</a> | </span><span class="view"><a href="' . get_permalink($post->ID) . '" rel="permalink">' . __('View') . '</a></span>';
            $this->new_row = false;
            $this->last_post = $post->ID;
        }
    }
开发者ID:ethaizone,项目名称:custom-content-type-manager,代码行数:47,代码来源:CCTM_Columns.php

示例4: url

            echo '<div class="blog-post-thumbnail-wrapper"><div class="blog-post-thumbnail" style="background: url(' . $image[0] . '); background-size: cover;"></div></div>';
        }
        ?>
			<div class="blog-post-text">
				<h2><a href="<?php 
        esc_url(the_permalink());
        ?>
" title="Permalink to <?php 
        the_title();
        ?>
" rel="bookmark"><?php 
        the_title();
        ?>
</a></h2>
				<p><?php 
        print_custom_field('summary');
        ?>
</p>
				<p class="blog-post-meta">
					Published on <time datetime="<?php 
        the_time('Y-m-d');
        ?>
" pubdate><?php 
        the_date('F jS, Y');
        ?>
</time><br />
					Written by <?php 
        the_author();
        ?>
				</p>
			</div>
开发者ID:randybruder,项目名称:Build-Institute,代码行数:31,代码来源:category.php

示例5: get_header

?>

<?php 
get_header();
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
<div class="feature-block">
	<div class="page-feature">
		<h1><?php 
        the_title();
        ?>
</h1>
		<div class="item" style="background-image:url('<?php 
        print_custom_field('pageHeroImage:to_image_src');
        ?>
');"></div>
	</div>	
</div><!-- /feature-block -->

<div class="video-block">
	<div class="container">
		<div class="row">
			<div class="col-xs-10 col-xs-offset-1">
				<div class="video-container">
					<iframe width="778" height="433" src="http://www.youtube.com/embed/ELnHNNg4sGM?modestbranding=1&iv_load_policy=3&rel=0&showinfo=0" frameborder="0"></iframe>
				</div>
			</div>
		</div>
	</div>
开发者ID:mattywebb,项目名称:cyclery-northside,代码行数:31,代码来源:tmp-bgfit-process.php

示例6: WP_Query

$my_query = new WP_Query($args);
if ($my_query->have_posts()) {
    while ($my_query->have_posts()) {
        $my_query->the_post();
        ?>

			<div class="col-xs-12 col-sm-4">
				<a href="<?php 
        the_permalink();
        ?>
?category=<?php 
        the_title();
        ?>
" class="tile cat" >
					<img src="<?php 
        print_custom_field('bikeCatImage');
        ?>
" alt="<?php 
        the_title();
        ?>
"/>
					<h2><?php 
        the_title();
        ?>
</h2>
				</a>
			</div>	
			<?php 
    }
}
wp_reset_query();
开发者ID:mattywebb,项目名称:cyclery-northside,代码行数:31,代码来源:tmp-bikes.php

示例7: array

$var = 0;
$args = array('post_type' => $type, 'post_status' => 'publish', 'posts_per_page' => 5, 'caller_get_posts' => 1);
$my_query = null;
$my_query = new WP_Query($args);
while ($my_query->have_posts()) {
    $my_query->the_post();
    ?>
			<h3><a href="<?php 
    the_permalink();
    ?>
"><?php 
    print_custom_field('topic');
    ?>
</a></h3>
			<p><?php 
    print_custom_field('voices');
    ?>
</p>
			<p class="text-muted">Posted on <?php 
    the_time('F jS, Y');
    ?>
</p>
			<?php 
}
wp_reset_query();
?>
		</div>
	</div>
</div>
<?php 
get_footer();
开发者ID:rmalina,项目名称:creativedisturbance,代码行数:31,代码来源:front-page.php

示例8: while

?>
				<?php 
while ($query->have_posts()) {
    $query->the_post();
    ?>
	  			<div class="testimonial-item">
		  			<img src="<?php 
    print_custom_field('customerImage');
    ?>
"/>
		  			<h3><?php 
    the_title();
    ?>
</h3>
		  			<h4><?php 
    print_custom_field('customerName');
    ?>
</h4>
		  			<?php 
    the_content();
    ?>
				</div><!-- /testimonial-item -->
				<?php 
}
wp_reset_postdata();
?>
			</div>
		</div>
	</div>
</div><!-- /testimonial-block -->
开发者ID:mattywebb,项目名称:cyclery-northside,代码行数:30,代码来源:tmp-bgfit.php

示例9: the_permalink

                }
            }
            $my_query->reset_postdata();
        }
    }
    ?>
				<div class="col-md-2"><img src="<?php 
    echo $url1;
    ?>
" class="img-responsive"/></div>
				<div class="col-md-10">
					<h3><a href="<?php 
    the_permalink();
    ?>
"><?php 
    print_custom_field('episode');
    ?>
</a></h3>
					<p>
						<?php 
    $voices = get_custom_field('voices:to_array');
    $i = 0;
    foreach ($voices as $item) {
        if ($i == 0) {
            echo "{$item}";
        } else {
            echo ", {$item}";
        }
        $i = $i + 1;
    }
    ?>
开发者ID:rmalina,项目名称:creativedisturbance,代码行数:31,代码来源:front-page.php

示例10: the_title

        the_title();
        ?>
</h1>
		<div class="item" style="background-image:url('<?php 
        print_custom_field('pageHeroImage:to_image_src');
        ?>
');"></div>
		<div class="container">
			<div class="row">
				<div class="col-xs-10 col-xs-offset-1 col-md-8 col-md-offset-2 pre-text">
					<h2><?php 
        print_custom_field('tagline');
        ?>
</h2>
					<p><?php 
        print_custom_field('headingcopy');
        ?>
</p>
				</div>
			</div>
		</div>
	</div>	
</div><!-- /feature-block -->

<div class="subnav-block">
	<div class="container">
		<div class="row">
			<div class="col-xs-12 col-xs-offset-0 col-md-8 col-md-offset-2">
				<ul class="subnav">
					<li><a href="<?php 
        bloginfo('url');
开发者ID:mattywebb,项目名称:cyclery-northside,代码行数:31,代码来源:tmp-workshop.php

示例11: print_custom_field

            print_custom_field('associated_company');
            ?>
</h2>
		</div>
	
		<?php 
        } else {
            ?>
	
		<div id="profile-title">
			<h1><?php 
            the_title();
            ?>
</h1><br />
			<h2><?php 
            print_custom_field('associated_company');
            ?>
</h2>
		</div>
	
		<?php 
        }
        ?>
	
	<div id="profile-content">
		<?php 
        the_content();
        ?>
	</div>
	
	<!-- Shortcode doesn't seem to work, just hardcoding the HTML in here, suppose it's the same anyway -->
开发者ID:randybruder,项目名称:Build-Institute,代码行数:31,代码来源:single-profile.php

示例12: print_custom_field

				</audio>
				<a href="<?php 
        print_custom_field('AudioURL');
        ?>
" download="<?php 
        print_custom_field('episode');
        ?>
.mp3">Download</a>
			</p> 
			<p><strong>Detail</strong> <?php 
        print_custom_field('detail');
        ?>
<br /></p>
			
			<h6><?php 
        print_custom_field('topic');
        ?>
</h6>
		</div>
		<div class="col-md-2 text-right">
			<h4>Voices</h4>
			<?php 
        $i = 0;
        $people = new WP_Query(array('post_type' => 'people', 'post_status' => 'publish', 'posts_per_page' => -1));
        if ($people->have_posts()) {
            while ($people->have_posts()) {
                $people->the_post();
                foreach ($voices as $item) {
                    if (get_the_title() == $item) {
                        echo "<img src=\"" . get_custom_field('photo:to_image_src') . "\" class='img-responsive'/>";
                    }
开发者ID:rmalina,项目名称:creativedisturbance,代码行数:31,代码来源:single-podcast.php

示例13: the_title

" alt="<?php 
        the_title();
        ?>
" />
					<div class="details">
						<h3><?php 
        the_title();
        ?>
</h3>
						<?php 
        the_content();
        ?>
	
					</div>
					<span class="price"><?php 
        print_custom_field('specialPrice');
        ?>
</span>			
				</div>
				
			</div>
		</div>
	</div>
</div><!-- /content-block -->	
<?php 
    }
}
?>
<div class="cta-block">
	<div class="container">
		<div class="row">
开发者ID:mattywebb,项目名称:cyclery-northside,代码行数:31,代码来源:single-specials.php

示例14: print_custom_field

        ?>
</a></h2>
				<p><?php 
        print_custom_field('summary');
        ?>
</p>
				<p class="blog-post-meta">
					Published on <time datetime="<?php 
        the_time('Y-m-d');
        ?>
" pubdate><?php 
        the_date('F jS, Y');
        ?>
</time><br />
					Written by <?php 
        print_custom_field('post_author_custom');
        ?>
<br /><br />
					
					<?php 
        $postcategories = get_categories();
        if ($postcategories) {
            if (count($postcategories) == 1) {
                echo '<strong>Catergory:</strong> ';
            } else {
                echo '<strong>Catergories:</strong> ';
            }
            foreach ($postcategories as $category) {
                echo $category->name . ', ';
            }
            echo '<br />';
开发者ID:randybruder,项目名称:Build-Institute,代码行数:31,代码来源:index.php

示例15: get_permalink

					<a href="<?php 
        echo get_permalink();
        ?>
"><?php 
        echo CCTM::filter(get_post_meta(get_the_ID(), 'slider_image', true), 'to_image_tag', 'overview-img');
        ?>
</a>
					<a href="<?php 
        echo get_permalink();
        ?>
">
						<p class="related-title-white"><?php 
        print_custom_field('overview_title');
        ?>
<span><?php 
        print_custom_field('overview_subtitle');
        ?>
</span></p>
					</a>
				</div>

				<?php 
        if ($counter === 2 || ($counter - 2) % 3 === 0) {
            ?>
		      <div class="clearfix visible-md visible-lg "></div>
        <?php 
        }
        ?>


		<?php 
开发者ID:victorlabigar,项目名称:studioviq-theme,代码行数:31,代码来源:page-home.php


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