コード例 #1
6
ファイル: our-mission.php プロジェクト: kautzar/drpp4
function charity_vc_our_mission($atts, $content = null)
{
    extract(shortcode_atts(array('our_mission' => ''), $atts));
    $page_id = get_page_by_title($our_mission);
    $missionQuery = new WP_Query(array("page_id" => $page_id->ID));
    if ($missionQuery->have_posts()) {
        $missionQuery->the_post();
        $url = wp_get_attachment_image_src(get_post_thumbnail_id($page_id->ID), array(1143, 479));
        ?>
        <!-- Save Lives Section Start Here-->
        <section class="save-lives text-center parallax" style="background-image: url('<?php 
        echo esc_url($url[0]);
        ?>
')">
            <div class="container">
                <div class="row">
                    <div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3">
                        <header class="page-header">
                            <h2><?php 
        the_title();
        ?>
</h2>
                            <?php 
        the_content();
        ?>
                        </header>
                    </div>
                </div>
            </div>
        </section>
        <!-- Save Lives Section Start Here-->
    <?php 
    }
    wp_reset_postdata();
}
コード例 #2
2
 function do_x_post_password_cb()
 {
     //snag from wp-login.php:386-393
     require_once ABSPATH . 'wp-includes/class-phpass.php';
     // By default, use the portable hash from phpass
     $wp_hasher = new PasswordHash(8, true);
     // 10 days
     setcookie('wp-postpass_' . COOKIEHASH, $wp_hasher->HashPassword(stripslashes($_POST['pass'])), time() + 864000, COOKIEPATH);
     //fake it so it's available in the loop below
     $_COOKIE['wp-postpass_' . COOKIEHASH] = $wp_hasher->HashPassword(stripslashes($_POST['pass']));
     $q = new WP_Query("p={$_POST['pid']}");
     if ($q->have_posts()) {
         while ($q->have_posts()) {
             $q->the_post();
             // verifies password hash
             if (post_password_required()) {
                 wp_send_json_error('Invalid password');
             }
             // get post title
             ob_start();
             the_title(sprintf('<a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a>');
             $title = ob_get_clean();
             // get post content
             ob_start();
             the_content();
             $content = ob_get_clean();
         }
     }
     wp_reset_postdata();
     $return = array('title' => $title, 'content' => $content);
     wp_send_json_success($return);
 }
コード例 #3
0
    function block($instance)
    {
        extract($instance);
        $query_args = array('post_type' => 'testimonial', 'posts_per_page' => $pppage);
        if (!($filter == 'all')) {
            if (function_exists('icl_object_id')) {
                $filter = (int) icl_object_id($filter, 'testimonial-category', true);
            }
            $query_args['tax_query'] = array(array('taxonomy' => 'testimonial-category', 'field' => 'id', 'terms' => $filter));
        }
        $testimonial_query = new WP_Query($query_args);
        if ($testimonial_query->have_posts()) {
            while ($testimonial_query->have_posts()) {
                $testimonial_query->the_post();
                ?>
	
		<div class="text-center services-1 col-md-3">
			<div class="col-wrapper">
				<?php 
                the_title('<h5 class="upper">', '</h5>');
                the_content();
                ?>
			</div>
		</div>
	
	<?php 
            }
        } else {
            /**
             * Display no posts message if none are found.
             */
            get_template_part('loop/content', 'none');
        }
        wp_reset_query();
    }
コード例 #4
0
function load_5speed_archive()
{
    echo "<h3 class=\"list-title\">My list of reasons why I drive a manual transmission car:</h3>";
    echo "<div class=\"5speed\">";
    while (have_posts()) {
        the_post();
        ?>
        <li>
            <h3 style="margin-bottom:0px;"># <a href="<?php 
        the_permalink();
        ?>
" rel="bookmark" title="Reason <?php 
        the_title_attribute();
        ?>
"><?php 
        the_title();
        ?>
</a></h3>
            <?php 
        the_content();
        ?>
        </li>
    <?php 
    }
    echo "</div>";
}
コード例 #5
0
 /**
  * Display widget content.
  *
  * @param array $args Display arguments including before_title, after_title, before_widget, and after_widget.
  * @param array $instance The settings for the particular instance of the widget
  */
 function widget($args, $instance)
 {
     extract($args);
     $instance = wp_parse_args((array) $instance, $this->defaults);
     $featured_page = new WP_Query(array('page_id' => $instance['page_id']));
     echo $before_widget . '<div class="feature-page">';
     if (!empty($instance['title'])) {
         echo $before_title . apply_filters('widget_title', $instance['title'], $instance, $this->id_base) . $after_title;
     }
     if ($featured_page->have_posts()) {
         while ($featured_page->have_posts()) {
             $featured_page->the_post();
             echo '<div class="' . implode(' ', get_post_class()) . '">';
             if (!empty($instance['show_title'])) {
                 printf('<h4 class="entry-title"><a href="%s" title="%s">%s</a></h4>', get_permalink(), the_title_attribute('echo=0'), get_the_title());
             }
             //Show image
             if (!empty($instance['show_image'])) {
                 printf('<a href="%s" title="%s" class="%s">%s</a>', get_permalink(), the_title_attribute('echo=0'), esc_attr($instance['image_alignment']), calibrefx_get_image(array('format' => 'html', 'size' => $instance['image_size'])));
             }
             if (!empty($instance['show_content'])) {
                 if (empty($instance['content_limit'])) {
                     the_content($instance['more_text']);
                 } else {
                     the_content_limit((int) $instance['content_limit'], esc_html($instance['more_text']));
                 }
             }
             echo '</div><!--end post_class()-->' . "\n\n";
         }
     }
     echo '</div>' . $after_widget;
     wp_reset_query();
 }
コード例 #6
0
        function categori_news(){
            query_posts('cat=9&showposts=10&posts_per_page=3');

            while (have_posts()) : the_post();
                /*Dima insert*/the_excerpt(); ?>
                <div class="content-box">
                    <div class="bgr01"><div class="bgr02"><div class="bgr03">
                                <div <?php post_class() ?> id="post-<?php the_ID(); ?>" style=" float:none; ">
                                    <div class="title">
                                        <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
                                        <div class="date_all">
                                            <?php the_time('l, j ?F, Y') ?>
                                        </div>
                                        <div class="post">
                                            Написал <?php the_author_link() ?> <?php the_time('g:i A') ?>
                                        </div>
                                    </div>
                                    <div class="content_box">
                                        <?php the_content('Читать всё'); ?>
                                    </div>

                                    <div class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?></div>

                                    <div class="comments"><?php comments_popup_link('0 комментарии', 'комментарии', '% комментарии '); ?></div>
                                    <div class="link-edit"><?php edit_post_link('Edit', ''); ?></div>
                                </div>
                            </div></div></div>
                </div>
            <?php endwhile;}
コード例 #7
0
/**
 * Template for BuddyPress pages
 * 
 * @package ThemifyFlow
 * @since 1.0.0
 */
function tf_buddypress()
{
    while (have_posts()) {
        the_post();
        the_content();
    }
}
コード例 #8
0
ファイル: ci_widget_post_type.php プロジェクト: axxe16/bst
        function widget($args, $instance)
        {
            extract($args);
            $ci_post_id = $instance['postid'];
            $post_type_name = $instance['post_type_name'];
            if (empty($ci_post_id) or empty($post_type_name)) {
                return;
            }
            $q = new WP_Query(array('post_type' => $post_type_name, 'p' => $ci_post_id));
            echo $before_widget;
            $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
            while ($q->have_posts()) {
                $q->the_post();
                global $post;
                if (get_post_type() == 'testimonial') {
                    ?>
					<blockquote class="testimonial">
						<i class="fa fa-quote-left"></i>
						<?php 
                    the_content();
                    ?>
						<cite><?php 
                    the_title();
                    ?>
</cite>
					</blockquote>
				<?php 
                } else {
                    ci_get_template_part('loop', 'item', array('title' => $title));
                }
            }
            wp_reset_postdata();
            echo $after_widget;
        }
コード例 #9
0
/**
 * POST CONTENT - query posts
 *
 * output post content for Query Posts widget, based on predefined arguments
 * @since 7.0
 */
function bizz_post_content_query($args = '', $post_count = false)
{
    global $wp_query, $post, $opt;
    bizz_hook_before_post($post_count);
    #hook
    echo "<" . apply_filters('bizz_html5_section', "div") . " class=\"format_text\">\n";
    $selflink = isset($args['thumb_selflink']) && $args['thumb_selflink'] == true ? true : false;
    $cropp = isset($args['thumb_cropp']) && $args['thumb_cropp'] != '' ? $args['thumb_cropp'] : 'c';
    if (isset($opt['bizzthemes_thumb_show']['value']) && $args['thumb_display']) {
        bizz_image('width=' . $args['thumb_width'] . '&height=' . $args['thumb_height'] . '&class=thumbnail ' . $args['thumb_align'] . '&cropp=' . $cropp . '&selflink=' . $selflink . '&filter=' . $args['thumb_filter'] . '&sharpen=' . $args['thumb_sharpen'] . '');
    }
    if ($args['remove_posts'] == '0') {
        if ($args['full_posts'] == '0' && (is_archive() || $wp_query->is_posts_page || is_search() || is_home())) {
            the_excerpt();
            if ($args['read_more']) {
                echo apply_filters('bizz_read_more', '<span class="read-more"><a href="' . get_permalink() . '" class="url fn" rel="nofollow">' . $args['read_more_text'] . '</a></span>');
            }
        } else {
            the_content($args['read_more_text']);
        }
        wp_link_pages(array('before' => '<div class="page-link">', 'after' => '</div>'));
    }
    echo '<div class="fix"><!----></div>';
    echo "</" . apply_filters('bizz_html5_section', "div") . ">\n";
    bizz_hook_after_post($post_count);
    #hook
}
コード例 #10
0
ファイル: functions.php プロジェクト: ruanltbg/jQuery-Brasil
    echo "</div>";
}
function _post()
{
    ?>
<!-- POSTS -->
<div class="post">
	<div class="posthead">
		<span class="date">
			<?php 
    the_time('d/m/Y');
    ?>
		</span><!-- /date -->
		<span class="autor">
			<?php 
    the_author_posts_link();
    ?>
 
		</span>
		<?php 
    //the_category(" | ")
    ?>
	</div><!-- /headpost -->
	<div class="postcontent">
		<h1><a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    the_title();
コード例 #11
0
ファイル: template.php プロジェクト: djs11491/gallant
function oe_main_slider($numbers = -1)
{
    global $post;
    $query = new WP_Query(array('post_type' => 'slider', 'posts_per_page' => $numbers));
    $imgArray = array();
    if ($query->have_posts()) {
        echo '<div id="header_slider" class="owl-carousel owl-theme">';
        while ($query->have_posts()) {
            $query->the_post();
            $slide_color = get_post_meta($post->ID, 'oe_slider_bg', true);
            ?>
        <div class="item slider-info" style="background-color:<?php 
            echo $slide_color;
            ?>
;">
            <div class="text-slider">
                <?php 
            the_content();
            echo '<a href="#" id="scroll_to"><span class="scroll-down"><span class="img-scroll-down"></span></span>' . __('see what we can do for you.', 'oneengine') . '</a>';
            ?>
            </div>
            <?php 
            the_post_thumbnail('full');
            ?>
        </div>
        
    <?php 
        }
        echo '</div>';
    }
    wp_reset_query();
}
コード例 #12
0
 /**
  * widget function.
  *
  * @see WP_Widget
  * @access public
  * @param array $args
  * @param array $instance
  * @return void
  */
 function widget($args, $instance)
 {
     if ($this->get_cached_widget($args)) {
         return;
     }
     global $job_manager;
     extract($args);
     if ('' == get_the_content()) {
         return;
     }
     $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
     $icon = isset($instance['icon']) ? $instance['icon'] : null;
     if ($icon) {
         $before_title = sprintf($before_title, 'ion-' . $icon);
     }
     ob_start();
     echo $before_widget;
     remove_filter('the_content', array($job_manager->post_types, 'job_content'));
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     the_content();
     echo $after_widget;
     $content = ob_get_clean();
     echo apply_filters($this->widget_id, $content);
     $this->cache_widget($args, $content);
 }
コード例 #13
0
ファイル: functions.php プロジェクト: slaven-ii/pecina
function get_rendered_content()
{
    ob_start();
    the_content();
    $content = ob_get_clean();
    return $content;
}
コード例 #14
0
ファイル: mega-menu.php プロジェクト: estvmachine/nicowp
 static function display_mega_menu_contents($output, $item, $depth, $args)
 {
     $item = (array) $item;
     $args = (array) $args;
     if (empty($args['hide_mega_menu']) && $depth == 0 && $item['object'] == 'ts_mega_menu' && $args['theme_location'] == 'main_nav') {
         $mega_menu_id = $item['object_id'];
         //echo '<pre>'.esc_html(print_r($item, true)).'</pre>'; // debug
         if (!empty($mega_menu_id) && ($mega_menu = get_post($mega_menu_id)) && !is_wp_error($mega_menu)) {
             // We have a mega menu to display.
             $wrapper_classes = apply_filters('ts-mega-menu-classes', array('ts-mega-menu'), $item, $depth, $args);
             global $post;
             $old_post = $post;
             $post = $mega_menu;
             setup_postdata($mega_menu);
             ob_start();
             the_content();
             $contents = ob_get_clean();
             wp_reset_postdata();
             if (!empty($contents)) {
                 $output .= '<ul class="sub-menu ' . esc_attr(implode(' ', $wrapper_classes)) . "\">\n";
                 $output .= '<li class="menu-item ts-mega-menu-wrap">' . "\n";
                 $output .= $contents;
                 $output .= '</li>' . "\n";
                 $output .= "</ul>\n";
             }
             $post = $old_post;
             if (!is_404()) {
                 setup_postdata($post);
             }
         }
     }
     return $output;
 }
コード例 #15
0
ファイル: post.php プロジェクト: jasonmcclurg/lbm
    /**
     * Display the post content with a link to the single post
     * @since 1.0.0
     */
    function storefront_post_content()
    {
        ?>
		<?php 
        if (is_search()) {
            ?>
			<div class="entry-summary">
				<h2><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></h2>
				<?php 
            the_excerpt();
            ?>
			</div><!-- .entry-summary -->
		<?php 
        } else {
            ?>
			<div class="entry-content" itemprop="articleBody">
				<?php 
            if (has_post_thumbnail()) {
                the_post_thumbnail('full', array('itemprop' => 'image'));
            }
            the_content(sprintf(__('Continue reading %s', 'storefront'), '<span class="screen-reader-text">' . get_the_title() . '</span>'));
            wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'storefront'), 'after' => '</div>'));
            ?>
			</div><!-- .entry-content -->
		<?php 
        }
    }
