function shortcode($atts, $content = null) { $defaults = array(); foreach ($this->widget_handler->config as $opt => $values) { $defaults[$opt] = $values['default']; } $atts2 = shortcode_atts($defaults, $atts); foreach (array_keys($this->widget_handler->config) as $key) { ${$key} = $atts2[$key]; } $ret = ''; if ($post_id && !$this_post) { if ('current' == $post_id) { $ret = c2c_get_current_custom($field, $before, $after, $none, $between, $before_last); } elseif ($random) { $ret = c2c_get_random_post_custom($post_id, $field, $limit, $before, $after, $none, $between, $before_last); } else { $ret = c2c_get_post_custom($post_id, $field, $before, $after, $none, $between, $before_last); } } else { if ($this_post) { $ret = c2c_get_custom($field, $before, $after, $none, $between, $before_last); } elseif ($random) { $ret = c2c_get_random_custom($field, $before, $after, $none); } else { $ret = c2c_get_recent_custom($field, $before, $after, $none, $between, $before_last, $limit); } } return $ret; }
<div id="index-text-invader" class="index-text"> <div> <h3>アート&デザインのための衛星</h3> 芸術衛星 INVADER (INteractiVe satellite for Art and Design Experimental Research) は、衛星芸術専用の1U CubeSat規格衛星です。CubeSatとしての最小限の機能を最大限に活用して、さまざまな衛星芸術ミッションを行います。衛星開発の主体は、東京大学チームが担当し、地上局系、およびデータ利用系を多摩美術大学チームが担当します。 </div> <a href="<?php bloginfo('url'); ?> /invader/" class="viewmore">VIEW MORE</a> </div> </div> <!-- /.index-text-wapper --> <ul id="link-banner" class="clearfix"> <?php $lastposts = get_posts('include=17&post_type=page'); foreach ($lastposts as $post) { setup_postdata($post); echo c2c_get_custom('banner-link', '', '', '', '', ''); } ?> </ul> <br /> </div> <!-- /#contents --> <?php get_footer();
<?php get_header(); get_sidebar(); ?> <div id="contents"> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <div class="page"> <div class="page-header-img"><?php echo c2c_get_custom('page-header-img', '', '', '', '', ''); ?> </div> <div class="page-inner"> <h2><?php the_title(); ?> </h2> <?php the_content(); ?> </div> </div> <?php }