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

PHP is_page_template函数代码示例

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

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



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

示例1: bootstrap_breadcrumbs

/**
 * Add breadcrumbs functionality to your WordPress theme
 *
 * Once you have included the function in your functions.php file
 * you can then place the following anywhere in your theme templates
 * if(function_exists('bootstrap_breadcrumbs')) bootstrap_breadcrumbs();
 *
 * credit to: c.bavota - http://bavotasan.com (thanks for the code start)
 */
function bootstrap_breadcrumbs()
{
    echo '<ol class="breadcrumb">';
    echo '<li><a href="' . home_url('/') . '">Home</a></li>';
    // are we at "blog home"?
    if (is_home()) {
        echo '<li><a href="#">Blogs</a></li>';
    }
    // where else do we want breadcrumbs
    if (!is_page_template('pt-home.php') && !is_home()) {
        // check if we're in a commerce plugin
        if (function_exists('is_woocommerce') && is_woocommerce()) {
            echo '<li><a href="/publications/order/">Shop</a></li>';
            $product_cats = wp_get_post_terms(get_the_ID(), 'product_cat');
            echo '<li><a href="/publications/order/' . str_replace(" ", "-", $product_cats[0]->name) . '">' . $product_cats[0]->name . '</a></li>';
        }
        // breadcrumb wordpress structures
        if (is_category() || is_single() || is_single('aof')) {
            if (get_the_category()) {
                $category = get_the_category();
                echo '<li><a href="/blog/category/' . str_replace(" ", "-", $category[0]->cat_name) . '">' . $category[0]->cat_name . '</a></li>';
            }
            if (is_single()) {
                echo '<li class="active">';
                the_title();
                echo '</li>';
            }
        } elseif (is_page()) {
            echo '<li class="active">';
            the_title();
            echo '</li>';
        }
    }
    echo '</ol>';
}
开发者ID:ethicalux,项目名称:kairos_eux,代码行数:44,代码来源:wp_bootstrap_breadcrumbs.php


示例2: blackoot_content_width

function blackoot_content_width()
{
    global $content_width;
    if (is_page_template('page-full-width.php')) {
        $content_width = 920;
    }
}
开发者ID:Torchwood7,项目名称:torchwood-site,代码行数:7,代码来源:functions.php


示例3: site_scripts

