Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/246.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Wordpress侧边栏与内容不对齐_Php_Jquery_Html_Css_Wordpress - Fatal编程技术网

Php Wordpress侧边栏与内容不对齐

Php Wordpress侧边栏与内容不对齐,php,jquery,html,css,wordpress,Php,Jquery,Html,Css,Wordpress,这让我抓狂,因为我不是代码天才,使用一个模板“submate”,我试图在儿童主题vantage上添加一个右侧边栏 <?php /** * This template displays full width pages with a page title. * * @package vantage * @since vantage 1.0 * @license GPL 2.0 * * Template Name: submate */ get_header(); ?>

这让我抓狂,因为我不是代码天才,使用一个模板“submate”,我试图在儿童主题vantage上添加一个右侧边栏

<?php
/**
 * This template displays full width pages with a page title.
 *
 * @package vantage
 * @since vantage 1.0
 * @license GPL 2.0
 * 
 * Template Name: submate
 */
get_header(); ?>

<?php
//get the sidebar
$avia_config['currently_viewing'] = 'page';
if(is_front_page()) { $avia_config['currently_viewing'] = 'frontpage'; }
get_sidebar();
?>
                <div class="breadcrumbs">
    <?php if(function_exists('bcn_display'))
    {
        bcn_display();
    }?>
</div>

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

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

    <?php endwhile; // end of the loop. ?>

<?php get_footer(); ?>

它的链接是

非常感谢您的帮助:)

试试这个

<style type="text/css">
article#post-231 {
    float: left;
    width: 65%;
}
</style>

第231条{
浮动:左;
宽度:65%;
}

文章的html结构非常糟糕。您已将您的
文章
元素包装在
strong
元素中,这没有意义,因为它用于使文本更粗体

无论如何,您可以将这个小片段添加到您的
wp content/themes/your theme/style.css

article[class*="post"] { /* only post articles */
    float: left;
    width: 65%;
}
编辑

仅适用于特定页面:

.page-id-231 article[class*="post"] { /* only post articles */
    float: left;
    width: 65%;
}

将文章向左浮动,并给它一个宽度。你可能也想去掉文章周围的3级深度标签。谢谢你,它解决了这个问题,但是它让我的所有其他页面文章width@user3359955你只需要特定的页面?请看我的编辑答案。