コード例 #16
0
        /**
         * The template part for displaying page content
         *
         * @package Customizr
         * @since Customizr 3.0
         */
        function tc_page_content() {
            if ( 'page' != tc__f('__post_type') || ! is_singular() || tc__f( '__is_home_empty') )
                return;

            ob_start();

                do_action( '__before_content' );
                ?>

                <div class="entry-content">
                    <?php
                        the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>' , 'customizr' ) );
                        wp_link_pages( array(
                            'before'        => '<div class="btn-toolbar page-links"><div class="btn-group">' . __( 'Pages:' , 'customizr' ),
                            'after'         => '</div></div>',
                            'link_before'   => '<button class="btn btn-small">',
                            'link_after'    => '</button>',
                            'separator'     => '',
                            )
                        );
                    ?>
                </div>

                <?php
                do_action( '__after_content' );

            $html = ob_get_contents();
            if ($html) ob_end_clean();
            echo apply_filters( 'tc_page_content', $html );
        }
コード例 #17
0
ファイル: template-speakers.php プロジェクト: hscale/webento
/**
 * Speaker Loop
 *
 */
function sc_speaker_loop()
{
    $args = array('post_type' => 'sc-speakers', 'posts_per_page' => '-1', 'orderby' => 'menu_order', 'order' => 'ASC');
    $loop = new WP_Query($args);
    if ($loop->have_posts()) {
        while ($loop->have_posts()) {
            $loop->the_post();
            global $post;
            echo '<div class="speaker"><div class="one-half first">';
            $image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'sc_thumbnail');
            if ($image) {
                echo '<p><img src="' . $image[0] . '" class="border" alt="' . get_the_title() . '" /></p>';
            }
            $url = esc_url(get_post_meta($post->ID, 'sc_speaker_url', true));
            if (!empty($url)) {
                echo '<h4><a href="' . $url . '" target="_blank">' . $url . '</a></h4>';
            }
            $twitter = esc_attr(get_post_meta($post->ID, 'sc_speaker_twitter', true));
            if (!empty($twitter)) {
                echo '<p><a href="http://www.twitter.com/' . $twitter . '" target="_blank">@' . $twitter . '</a></p>';
            }
            echo '</div><div class="one-half">';
            echo '<h2><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>';
            the_content();
            echo '</div></div>';
        }
    }
    wp_reset_query();
}
コード例 #18
0
function gdlr_lms_certificate_form($course_id, $settings)
{
    global $gdlr_lms_cer_settings, $post;
    $certificate_val = gdlr_lms_decode_preventslashes(get_post_meta($settings['template'], 'gdlr-lms-certificate-settings', true));
    $certificate_options = empty($certificate_val) ? array() : json_decode($certificate_val, true);
    $gdlr_lms_cer_settings = $settings;
    $gdlr_lms_cer_settings['course_id'] = $course_id;
    ?>
<div class="gdlr-lms-lightbox-container certificate-form">
	<?php 
    if (!empty($certificate_options['custom-css'])) {
        echo '<style type="text/css">' . $certificate_options['custom-css'] . '</style>';
    }
    ?>
	<?php 
    if (empty($certificate_options['enable-printer']) || $certificate_options['enable-printer'] == 'enable') {
        ?>
	<div class="gdlr-lms-lightbox-printer"><i class="fa fa-print icon-print"></i></div>
	<?php 
    }
    ?>
	<div class="gdlr-lms-lightbox-close"><i class="fa fa-remove icon-remove"></i></div>

	<div class="certificate-form-printable gdlr-printable">
	<?php 
    $post = get_post($settings['template']);
    setup_postdata($post);
    the_content();
    wp_reset_postdata();
    ?>
	</div>	
</div>
<?php 
}
コード例 #19
0
 /**
  * widget function.
  *
  * @see WP_Widget
  * @access public
  * @param array $args
  * @param array $instance
  * @return void
  */
 function widget($args, $instance)
 {
     if ($this->get_cached_widget($args)) {
         return;
     }
     global $job_manager;
     extract($args);
     if ('' == get_the_content()) {
         return;
     }
     $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
     $icon = isset($instance['icon']) ? $instance['icon'] : null;
     if ($icon) {
         $before_title = sprintf($before_title, 'ion-' . $icon);
     }
     ob_start();
     echo $before_widget;
     remove_filter('the_content', array($job_manager->post_types, 'job_content'));
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     do_action('listify_widget_job_listing_content_before');
     the_content();
     $listing_title = get_the_title();
     echo '<table class="table table-no-border"><tr><td colspan="3"><span class="labelHeading">About HobbyGaze</span></td></tr><tr><td colspan="3">HobbyGaze is an online portal to help you discover places where you can do things you truly love. Whether you want to learn new skills, have fun time with friends or get fit, you can find all these places on HobbyGaze. In the fun category, you can find places for paintball, laser tagging, bowling, go- karting, amusement parks and so on. In the fitness category, you can find gyms, yoga studios, fitness studios, dance, zumba, etc. In the learning category, you will find places for learning arts like singing, painting, dancing. HobbyGaze also lists places to learn new languages, sports etc.<br/>So the next time when you are confused about what to do in your free time, just checkout HobbyGaze and spend your time in a meaningful, satisfactory way! This is the HobbyGaze listing of ' . $listing_title . '</td></tr></table>';
     do_action('listify_widget_job_listing_content_after');
     echo $after_widget;
     $content = ob_get_clean();
     echo apply_filters($this->widget_id, $content);
     $this->cache_widget($args, $content);
 }
