dongpian6319 2019-08-07 11:40
浏览 42

如何在single.php中添加h1并删除侧栏

how to change the category archive to h1 and how to remove the sidebar the preview of site is for a blog preview it have the posts is a category archive

https://www.insect.gr/category/insect-trojan/

and the code is

<?php get_header(); ?>
<div id="primary" class="pagemid">
<div class="inner">

    <main class="content-area">

        <div class="entry-content-wrapper clearfix">

        <?php if( atp_generator( 'sidebaroption', get_the_id() ) != "fullwidth" ){ $width = '800'; } else { $width = '1100'; } ?>

        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

        <?php get_template_part( 'content', get_post_format() );?>

        <?php get_template_part('share','link'); ?>
        </div><!-- .entry-content-wrapper-->

        <?php

        if ( get_option( 'atp_aboutauthor' ) != "on" ) {
            echo atp_generator( 'aboutauthor' ); 
        }

        if ( get_option( 'atp_relatedposts' ) != "on" ) {
            echo atp_generator( 'relatedposts', $post->ID);
        }

        if ( get_option( 'atp_commentstemplate' ) == "posts" ||  get_option( 'atp_commentstemplate' ) == "both" ) {
            comments_template( '', true ); 
        }

        if ( get_option( 'atp_singlenavigation' ) != "on" ) { 
            if(get_previous_post_link()  OR  get_next_post_link()) { ?>
                <div class="navigation-section">
                    <div class="navigation-post">
                        <div class="nav-previous">
                            <div class="innerlinks">
                                <?php previous_post_link('<span class="nav-icon-left"><i class="fa  fa-chevron-left fa-lg"></i></span>
                                <p> %link </p>') ?>
                            </div>
                        </div>      
                        <div class="nav-next">
                            <div class="innerlinks">
                                <?php next_post_link('<span class="nav-icon-right"><i class="fa  fa-chevron-right fa-lg"></i></span>
                                <p>%link</p>') ?>
                            </div>
                        </div>      
                    </div>      
                </div>
            <?php
            }
        } else {
            posts_nav_link();
        }
        ?>

        <?php endwhile; ?>

        <?php else: ?>
        <?php '<p>'.__('Sorry, no posts matched your criteria.', 'anona').'</p>';?>

        <?php endif; ?>

    </main><!-- .content-area -->
    <?php if ( atp_generator( 'sidebaroption', $post->ID ) != "fullwidth" ){ get_sidebar(); } ?>            

how to change the category archive to h1 and how to remove the sidebar the preview of site is for a blog preview it have the posts is a category archive

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Vue3 大型图片数据拖动排序
    • ¥15 划分vlan后不通了
    • ¥15 GDI处理通道视频时总是带有白色锯齿
    • ¥20 用雷电模拟器安装百达屋apk一直闪退
    • ¥15 算能科技20240506咨询(拒绝大模型回答)
    • ¥15 自适应 AR 模型 参数估计Matlab程序
    • ¥100 角动量包络面如何用MATLAB绘制
    • ¥15 merge函数占用内存过大
    • ¥15 使用EMD去噪处理RML2016数据集时候的原理
    • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大