修改标题.php用于 Avada Wordpress 主题



测试站点示例:http://cincinnati-website-design.net/sandbox/

我正在使用 Avada 主题,似乎无法通过支持获得帮助。他们只是告诉我去找一个开发人员。

我正在尝试让"页面标题容器"出现在主索引/主页上。它每隔一页正确显示,但显然它被设计为不显示在主索引或 HOME 上。

标题.php代码段:

<?php if(of_get_option('page_title_bar', 'yes') == 'yes'): ?>
<?php if(((is_page() || is_single() || is_singular('avada_portfolio')) && get_post_meta($post->ID, 'pyre_page_title', true) == 'yes') && !is_front_page()): ?>
<div class="page-title-container">
    <div class="page-title">
        <h1><?php the_title(); ?></h1>
        <?php kriesi_breadcrumb(); ?>
    </div>
</div>
<?php endif; ?>
<?php if(is_home() && !is_front_page() && get_post_meta($slider_page_id, 'pyre_page_title', true) == 'yes'): ?>
<div class="page-title-container">
    <div class="page-title">
        <h1><?php echo of_get_option('blog_title', 'Blog'); ?></h1>
        <?php kriesi_breadcrumb(); ?>
    </div>
</div>
<?php endif; ?>
<?php if(is_search()): ?>
<div class="page-title-container">
    <div class="page-title">
        <h1><?php _e('Search results for:', 'Avada'); ?> <?php echo get_search_query(); ?></h1>
    </div>
</div>
<?php endif; ?>
<?php if(is_archive()): ?>
<div class="page-title-container">
    <div class="page-title">
        <h1><?php single_cat_title(); ?></h1>
        <?php kriesi_breadcrumb(); ?>
    </div>
</div>
<?php endif; ?>
<?php endif; ?>
<div id="main" style="overflow:hidden !important;">
    <div class="row">

以下代码:

is_front_page()

是检查首页的内容。

尝试从上面的代码中删除以下内容:

&& !is_front_page()

它出现了两次,并告诉脚本在首页上不要做后面的事情。

最新更新