コード例 #20
0
ファイル: 05.blog.php プロジェクト: nvvetal/water
function thinkup_input_blogtext()
{
    global $more;
    global $post;
    global $thinkup_blog_postswitch;
    // Output post thumbnail / featured media
    if (is_search()) {
        the_excerpt();
    } else {
        if (!is_search()) {
            if ($thinkup_blog_postswitch == 'option1' or empty($thinkup_blog_postswitch)) {
                the_excerpt();
            } else {
                if ($thinkup_blog_postswitch == 'option2') {
                    // Allow user to user <!--more--> HTML tag
                    $more = 0;
                    // Remove all HMTL from the_content - Only allow specified tags
                    ob_start();
                    the_content('');
                    $old_content = ob_get_clean();
                    $new_content = strip_tags($old_content, '<p><a><b><br/><br /><input><form><textarea><li><ol><ul><table><h1><h2><h3><h4><h5><h6>');
                    echo $new_content;
                }
            }
        }
    }
}
コード例 #21
0
function show_faq($atts)
{
    ob_start();
    $secondary_query = new WP_Query(array('post_type' => 'questions', 'posts_per_page' => $atts[limit], 'tax_query' => array(array('taxonomy' => 'faq', 'field' => 'slug', 'terms' => $atts[category], 'operator' => 'IN'))));
    if ($secondary_query->have_posts()) {
        while ($secondary_query->have_posts()) {
            $secondary_query->the_post();
            echo '
								<div class="row">
									<div class="col-lg-8 col-lg-offset-2 centered">
							';
            the_post();
            the_post_thumbnail('thumbnail');
            the_title('<h1>', '</h1>');
            the_content();
            echo '
									</div>
								</div>
							';
        }
        // end while
    }
    // end if
    wp_reset_postdata();
    return ob_get_clean();
}
コード例 #22
0
 public static function process()
 {
     theme_features::check_referer();
     $post_id = isset($_GET['post-id']) && is_numeric($_GET['post-id']) ? (int) $_GET['post-id'] : false;
     if (!$post_id) {
         die(theme_features::json_format(['status' => 'error', 'code' => 'invaild_post_id', 'msg' => ___('Sorry, post id is invaild.')]));
     }
     global $post, $page;
     /**
      * post
      */
     $post = theme_cache::get_post($post_id);
     if (!$post) {
         die(theme_features::json_format(['status' => 'error', 'code' => 'post_not_exist', 'msg' => ___('Sorry, the post does not exist.')]));
     }
     /**
      * page
      */
     $page = isset($_GET['page']) && is_numeric($_GET['page']) ? (int) $_GET['page'] : false;
     if (!$page) {
         die(theme_features::json_format(['status' => 'error', 'code' => 'invaild_page_number', 'msg' => ___('Sorry, page number is invaild.')]));
     }
     set_query_var('page', $page);
     setup_postdata($post);
     ob_start();
     if (class_exists('theme_img_lazyload')) {
         remove_filter('the_content', 'theme_img_lazyload::the_content');
     }
     the_content();
     $content = html_minify(ob_get_contents());
     ob_end_clean();
     die(theme_features::json_format(['status' => 'success', 'content' => $content]));
 }
