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


PHP tf_addUrlParameter函数代码示例

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


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

示例1: next_post_link_plus

    }
    ?>
			<?php 
    if ($portfolioID || $categoryID) {
        $next_post_link = next_post_link_plus(array('format' => '%link', 'link' => __('Next', 'Avada'), 'in_same_tax' => 'portfolio_category', 'in_cats' => $nav_categories, 'return' => 'href'));
    } else {
        $next_post_link = next_post_link_plus(array('format' => '%link', 'link' => __('Next', 'Avada'), 'return' => 'href'));
    }
    ?>
			<?php 
    if ($next_post_link) {
        if ($portfolioID || $categoryID) {
            if ($portfolioID) {
                $next_post_link = tf_addUrlParameter($next_post_link, 'portfolioID', $portfolioID);
            } else {
                $next_post_link = tf_addUrlParameter($next_post_link, 'categoryID', $categoryID);
            }
        }
        ?>
			<a href="<?php 
        echo $next_post_link;
        ?>
" rel="next"><?php 
        _e('Next', 'Avada');
        ?>
</a>
			<?php 
    }
    ?>
		</div>
		<?php 
开发者ID:bulats,项目名称:chef,代码行数:31,代码来源:single-avada_portfolio.php

示例2: get_post_meta

    $custom_colulmn_spacing = false;
    if (get_post_meta($post->ID, 'pyre_portfolio_column_spacing', true) || get_post_meta($post->ID, 'pyre_portfolio_column_spacing', true) === '0') {
        $custom_colulmn_spacing = true;
        $col_spacing = get_post_meta($post->ID, 'pyre_portfolio_column_spacing', true) / 2;
        echo sprintf('<style type="text/css">.portfolio-wrapper{margin: 0 %spx;}.portfolio-wrapper .col-spacing{padding:%spx;}</style>', -1 * $col_spacing, $col_spacing);
    } else {
        if ($smof_data['portfolio_column_spacing']) {
            $custom_colulmn_spacing = true;
            $col_spacing = $smof_data['portfolio_column_spacing'] / 2;
            echo sprintf('<style type="text/css">.portfolio-wrapper{margin: 0 %spx;}.portfolio-wrapper .col-spacing{padding:%spx;}</style>', -1 * $col_spacing, $col_spacing);
        }
    }
    while ($gallery->have_posts()) {
        $gallery->the_post();
        if ($pcats) {
            $permalink = tf_addUrlParameter(get_permalink(), 'portfolioID', $current_page_id);
        } else {
            $permalink = get_permalink();
        }
        if (has_post_thumbnail() || get_post_meta($post->ID, 'pyre_video', true)) {
            ?>
			<?php 
            $item_classes = $portfolio_text_layout;
            $item_cats = get_the_terms($post->ID, 'portfolio_category');
            if ($item_cats) {
                foreach ($item_cats as $item_cat) {
                    $item_classes .= urldecode($item_cat->slug) . ' ';
                }
            }
            if ($custom_colulmn_spacing) {
                $item_classes .= ' col-spacing';
开发者ID:jolay,项目名称:maga2.0,代码行数:31,代码来源:portfolio-three-column-text.php

示例3: while

			<?php 
while (have_posts()) {
    the_post();
    if (has_post_thumbnail()) {
        ?>
			<?php 
        $item_classes = '';
        $item_cats = get_the_terms($post->ID, 'portfolio_category');
        if ($item_cats) {
            foreach ($item_cats as $item_cat) {
                $item_classes .= $item_cat->slug . ' ';
            }
        }
        $queried_object = get_queried_object();
        $term_id = $queried_object->term_id;
        $permalink = tf_addUrlParameter(get_permalink(), 'categoryID', $term_id);
        ?>
			<div class="portfolio-item <?php 
        echo $item_classes;
        ?>
">
				<div class="image">
					<?php 
        if ($data['image_rollover']) {
            ?>
					<?php 
            the_post_thumbnail('portfolio-one');
            ?>
					<?php 
        } else {
            ?>
开发者ID:mathewdenis,项目名称:Avada-Theme,代码行数:31,代码来源:taxonomy-portfolio_category.php


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