function site_scripts()
{
    global $wp_styles;
    // Call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
    // Load What-Input files in footer
    wp_enqueue_script('what-input', get_template_directory_uri() . '/vendor/what-input/what-input.min.js', array(), '', true);
    // Adding Foundation scripts file in the footer
    wp_enqueue_script('foundation-js', get_template_directory_uri() . '/assets/js/foundation.min.js', array('jquery'), '6.0', true);
    wp_enqueue_script('sticky-js', get_template_directory_uri() . '/assets/js/jquery.sticky.js', array('jquery'), '6.0', true);
    // Adding Owl Carousel script file in the footer
    wp_enqueue_script('owl-carousel', get_template_directory_uri() . '/assets/js/owl.carousel.js', array('jquery'), '', true);
    //Google MAps API
    if (is_page('about-us') || is_page('contact-us')) {
        wp_enqueue_script('maps-js', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyBTfVURGZR7YFppqYW9LVpRCk0xmup0YSg', array('jquery'), '', true);
        wp_enqueue_script('custom-maps-js', get_template_directory_uri() . '/assets/js/mapScripts.js', array('jquery'), '', true);
    }
    if (is_page('blood-testing')) {
        wp_enqueue_script('maps-js', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyBTfVURGZR7YFppqYW9LVpRCk0xmup0YSg', array('jquery'), '', true);
        wp_enqueue_script('cluster-maps-js', get_template_directory_uri() . '/assets/js/markerclusterer.js', array('jquery'), '', true);
        wp_enqueue_script('blood-testing-maps-js', get_template_directory_uri() . '/assets/js/bloodMapScripts.js', array('jquery'), '', true);
    }
    if (is_page('skype-call-test-page')) {
        wp_enqueue_script('skype-js', 'http://www.skypeassets.com/i/scom/js/skype-uri.js', array('jquery'), '', true);
        //wp_enqueue_script( 'skype.js', get_template_directory_uri() . '/assets/js/skype.js', array( 'jquery' ), '', true );
    }
    //infinite scroll
    wp_enqueue_script('infinite-scroll-js', '//cdnjs.cloudflare.com/ajax/libs/jquery-infinitescroll/2.0b2.120519/jquery.infinitescroll.min.js', array('jquery'), '', true);
    //Masonry Grid
    wp_enqueue_script('masonry-js', '//cdnjs.cloudflare.com/ajax/libs/masonry/3.1.2/masonry.pkgd.js', array('jquery'), '', true);
    //Images Loaded
    wp_enqueue_script('images-loaded-js', '//cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/3.0.4/jquery.imagesloaded.min.js', array('jquery'), '', true);
    //jSignature.js
    wp_enqueue_script('jSignature.js', get_template_directory_uri() . '/assets/js/jSignature.min.noconflict.js', array('jquery'), '', true);
    if (is_page_template('template-video-chat.php') || is_singular('consult')) {
        //simpleWebRTC
        //wp_enqueue_script( 'simpleWebRTC.js', 'https://simplewebrtc.com/latest-v2.js', array( 'jquery' ), '', true );
        //wp_enqueue_script( 'video.js', get_template_directory_uri() . '/assets/js/video-scripts.js', array( 'jquery' ), '', true );
    }
    //Video.js
    //wp_enqueue_script( 'video.js', 'https://vjs.zencdn.net/5.5.3/video.js', array( 'jquery' ), '', true );
    //iCheck.js
    //wp_enqueue_script( 'iCheck.js', get_template_directory_uri() . '/assets/js/icheck.min.js', array( 'jquery' ), '', true );
    //EnrollForm.js
    wp_enqueue_script('enrollForm.js', get_template_directory_uri() . '/assets/js/enroll-form.js', array('jquery'), '', true);
    //Stellar.js
    wp_enqueue_script('stellar.js', get_template_directory_uri() . '/assets/js/jquery.stellar.js', array('jquery'), '', true);
    //countTo.JS
    wp_enqueue_script('countUp.js', get_template_directory_uri() . '/assets/js/jquery.countTo.js', array('jquery'), '', true);
    // Adding Waypoints script file in the footer
    wp_enqueue_script('waypoints', get_template_directory_uri() . '/assets/js/jquery.waypoints.js', array('jquery'), '', true);
    wp_enqueue_script('waypoints-inview', get_template_directory_uri() . '/assets/js/inview.js', array('jquery'), '', true);
    // Adding scripts file in the footer
    wp_enqueue_script('site-js', get_template_directory_uri() . '/assets/js/scripts.js', array('jquery'), '', true);
    // Register main stylesheet
    wp_enqueue_style('site-css', get_template_directory_uri() . '/assets/css/style.css', array(), '', 'all');
    // Comment reply script for threaded comments
    if (is_singular() and comments_open() and get_option('thread_comments') == 1) {
        wp_enqueue_script('comment-reply');
    }
}
开发者ID:bself,项目名称:nuimage-wp,代码行数:60,代码来源:enqueue-scripts.php


示例4: sugarspice_content_width

/**
 * Adjust $content_width it depending on the temaplte used
 */
function sugarspice_content_width()
{
    global $content_width;
    if (!is_active_sidebar('sidebar-1') || is_page_template('full-width-page.php')) {
        $content_width = 940;
    }
}
开发者ID:satokora,项目名称:IT354Project,代码行数:10,代码来源:functions.php


示例5: mighty_content_width

 function mighty_content_width()
 {
     if (is_page_template('template-homepage.php') || is_page_template('template-full-width.php') || is_singular('portfolio') || is_attachment()) {
         global $content_width;
         $content_width = 980;
     }
 }
开发者ID:pouretrebelle,项目名称:thishappened,代码行数:7,代码来源:functions-die.php


示例6: first_content_width

/**
 * Adjust content_width value for full width template.
 */
function first_content_width()
{
    if (is_page_template('page_fullwidth.php')) {
        global $content_width;
        $content_width = 1000;
    }
}
开发者ID:sergeyleonovV,项目名称:numo.dp.ua,代码行数:10,代码来源:functions.php


示例7: planar_content_width

 function planar_content_width()
 {
     global $content_width;
     if (is_front_page() || is_page_template('page-templates/page-fullwidth.php') || is_page_template('page-templates/homepage-one.php') || is_page_template('page-templates/page-childgrid.php')) {
         $content_width = 1400;
     }
 }
开发者ID:jrartd,项目名称:trihu,代码行数:7,代码来源:functions.php


示例8: airballoon_display_custom_header

    function airballoon_display_custom_header()
    {
        // Get Theme Options from Database
        $options = get_option('zeenoble_options');
        // Don't display header image on template-frontpage.php
        if (is_page_template('template-frontpage.php')) {
            return;
        }
        // Don't display header image when "display frontpage template automatically on home page" option is activated
        if (is_front_page() and isset($options['themeZee_frontpage_activate']) and $options['themeZee_frontpage_activate'] == 'true') {
            return;
        }
        // Check if page is displayed and featured header image is used
        if (is_page() && has_post_thumbnail()) {
            ?>
			<div id="custom-header">
				<?php 
            the_post_thumbnail('frontpage_slider_image');
            ?>
			</div>
<?php 
            // Check if there is a custom header image
        } elseif (get_header_image()) {
            ?>
			<div id="custom-header">
				<img src="<?php 
            echo get_header_image();
            ?>
" />
			</div>
<?php 
        }
    }
开发者ID:russtx,项目名称:tac,代码行数:33,代码来源:template-tags.php


示例9: ce_map_shortcode

function ce_map_shortcode($atts)
{
    $address = 'New York';
    if (is_page_template("page-post-ad.php") && !isset($_GET['id']) && is_user_logged_in()) {
        global $user_ID;
        $address = get_user_meta($user_ID, 'et_address', true);
    }
    $default = array('w' => '100%', 'h' => '300px', 'lat' => '', 'lng' => '', 'zoom' => 20, 'address' => $address, 'is_single' => 0);
    $atts = wp_parse_args($atts, $default);
    extract($atts);
    $mininfy = get_theme_mod('ce_minify', 0);
    // if(!$mininfy) {
    wp_enqueue_script('ce-map-shorcode');
    wp_localize_script('ce-map-shorcode', 'map_short_code', $atts);
    // }
    // if (!is_page_template('page-post-ad.php')) {
    //     wp_enqueue_script('gmap');
    //     wp_enqueue_script('marker_cluster', plugin_dir_url(__FILE__) . '/js/marker-cluster.js', array(
    //         'gmap'
    //     ) , '1.0');
    //     wp_enqueue_style('map-style', plugin_dir_url(__FILE__) . '/css/map-front.css', true, CE_MAP_VER);
    // }
    $html = '<div id="map-shortcode" class="map-shortcode" style="width : ' . $w . '; heigth: ' . $h . '; margin-top:0px;">';
    $html .= '</div>';
    return $html;
}
开发者ID:linniepinski,项目名称:perssistant,代码行数:26,代码来源:shortcode.php


示例10: my_class_names

function my_class_names($classes)
{
    if (is_page_template('page-home.php')) {
        $classes[] = 'p-index';
    }
    if (is_page_template('page-gridtext.php')) {
        $classes[] = 'p-gridtext';
        $classes[] = '_crumbs';
    }
    if (is_page_template('page-management.php')) {
        $classes[] = 'p-management';
        $classes[] = '_crumbs';
    }
    if (is_page_template('page-product.php')) {
        $classes[] = 'p-product';
        $classes[] = '_crumbs';
    }
    if (is_page_template('page-sport.php')) {
        $classes[] = 'p-sport';
        $classes[] = '_crumbs';
    }
    if (is_page_template('page-volunteer.php')) {
        $classes[] = 'p-volunteer';
        $classes[] = '_crumbs';
    }
    return $classes;
}
开发者ID:haimlati82,项目名称:hp,代码行数:27,代码来源:theme-func.php


示例11: zero_scripts

 function zero_scripts()
 {
     if (!is_admin()) {
         //Call Modernizr
         wp_register_script('modernizr', get_template_directory_uri() . '/js/libs/modernizr.dev.js', array(), null, false);
         wp_enqueue_script('modernizr');
         //Call JQuery
         wp_deregister_script('jquery');
         wp_register_script('jquery', '/wp-includes/js/jquery/jquery.js', '', '', true);
         wp_enqueue_script('jquery');
         if (is_front_page() || is_page_template('new-story-page.php')) {
             wp_register_script('slider_js', get_template_directory_uri() . '/js/libs/slider.min.js', array('jquery'), null, true);
             wp_enqueue_script('slider_js');
         }
         if (is_page(11) || is_child(11)) {
             wp_register_script('gallery_js', get_template_directory_uri() . '/js/libs/gallery.js', array('jquery'), null, true);
             wp_enqueue_script('gallery_js');
         }
         //Call Framework js file
         wp_register_script('main_js', get_template_directory_uri() . '/js/build/concat.js', array('jquery'), '', true);
         wp_enqueue_script('main_js');
     }
     // Setting the site URL as a global variable
     // You can use it to access the template URL in the mainJSfile
     $site_parameters = array('site_url' => get_site_url(), 'theme_directory' => get_template_directory_uri());
     wp_localize_script('main_js', 'SiteParameters', $site_parameters);
 }
开发者ID:zanonnicola,项目名称:code-sample,代码行数:27,代码来源:enqueue_scripts.php


示例12: clea_atout_c_tests_style

function clea_atout_c_tests_style()
{
    global $post;
    if (is_page_template('page/ac-front-page-template.php')) {
        wp_enqueue_style('flexslider', get_template_directory_uri() . '/css/flexslider.css', array('25px'));
    }
}
开发者ID:aldelpech,项目名称:clea-atouts-c,代码行数:7,代码来源:functions.php


示例13: shootingstar_scripts_styles

/**
 * Enqueues scripts and styles for front-end.
 *
*/
function shootingstar_scripts_styles()
{
    global $wp_styles, $wp_scripts;
    // Adds JavaScript
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    if (get_theme_mod('shootingstar_infinite_scroll') != 'Disable') {
        if (is_home() || is_archive() || is_search()) {
            wp_enqueue_script('shootingstar-infinitescroll', get_template_directory_uri() . '/js/infinitescroll.min.js', array('jquery'), '2.0.2', true);
            wp_enqueue_script('shootingstar-infinitescroll-settings', get_template_directory_uri() . '/js/infinitescroll-settings.js', array(), '1.0', true);
            $shootingstar_site_parameters = array('theme_directory' => get_template_directory_uri(), 'message_load' => __('<p>Loading...</p>', 'shootingstar'), 'message_end' => __('<p>No further posts.</p>', 'shootingstar'));
            wp_localize_script('shootingstar-infinitescroll-settings', 'SiteParameters', $shootingstar_site_parameters);
        }
    }
    wp_enqueue_script('shootingstar-placeholders', get_template_directory_uri() . '/js/placeholders.js', array('jquery'), '2.0.8', true);
    if (get_theme_mod('shootingstar_display_scroll_top') != 'Hide') {
        wp_enqueue_script('shootingstar-scroll-to-top', get_template_directory_uri() . '/js/scroll-to-top.js', array('jquery'), '1.0', true);
    }
    if (get_theme_mod('shootingstar_fixed_menu') != 'Disable' && !is_page_template('template-landing-page.php')) {
        wp_enqueue_script('shootingstar-menubox', get_template_directory_uri() . '/js/menubox.js', array(), '1.0', true);
    }
    wp_enqueue_script('shootingstar-selectnav', get_template_directory_uri() . '/js/selectnav.js', array(), '0.1', true);
    wp_enqueue_script('shootingstar-responsive', get_template_directory_uri() . '/js/responsive.js', array(), '1.0', true);
    wp_enqueue_script('shootingstar-html5-ie', get_template_directory_uri() . '/js/html5.min.js', array(), '3.7.2', false);
    $wp_scripts->add_data('shootingstar-html5-ie', 'conditional', 'lt IE 9');
    // Adds CSS
    wp_enqueue_style('shootingstar-elegantfont', get_template_directory_uri() . '/css/elegantfont.css');
    wp_enqueue_style('shootingstar-google-font-default', '//fonts.googleapis.com/css?family=PT+Sans&amp;subset=latin,latin-ext');
    if (class_exists('woocommerce')) {
        wp_enqueue_style('shootingstar-woocommerce-custom', get_template_directory_uri() . '/css/woocommerce-custom.css');
    }
}
开发者ID:jwren4170,项目名称:jsite,代码行数:37,代码来源:functions.php


示例14: set_portfolio_page_template_classes

 /**
  * Set portfolio page template classes
  */
 public function set_portfolio_page_template_classes($classes)
 {
     if (is_page_template('portfolio-one-column.php') || is_page_template('portfolio-two-column.php') || is_page_template('portfolio-three-column.php') || is_page_template('portfolio-four-column.php') || is_page_template('portfolio-five-column.php') || is_page_template('portfolio-six-column.php') || is_page_template('portfolio-one-column-text.php') || is_page_template('portfolio-two-column-text.php') || is_page_template('portfolio-three-column-text.php') || is_page_template('portfolio-four-column-text.php') || is_page_template('portfolio-five-column-text.php') || is_page_template('portfolio-six-column-text.php') || is_page_template('portfolio-grid.php')) {
         $classes[] = avada_get_portfolio_classes(Avada::c_pageID());
     }
     return $classes;
 }
开发者ID:pedrom40,项目名称:sazoo.org,代码行数:10,代码来源:class-avada-portfolio.php


示例15: _base_scripts

function _base_scripts()
{
    global $post;
    // remove version
    add_filter('script_loader_src', 'remove_src_version');
    // global styles
    wp_enqueue_style('bootstrap-min', get_template_directory_uri() . '/assets/css/bootstrap.min.css', array(), '');
    wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/css/font-awesome.min.css', array(), '');
    if (class_exists('bbPress')) {
        if (is_bbpress()) {
            wp_enqueue_style('bbpress-custom', get_template_directory_uri() . '/assets/css/bbpress.css', array(), '');
        }
    }
    wp_enqueue_style('custom', get_template_directory_uri() . '/assets/css/customs.css', array(), '');
    wp_enqueue_style('custom-style', get_template_directory_uri() . '/style.css', array(), '');
    // global scripts
    wp_enqueue_script('jquery');
    wp_enqueue_script('bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array(), '', true);
    if (is_single() && get_post_type() == 'course_unit') {
        wp_enqueue_script('froogaloop2', get_template_directory_uri() . '/assets/js/froogaloop2.min.js', array(), '', true);
    }
    if (is_page_template('page-templates/tpl-webinars.php')) {
        wp_enqueue_style('fancybox', get_template_directory_uri() . '/assets/lib/fancybox/jquery.fancybox.css', array(), '');
        wp_enqueue_script('fancybox', get_template_directory_uri() . '/assets/lib/fancybox/jquery.fancybox.pack.js', array(), '', true);
        wp_enqueue_script('fancybox-media', get_template_directory_uri() . '/assets/lib/fancybox/helpers/jquery.fancybox-media.js', array(), '', true);
    }
    if (has_shortcode($post->post_content, 'iard_table')) {
        wp_enqueue_script('angular', get_template_directory_uri() . '/assets/js/angular.min.js', array(), '', true);
        wp_enqueue_script('angular-sanitize', get_template_directory_uri() . '/assets/js/angular-sanitize.js', array(), '', true);
        wp_enqueue_script('table-app', get_template_directory_uri() . '/assets/js/tables.js', array(), '', true);
    }
    wp_enqueue_script('main', get_template_directory_uri() . '/assets/js/main.js', array(), '', true);
}
开发者ID:jhipwell6,项目名称:iard,代码行数:33,代码来源:functions.php


示例16: the_content

 function the_content($content)
 {
     // Don't show on custom page templates
     if (is_page_template()) {
         return $content;
     }
     // Don't show on Stacked slides
     if (get_post_type() == 'slide') {
         return $content;
     }
     global $wp_current_filter;
     if (in_array('get_the_excerpt', (array) $wp_current_filter)) {
         return $content;
     }
     $cce_options = get_option('cce_options');
     $show_on_posts = isset($cce_options['show_loveit_button_on']['post']) ? $cce_options['show_loveit_button_on']['post'] : FALSE;
     $show_on_pages = isset($cce_options['show_loveit_button_on']['page']) ? $cce_options['show_loveit_button_on']['page'] : FALSE;
     if (is_singular('post') && $show_on_posts) {
         $content .= $this->do_likes('loveit-after-content');
     }
     if (is_page() && !is_front_page() && $show_on_pages) {
         $content .= $this->do_likes('loveit-after-content');
     }
     //Under consideration: if(( is_front_page() || is_home() || is_category() || is_tag() || is_author() || is_date() || is_search()) && $options['add_to_other'] ) $content .= $this->do_likes();
     return $content;
 }
开发者ID:codecookies,项目名称:cc-essentials,代码行数:26,代码来源:cce-loveit.php


示例17: penscratch_content_width

 function penscratch_content_width()
 {
     global $content_width;
     if (is_page_template('fullwidth-page.php') && is_active_sidebar('sidebar-1')) {
         $content_width = 937;
     }
 }
开发者ID:ammartins,项目名称:timewp,代码行数:7,代码来源:functions.php


示例18: woothemes_add_javascript

 function woothemes_add_javascript()
 {
     global $woo_options;
     $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
     // Register scripts
     wp_register_script('prettyPhoto', get_template_directory_uri() . '/includes/js/jquery.prettyPhoto' . $suffix . '.js', array('jquery'), '3.1.3');
     wp_register_script('enable-lightbox', get_template_directory_uri() . '/includes/js/enable-lightbox.js', array('jquery', 'prettyPhoto'));
     wp_register_script('google-maps', 'http://maps.google.com/maps/api/js?sensor=false');
     wp_register_script('google-maps-markers', get_template_directory_uri() . '/includes/js/markers.js');
     wp_register_script('flexslider', get_template_directory_uri() . '/includes/js/jquery.flexslider' . $suffix . '.js', array('jquery'), '2.1');
     wp_register_script('featured-slider', get_template_directory_uri() . '/includes/js/featured-slider' . $suffix . '.js', array('jquery', 'flexslider'));
     wp_register_script('jquery-waypoints', get_template_directory_uri() . '/includes/js/waypoints' . $suffix . '.js', array('jquery'), '2.0.3');
     // Enqueue third party scripts
     wp_enqueue_script('fitvids', get_template_directory_uri() . '/includes/js/fitvids' . $suffix . '.js', array('jquery'), '1.0');
     wp_enqueue_script('modernizr', get_template_directory_uri() . '/includes/js/modernizr' . $suffix . '.js', array('jquery'), '2.6.2');
     wp_enqueue_script('doubleTapToGo', get_template_directory_uri() . '/includes/js/jquery.doubleTapToGo' . $suffix . '.js', array('jquery'), '1.0');
     // Enqueue scripts
     wp_enqueue_script('jquery-waypoints');
     wp_enqueue_script('general', get_template_directory_uri() . '/includes/js/general' . $suffix . '.js', array('jquery'));
     // Load Google Script on Contact Form Page Template
     if (is_page_template('template-contact.php')) {
         wp_enqueue_script('google-maps');
         wp_enqueue_script('google-maps-markers');
     }
     // End If Statement
     do_action('woothemes_add_javascript');
 }
开发者ID:danmaby,项目名称:VAT,代码行数:27,代码来源:theme-js.php


示例19: featureText

function featureText()
{
    if (is_front_page()) {
        the_field('feature_text');
    } elseif (is_home() || is_single()) {
        _e('Rock Theme Official Blog');
    } elseif (is_archive()) {
        _e('Rock Theme Official Blog');
        _e('<br>');
        single_term_title('Browsing: ');
        if (is_month()) {
            $monthNum = get_query_var('monthnum');
            $month = date('F', mktime(0, 0, 0, $monthNum));
            $year = get_query_var('year');
            echo 'Posts from ' . $month . ' ' . $year;
        }
    } elseif (is_page_template('page-news.php') || is_page_template('page-about.php') || is_page_template('page-contact.php')) {
        bloginfo('name');
        _e('<br>');
        the_title();
    } elseif (is_404()) {
        _e('Whoops, were a little lost.');
    } elseif (is_search()) {
        _e('Rock Theme Official Blog');
        _e('<br>');
        printf('Search results for: %s', get_search_query());
    }
}
开发者ID:jrock89,项目名称:JRockWeb2,代码行数:28,代码来源:functions.php


示例20: activello_main_content_bootstrap_classes

 /**
  * Add Bootstrap classes to the main-content-area wrapper.
  */
 function activello_main_content_bootstrap_classes()
 {
     if (is_page_template('page-fullwidth.php')) {
         return 'col-sm-12 col-md-12';
     }
     return 'col-sm-12 col-md-8';
 }
开发者ID:RickyG-Akl,项目名称:Activello,代码行数:10,代码来源:functions.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP is_paged函数代码示例发布时间:2022-05-15
下一篇:
PHP is_page_name函数代码示例发布时间: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