コード例 #23
0
ファイル: functions.php プロジェクト: jehzlau/surfagility
function wcount()
{
    ob_start();
    the_content();
    $content = ob_get_clean();
    return sizeof(explode(" ", $content));
}
コード例 #24
0
ファイル: our-story.php プロジェクト: Angelpm28/ong-canada
function charity_vc_our_story($atts, $content = null)
{
    extract(shortcode_atts(array('our_story' => ''), $atts));
    $page_id = get_page_by_title($our_story);
    $storyQuery = new WP_Query(array("page_id" => $page_id->ID));
    if ($storyQuery->have_posts()) {
        $storyQuery->the_post();
        $url = wp_get_attachment_image_src(get_post_thumbnail_id($page_id->ID), array(1143, 479));
        ?>
        <!-- Helping Section Start here-->
        <section class="helping-child parallax" style="background-image: url('<?php 
        echo esc_url($url[0]);
        ?>
')">
            <div class="container">
                <div class="row">
                    <div class="col-xs-12 col-sm-7 col-md-5">
                        <h2 class="h1"> <?php 
        the_title();
        ?>
 </h2>
                        <?php 
        the_content();
        ?>
        
                    </div>
                </div>
            </div>
        </section>
        <!-- Helping Section Start here-->
    <?php 
    }
    wp_reset_postdata();
}
コード例 #25
0
ファイル: home-page.php プロジェクト: scarydakis/WPTest
function scwd_home_feature()
{
    global $post, $SCWD_CUSTOM;
    genesis_markup(array('html5' => '<article id="home-feature" %s>', 'xhtml' => '<div id="home-feature">', 'context' => 'home-feature'));
    if (($home_slides = $SCWD_CUSTOM->acf_get_field('_scwd_slides')) !== false) {
        $i = 0;
        print '<div class="home-slides">';
        foreach ($home_slides as $value) {
            $att_data = '';
            if ($i === 0) {
                $attr_data = ' style="background-image:url(\'' . $value['sizes']['large'] . '\');"';
            } else {
                $attr_data = ' data-imgurl="' . $value['sizes']['large'] . '"';
            }
            print '<div class="slide"' . $attr_data . '></div>';
            $i++;
        }
        print '</div>';
    }
    print '<div class="wrap"><div class="inner">';
    print '<div class="left"></div><div class="right"><div class="pad">';
    //print the_title('<h1>','</h1>');
    print the_content();
    print '</div></div>';
    print '</div></div>';
    genesis_markup(array('html5' => '</article>', 'xhtml' => '</div>'));
}
コード例 #26
0
ファイル: page_search.php プロジェクト: jimrucinski/Vine
function render_content()
{
    ?>
	<?php 
    if (have_posts()) {
        ?>
		<div class="loop">
			<div class="loop-content">
				<?php 
        while (have_posts()) {
            // The Loop
            ?>
					<?php 
            the_post();
            ?>
					
					<div id="post-<?php 
            the_ID();
            ?>
" <?php 
            post_class();
            ?>
>
						<!-- title, meta, and date info -->
						<div class="entry-header clearfix">
							<h1 class="entry-title"><?php 
            the_title();
            ?>
</h1>
						</div>
						
						<!-- post content -->
						<div class="entry-content clearfix">
							<?php 
            the_content();
            ?>
						</div>
						
						<?php 
            get_search_form();
            ?>
					</div>
					<!-- end .post -->
				<?php 
        }
        // end of one post
        ?>
			</div>
		</div>
	<?php 
    } else {
        // do not delete
        ?>
		<?php 
        do_action('builder_template_show_not_found');
        ?>
	<?php 
    }
    // do not delete
}
コード例 #27
0
        /**
         * The default template for displaying single post content
         *
         * @package Customizr
         * @since Customizr 3.0
         */
        function tc_post_content()
        {
            //check conditional tags : we want to show single post or single custom post types
            global $post;
            $tc_show_single_post_content = isset($post) && 'page' != $post->post_type && 'attachment' != $post->post_type && is_singular() && !tc__f('__is_home_empty');
            if (!apply_filters('tc_show_single_post_content', $tc_show_single_post_content)) {
                return;
            }
            //display an icon for div if there is no title
            $icon_class = in_array(get_post_format(), array('quote', 'aside', 'status', 'link')) ? apply_filters('tc_post_format_icon', 'format-icon') : '';
            ob_start();
            do_action('__before_content');
            ?>
    

          <section class="entry-content <?php 
            echo $icon_class;
            ?>
">
              <?php 
            the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', 'customizr'));
            ?>
              <?php 
            wp_link_pages(array('before' => '<div class="pagination pagination-centered">' . __('Pages:', 'customizr'), 'after' => '</div>'));
            ?>
          </section><!-- .entry-content -->

        <?php 
            do_action('__after_content');
            $html = ob_get_contents();
            if ($html) {
                ob_end_clean();
            }
            echo apply_filters('tc_post_content', $html);
        }
