本文整理汇总了PHP中avada_render_post_title函数的典型用法代码示例。如果您正苦于以下问题:PHP avada_render_post_title函数的具体用法?PHP avada_render_post_title怎么用?PHP avada_render_post_title使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了avada_render_post_title函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_template_part
// Get featured images for all but large-alternate layout
if ((is_search() && !Avada()->settings->get('search_featured_images') || !is_search() && Avada()->settings->get('featured_images')) && $blog_layout != 'large-alternate') {
get_template_part('new-slideshow');
}
// post-content-wrapper only needed for grid and timeline
if ($blog_layout == 'grid' || $blog_layout == 'timeline') {
echo '<div class="fusion-post-content-wrapper">';
}
// Add the circles for timeline layout
if ($blog_layout == 'timeline') {
echo '<div class="fusion-timeline-circle"></div>';
echo '<div class="fusion-timeline-arrow"></div>';
}
echo '<div class="fusion-post-content post-content">';
// Render the post title
echo avada_render_post_title(get_the_ID());
// Render post meta for grid and timeline layouts
if ($blog_layout == 'grid' || $blog_layout == 'timeline') {
echo avada_render_post_metadata('grid_timeline');
if (Avada()->settings->get('post_meta') && (!Avada()->settings->get('post_meta_author') || !Avada()->settings->get('post_meta_date') || !Avada()->settings->get('post_meta_cats') || !Avada()->settings->get('post_meta_tags') || !Avada()->settings->get('post_meta_comments') || !Avada()->settings->get('post_meta_read')) && Avada()->settings->get('excerpt_length_blog') > 0) {
echo '<div class="fusion-content-sep"></div>';
}
// Render post meta for alternate layouts
} elseif ($blog_layout == 'large-alternate' || $blog_layout == 'medium-alternate') {
echo avada_render_post_metadata('alternate');
}
echo '<div class="fusion-post-content-container">';
/**
* avada_blog_post_content hook
*
* @hooked avada_render_blog_post_content - 10 (outputs the post content wrapped with a container)
示例2: str_replace
/* Preparing real masonry
if ( has_post_thumbnail()
) {
$featured_image_markup = str_replace( '"fusion-image-wrapper"', sprintf( '"fusion-image-wrapper" style="background-image: url(%s);"', $featured_image[0] ), $featured_image_markup );
}
*/
echo $featured_image_markup;
}
// If we don't have a text layout and not a one column layout only render rich snippets
if (!strpos($current_page_template, 'text') && !strpos($current_page_template, 'one')) {
echo avada_render_rich_snippets_for_pages();
// If we have a text layout render its contents
} else {
echo '<div class="fusion-portfolio-content">';
// Render the post title
echo avada_render_post_title($post->ID);
// Render the post categories
echo sprintf('<h4>%s</h4>', get_the_term_list($post->ID, 'portfolio_category', '', ', ', ''));
echo avada_render_rich_snippets_for_pages(false);
$post_content = '';
ob_start();
/**
* avada_portfolio_post_content hook
*
* @hooked avada_get_portfolio_content - 10 (outputs the post content)
*/
do_action('avada_portfolio_post_content', $current_page_id);
$post_content = ob_get_clean();
// For boxed layouts add a content separator if there is a post content
if ($current_page_text_layout == 'boxed' && $post_content) {
echo '<div class="fusion-content-sep"></div>';
示例3: avada_render_post_title
</div>
<?php
}
?>
<?php
}
?>
<?php
}
?>
<?php
if (Avada()->settings->get('blog_post_title')) {
?>
<?php
echo avada_render_post_title($post->ID, false, '', '2');
?>
<?php
} elseif (Avada()->settings->get('disable_date_rich_snippet_pages')) {
?>
<span class="entry-title" style="display: none;"><?php
the_title();
?>
</span>
<?php
}
?>
<div class="post-content">
<?php
the_content();
示例4: render
//.........这里部分代码省略.........
$image = sprintf('<div class="fusion-image-wrapper fusion-video" style="max-width:%s;">%s</div>', $video_max_width, fusion_get_page_option('video', get_the_ID()));
} else {
// Get the post image
$image = avada_render_first_featured_image_markup(get_the_ID(), $this->image_size, get_permalink(get_the_ID()), TRUE, FALSE, FALSE, 'disable', $show_title, '', $this->recent_works_counter);
}
$portfolio_posts .= sprintf('<li %s><div %s>%s%s%s</div></li>', FusionCore_Plugin::attributes('fusion-carousel-item'), FusionCore_Plugin::attributes('fusion-carousel-item-wrapper'), avada_render_rich_snippets_for_pages(), $image, $title_terms);
} else {
// Get the post permalink
$permalink = get_permalink();
// Include the post categories as css classes for later useage with filters
$post_categories = get_the_terms(get_the_ID(), 'portfolio_category');
if ($post_categories) {
foreach ($post_categories as $post_category) {
$post_classes .= urldecode($post_category->slug) . ' ';
}
}
// Add the col-spacing class if needed
if ($column_spacing) {
$post_classes .= 'fusion-col-spacing';
}
// Render the video set in page options if no featured image is present
if (!has_post_thumbnail() && fusion_get_page_option('video', get_the_ID())) {
$video_max_width = '540px';
$image = sprintf('<div class="fusion-image-wrapper fusion-video" style="max-width:%s;">%s</div>', $video_max_width, fusion_get_page_option('video', get_the_ID()));
} else {
// Get the post image
$image = avada_render_first_featured_image_markup(get_the_ID(), $this->image_size, get_permalink(get_the_ID()), TRUE, FALSE, FALSE, 'disable', 'default', '', $this->recent_works_counter);
}
// Additional content for grid-with-excerpts layout
if ($layout == 'grid-with-excerpts') {
// Get the rich snippets, if enabled
$rich_snippets = avada_render_rich_snippets_for_pages(false);
// Get the post title
$post_title = avada_render_post_title(get_the_ID());
// Get the post terms
$post_terms = sprintf('<h4>%s</h4>', get_the_term_list(get_the_ID(), 'portfolio_category', '', ', ', ''));
// Get the post content
ob_start();
/**
* fusion_recent_works_shortcode_content hook
*
* @hooked content - 10 (outputs the post content)
*/
do_action('fusion_recent_works_shortcode_content');
$stripped_content = ob_get_clean();
// For boxed layouts add a content separator if there is a post content
if ($boxed_text == 'boxed' && $stripped_content) {
$separator = '<div class="fusion-content-sep"></div>';
}
// On one column layouts render the "Learn More" and "View Project" buttons
if ($columns == '1') {
$classes = sprintf('fusion-button fusion-button-small fusion-button-default fusion-button-%s fusion-button-%s', strtolower($smof_data['button_shape']), strtolower($smof_data['button_type']));
// Add the "Learn More" button
$learn_more_button = sprintf('<a href="%s" %s>%s</a>', $permalink, FusionCore_Plugin::attributes($classes), __('Learn More', 'fusion-core'));
// If there is a project url, add the "View Project" button
$view_project_button = '';
if (fusion_get_page_option('project_url', get_the_ID())) {
$view_project_button = sprintf('<a href="%s" %s>%s</a>', fusion_get_page_option('project_url', get_the_ID()), FusionCore_Plugin::attributes($classes), __('View Project', 'fusion-core'));
}
// Wrap buttons
$buttons = sprintf('<div %s>%s%s</div>', FusionCore_Plugin::attributes('fusion-portfolio-buttons'), $learn_more_button, $view_project_button);
}
// Put it all together
$post_content = sprintf('<div %s>%s%s%s<div %s>%s%s</div></div>', FusionCore_Plugin::attributes('fusion-portfolio-content'), $post_title, $post_terms, $separator, FusionCore_Plugin::attributes('fusion-post-content'), $stripped_content, $buttons);
} else {
// Get the rich snippets for grid layout without excerpts
示例5: avada_render_post_title
?>
<div id="content" class="<?php
echo $content_class;
?>
" style="<?php
echo $content_css;
?>
">
<?php
if (have_posts() && strlen(trim(get_search_query())) != 0) {
?>
<div class="search-page-search-form">
<?php
// Render the post title
echo avada_render_post_title(0, FALSE, __('Need a new search?', 'Avada'));
?>
<p><?php
echo __('If you didn\'t find what you were looking for, try a new search!', 'Avada');
?>
</p>
<form class="searchform seach-form" role="search" method="get" action="<?php
echo home_url('/');
?>
">
<div class="search-table">
<div class="search-field">
<input type="text" value="" name="s" class="s" placeholder="<?php
_e('Search ...', 'Avada');
?>
示例6: avada_render_post_title
}
// 3
?>
<?php
}
// 2
?>
<?php
}
// 1
?>
<?php
if (Avada()->settings->get('blog_post_title')) {
?>
<?php
echo avada_render_post_title($post->ID, FALSE);
?>
<?php
} elseif (!Avada()->settings->get('disable_date_rich_snippet_pages')) {
?>
<span class="entry-title" style="display: none;"><?php
the_title();
?>
</span>
<?php
}
?>
<div class="post-content">
<?php
echo avada_get_sermon_content();
?>
示例7: Avada
<?php
}
?>
<?php
if ('hidden' != Avada()->settings->get('search_new_search_position')) {
?>
<div class="search-page-search-form search-page-search-form-<?php
echo Avada()->settings->get('search_new_search_position');
?>
">
<?php
/**
* Render the post title
*/
echo avada_render_post_title(0, false, esc_html__('Need a new search?', 'Avada'));
?>
<p><?php
esc_html_e('If you didn\'t find what you were looking for, try a new search!', 'Avada');
?>
</p>
<form class="searchform seach-form" role="search" method="get" action="<?php
echo home_url('/');
?>
">
<div class="search-table">
<div class="search-field">
<label class="screen-reader-text" for="searchform"><?php
_e('Search for:', 'Avada');
?>
</label>
示例8: avada_render_post_title
}
// 3
?>
<?php
}
// 2
?>
<?php
}
// 1
?>
<?php
if ($smof_data['blog_post_title']) {
?>
<?php
echo avada_render_post_title($post->ID, FALSE, '', '2');
?>
<?php
} elseif (!$smof_data['disable_date_rich_snippet_pages']) {
?>
<span class="entry-title" style="display: none;"><?php
the_title();
?>
</span>
<?php
}
?>
<div class="post-content">
<?php
the_content();
?>
示例9: avada_render_post_title
</div>
<?php
}
?>
<?php
}
?>
<?php
}
?>
<?php
if (Avada()->settings->get('blog_post_title')) {
?>
<?php
echo avada_render_post_title($post->ID, false);
?>
<?php
} elseif (Avada()->settings->get('disable_date_rich_snippet_pages')) {
?>
<span class="entry-title" style="display: none;"><?php
the_title();
?>
</span>
<?php
}
?>
<div class="post-content">
<?php
echo avada_get_sermon_content();
?>