コード例 #28
0
 public function wordpressAction(Request $request)
 {
     $this->get('wordpress.loader')->load();
     $this->get('wordpress.loader')->loadPostInWordpressFromRequest($request);
     remove_theme_support('custom-header');
     remove_action('wp_head', 'wp_enqueue_scripts', 1);
     remove_action('wp_head', 'feed_links', 2);
     remove_action('wp_head', 'feed_links_extra', 3);
     remove_action('wp_head', 'rsd_link');
     remove_action('wp_head', 'wlwmanifest_link');
     remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
     remove_action('wp_head', 'locale_stylesheet');
     remove_action('wp_head', 'noindex', 1);
     remove_action('wp_head', 'wp_print_styles', 8);
     remove_action('wp_head', 'wp_print_head_scripts', 9);
     remove_action('wp_head', 'wp_generator');
     remove_action('wp_head', 'rel_canonical');
     remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);
     ob_start();
     @wp_head();
     $head = ob_get_clean();
     ob_start();
     $content = dynamic_sidebar('sidebar-2');
     $side = ob_get_clean();
     ob_start();
     the_content();
     $content = ob_get_clean();
     $post = array('content' => $content);
     return $this->render($this->container->getParameter('wordpress.template'), array('post' => $post));
 }
コード例 #29
0
ファイル: testimonial-quote.php プロジェクト: phupx/genco
function hb_testimonial_quote($post_id)
{
    $testimonial_post = get_post($post_id);
    if ($testimonial_post) {
        setup_postdata($testimonial_post);
        $author_name = vp_metabox('testimonial_type_settings.hb_testimonial_author');
        $author_desc = vp_metabox('testimonial_type_settings.hb_testimonial_description');
        $author_desc_link = vp_metabox('testimonial_type_settings.hb_testimonial_description_link');
        ?>

    <p><?php 
        the_content();
        ?>
</p>
    <div class="testimonial-quote-meta">
        <span><?php 
        if ($author_name) {
            echo $author_name;
        }
        if ($author_desc) {
            if ($author_desc_link) {
                echo ', <a href="' . $author_desc_link . '">' . $author_desc . '</a>';
            } else {
                echo ', ' . $author_desc;
            }
        }
        ?>
        </span>
    </div>
         
    <?php 
        wp_reset_postdata();
    }
}
コード例 #30
-1
    /**
     * The template part for displaying page content
     *
     * @package Customizr
     * @since Customizr 3.0
     */
    function tc_content_page()
    {
        ?>
        <header>
             <?php 
        if (!is_front_page()) {
            ?>
                 <?php 
            printf('<h1 class="entry-title format-icon">%1$s %2$s</h1>', get_the_title(), is_user_logged_in() && current_user_can('edit_pages') ? '<span class="edit-link btn btn-inverse btn-mini"><a class="post-edit-link" href="' . get_edit_post_link() . '" title="' . __('Edit page', 'customizr') . '">' . __('Edit page', 'customizr') . '</a></span>' : '');
            ?>
                <hr class="featurette-divider">
             <?php 
        }
        ?>
        </header>

        <div class="entry-content">
            <?php 
        the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', 'customizr'));
        ?>
        </div>

           <?php 
        wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'customizr'), 'after' => '</div>'));
        ?>

        <footer class="entry-meta">

        </footer><!-- .entry-meta -->
        <?php 
    }