页面不会在博客模板中工作

时间:2022-03-31 02:54:19

I have downloaded this template:

我已下载此模板:

http://btemplates.com/2009/blogger-template-mobipress/

The xml code is too long to post here.

xml代码太长了,无法在此处发布。

The problem I am having now, is that pages when I put content, its not appearing. Example here: http://idaytradeforaliving.blogspot.be/p/routines.html

我现在遇到的问题是,当我放入内容时,页面不会出现。示例:http://idaytradeforaliving.blogspot.be/p/routines.html

I am not sure what other information can I put here to help with the problem

我不知道我可以在这里提供哪些其他信息来帮助解决问题

I found this

我找到了这个

   <b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:if cond='data:blog.pageType != &quot;item&quot;'>

<div expr:id='&quot;summary&quot; + data:post.id'><p><data:post.body/></p></div>
<script type='text/javascript'>createSummaryAndThumb(&quot;summary<data:post.id/>&quot;);</script>



                    <div class='clear'/>




<div class='singleinfo'>

        <div class='more'> <b:if cond='data:blog.pageType != &quot;static_page&quot;'><b:if 

cond='data:blog.pageType != &quot;item&quot;'>
                            <a expr:href='data:post.url'>Full Story</a>
                        </b:if></b:if></div>
</div>

</b:if> </b:if>

1 个解决方案

#1


7  

Your blog posts are all displaying correctly. That narrows down the problem. If ALL your static pages show no content, then there is a condition on all static pages which is causing the problem.

您的博客文章都正确显示。这缩小了问题的范围。如果所有静态页面都没有显示内容,则所有静态页面上都存在导致问题的情况。

To find the CSS conditions placed on all static pages (assuming all the pages are not displaying content):

要查找放置在所有静态页面上的CSS条件(假设所有页面都不显示内容):

  1. Login to your Blogger.com account

    登录您的Blogger.com帐户

  2. Go to your Template page on Blogger.com

    转到Blogger.com上的“模板”页面

  3. Click the gray button named "Edit HTML"

    单击名为“编辑HTML”的灰色按钮

  4. Search and find (if you're using a windows system- hold "Ctrl" and press "f"):

    搜索并查找(如果您使用的是Windows系统 - 按住“Ctrl”并按“f”):

    <b:if cond='data:blog.pageType == &quot;static_page&quot;'>
    

If you found the correct one, you should see something similar to this (except with CSS codes in the middle):

如果你找到了正确的,你应该看到类似的东西(除了中间的CSS代码):

<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
<style>
CSS codes here
</style>
</b:if>

The CSS codes is where your problem will likely be. Something in one of those codes is stopping all the static pages from displaying content. If you know CSS + HTML you can likely spot it. If not, copy and paste the CSS codes (by editing your Stack Overflow question) and I will look into it for you.

CSS代码可能是您的问题所在。其中一个代码中的某些内容会阻止所有静态页面显示内容。如果您了解CSS + HTML,您可能会发现它。如果没有,复制并粘贴CSS代码(通过编辑Stack Overflow问题),我将为您调查。

Edit: Part 2:

The part of the template that I was refering to would have been above the /b:skin (if style related) or /head (if script related, not style related). Also you would have seen CSS codes between the conditions, not HTML codes.

我所引用的模板部分将位于/ b:skin(如果样式相关)或/ head(如果脚本相关,而不是样式相关)之上。你也会看到条件之间的CSS代码,而不是HTML代码。

However, I downloaded the template and uploaded it to test the pages. The pages are also not working on my end.

但是,我下载了模板并将其上传以测试页面。这些页面也不适合我。

Usually problems like this are style or script related. However, the source of this problem is that whoever created this template gave a condition to not show post summaries on static pages but post summaries is the only way to show the content. What they failed to do was make a new condition for static pages, hence nothing showed up on static pages.

通常这样的问题是样式或脚本相关的。但是,此问题的根源在于,创建此模板的任何人都给出了不在静态页面上显示帖子摘要的条件,但是帖子摘要是显示内容的唯一方式。他们没有做的是为静态页面创建一个新条件,因此静态页面上没有任何内容。

The code you pasted in your question, this is how it should look:

你在问题中粘贴的代码,它应该是这样的:

<b:if cond='data:blog.pageType == &quot;static_page&quot;'> 
<div expr:id='data:post.id'><p><data:post.body/></p></div>
       </b:if>

     <b:if cond='data:blog.pageType != &quot;static_page&quot;'> 
     <b:if cond='data:blog.pageType != &quot;item&quot;'>

<div expr:id='&quot;summary&quot; + data:post.id'><p><data:post.body/></p></div>
<script type='text/javascript'>createSummaryAndThumb(&quot;summary<data:post.id/>&quot;);</script>
       </b:if>

                <div class='clear'/>

<b:if cond='data:blog.pageType != &quot;static_page&quot;'>

<div class='singleinfo'>

    <div class='more'><b:if cond='data:blog.pageType != &quot;item&quot;'>
                        <a expr:href='data:post.url'>Full Story</a>
                    </b:if></div>
</div>
</b:if>
</b:if> 

That should fix your problem. Happy blogging! :)

这应该可以解决你的问题。快乐的博客! :)

EDIT (Blogger: Comments not showing on blog posts):

First, to narrow down the problem and get the simple fixes out of the way:

首先,要缩小问题范围并简单地解决问题:

1.The problem could be that the comments are turned off on your settings page. To check:

1.问题可能是您的设置页面上的注释已关闭。去检查:

1) Click on the "Settings" tab.

1)单击“设置”选项卡。

2) Under the "settings" tab, once clicked, a new menu will appear under that section. Click on the one named "Posts and comments".

2)在“设置”选项卡下,单击后,该部分下将显示一个新菜单。单击名为“帖子和评论”的名称。

3) In that page, you will have information about "Posts" and under that section is for "Comments". Make sure where it reads "Comment Location" that the drop-down menu is selected on "Embedded". If not, click that and then click the orange button "Save Settings" (in the upper-right hand corner).

3)在该页面中,您将获得有关“帖子”的信息,而在该部分下则是“评论”。确保在“嵌入式​​”中选择下拉菜单的“注释位置”位置。如果没有,请单击该按钮,然后单击橙色按钮“保存设置”(位于右上角)。

2: Blogger is designed is such a way that if you are looking at the posts from the homepage and you have post summaries enabled (which with your template, you do) then you can't see the comments until you click "Full Story".

2:Blogger的设计是这样一种方式:如果您正在查看主页上的帖子并且您启用了帖子摘要(您使用模板),那么在您点击“全文”之前就看不到评论。

If you want the comments to appear on the homepage also, you have remove post summaries from the template. This changes based on what template is being used.

如果您还希望评论也显示在主页上,则必须从模板中删除帖子摘要。这会根据正在使用的模板而更改。

3.Make sure the comments is checked on the Layout page:

3.确保在布局页面上检查注释:

1) Click on the "Layout" tabs.

1)单击“布局”选项卡。

2) Click on the "Edit" button in the lower-right hand corner of the square box called "Blog Posts".

2)单击名为“博客帖子”的方框右下角的“编辑”按钮。

3) Under the "Post Page Options" make sure the "Comments" box has a checkmark next to it. If it doesn't, click that box and then click the orange "Save" button on the very bottom.

3)在“帖子页面选项”下,确保“评论”框旁边有一个复选标记。如果没有,请单击该框,然后单击最底部的橙色“保存”按钮。

4.Changing the template on the "Template" page where you click "Edit HTML" could cause other problems or glitches. Did you change your template at all, besides the changes I know about? When I loaded the template as a test site on blogger (even after the changes from your first question), the comments appear on my end, so the problem you're experiencing is not related to the fresh upload of the template.

4.在“模板”页面上更改模板,单击“编辑HTML”可能会导致其他问题或故障。除了我所知道的变化之外,您是否完全更改了模板?当我在博客上将模板作为测试网站加载时(即使在第一个问题发生更改后),评论也会显示在我的结尾,因此您遇到的问题与模板的全新上传无关。

Also check this:

还检查一下:

5.Inside each post, even if comments are turned on, you have a choice to make all comments hidden for that certain post. Check and make sure that the correct option is selected.

5.在每个帖子旁边,即使打开了评论,您也可以选择隐藏该特定帖子的所有评论。检查并确保选择了正确的选项。

1) Open the blog post in question, by going to the "Posts" tab.

1)打开相关博客文章,转到“帖子”标签。

2) Find the post you want comments to be shown on and click the title.

2)找到要显示评论的帖子,然后单击标题。

3) In the sidebar, right-hand side, you have a list of "Post Settings". Click the "Options" menu.

3)在侧边栏的右侧,您有一个“发布设置”列表。单击“选项”菜单。

4) Make sure under "Reader comments" the selected option is "Allow" and not "Don't allow, show existing " or "Don't allow, hide existing".

4)确保在“读者评论”下,所选选项为“允许”,而不是“不允许,显示现有”或“不允许,隐藏现有”。

These are the over-looked and simple solutions to making comments appear in the blog posts. Check the list above and if everything is correct and the problem still remains, let me know and I will look into it further.

这些是在博客文章中显示评论的过度简单和简单的解决方案。检查上面的列表,如果一切正确并且问题仍然存在,请告诉我,我会进一步研究。

#1


7  

Your blog posts are all displaying correctly. That narrows down the problem. If ALL your static pages show no content, then there is a condition on all static pages which is causing the problem.

您的博客文章都正确显示。这缩小了问题的范围。如果所有静态页面都没有显示内容,则所有静态页面上都存在导致问题的情况。

To find the CSS conditions placed on all static pages (assuming all the pages are not displaying content):

要查找放置在所有静态页面上的CSS条件(假设所有页面都不显示内容):

  1. Login to your Blogger.com account

    登录您的Blogger.com帐户

  2. Go to your Template page on Blogger.com

    转到Blogger.com上的“模板”页面

  3. Click the gray button named "Edit HTML"

    单击名为“编辑HTML”的灰色按钮

  4. Search and find (if you're using a windows system- hold "Ctrl" and press "f"):

    搜索并查找(如果您使用的是Windows系统 - 按住“Ctrl”并按“f”):

    <b:if cond='data:blog.pageType == &quot;static_page&quot;'>
    

If you found the correct one, you should see something similar to this (except with CSS codes in the middle):

如果你找到了正确的,你应该看到类似的东西(除了中间的CSS代码):

<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
<style>
CSS codes here
</style>
</b:if>

The CSS codes is where your problem will likely be. Something in one of those codes is stopping all the static pages from displaying content. If you know CSS + HTML you can likely spot it. If not, copy and paste the CSS codes (by editing your Stack Overflow question) and I will look into it for you.

CSS代码可能是您的问题所在。其中一个代码中的某些内容会阻止所有静态页面显示内容。如果您了解CSS + HTML,您可能会发现它。如果没有,复制并粘贴CSS代码(通过编辑Stack Overflow问题),我将为您调查。

Edit: Part 2:

The part of the template that I was refering to would have been above the /b:skin (if style related) or /head (if script related, not style related). Also you would have seen CSS codes between the conditions, not HTML codes.

我所引用的模板部分将位于/ b:skin(如果样式相关)或/ head(如果脚本相关,而不是样式相关)之上。你也会看到条件之间的CSS代码,而不是HTML代码。

However, I downloaded the template and uploaded it to test the pages. The pages are also not working on my end.

但是,我下载了模板并将其上传以测试页面。这些页面也不适合我。

Usually problems like this are style or script related. However, the source of this problem is that whoever created this template gave a condition to not show post summaries on static pages but post summaries is the only way to show the content. What they failed to do was make a new condition for static pages, hence nothing showed up on static pages.

通常这样的问题是样式或脚本相关的。但是,此问题的根源在于,创建此模板的任何人都给出了不在静态页面上显示帖子摘要的条件,但是帖子摘要是显示内容的唯一方式。他们没有做的是为静态页面创建一个新条件,因此静态页面上没有任何内容。

The code you pasted in your question, this is how it should look:

你在问题中粘贴的代码,它应该是这样的:

<b:if cond='data:blog.pageType == &quot;static_page&quot;'> 
<div expr:id='data:post.id'><p><data:post.body/></p></div>
       </b:if>

     <b:if cond='data:blog.pageType != &quot;static_page&quot;'> 
     <b:if cond='data:blog.pageType != &quot;item&quot;'>

<div expr:id='&quot;summary&quot; + data:post.id'><p><data:post.body/></p></div>
<script type='text/javascript'>createSummaryAndThumb(&quot;summary<data:post.id/>&quot;);</script>
       </b:if>

                <div class='clear'/>

<b:if cond='data:blog.pageType != &quot;static_page&quot;'>

<div class='singleinfo'>

    <div class='more'><b:if cond='data:blog.pageType != &quot;item&quot;'>
                        <a expr:href='data:post.url'>Full Story</a>
                    </b:if></div>
</div>
</b:if>
</b:if> 

That should fix your problem. Happy blogging! :)

这应该可以解决你的问题。快乐的博客! :)

EDIT (Blogger: Comments not showing on blog posts):

First, to narrow down the problem and get the simple fixes out of the way:

首先,要缩小问题范围并简单地解决问题:

1.The problem could be that the comments are turned off on your settings page. To check:

1.问题可能是您的设置页面上的注释已关闭。去检查:

1) Click on the "Settings" tab.

1)单击“设置”选项卡。

2) Under the "settings" tab, once clicked, a new menu will appear under that section. Click on the one named "Posts and comments".

2)在“设置”选项卡下,单击后,该部分下将显示一个新菜单。单击名为“帖子和评论”的名称。

3) In that page, you will have information about "Posts" and under that section is for "Comments". Make sure where it reads "Comment Location" that the drop-down menu is selected on "Embedded". If not, click that and then click the orange button "Save Settings" (in the upper-right hand corner).

3)在该页面中,您将获得有关“帖子”的信息,而在该部分下则是“评论”。确保在“嵌入式​​”中选择下拉菜单的“注释位置”位置。如果没有,请单击该按钮,然后单击橙色按钮“保存设置”(位于右上角)。

2: Blogger is designed is such a way that if you are looking at the posts from the homepage and you have post summaries enabled (which with your template, you do) then you can't see the comments until you click "Full Story".

2:Blogger的设计是这样一种方式:如果您正在查看主页上的帖子并且您启用了帖子摘要(您使用模板),那么在您点击“全文”之前就看不到评论。

If you want the comments to appear on the homepage also, you have remove post summaries from the template. This changes based on what template is being used.

如果您还希望评论也显示在主页上,则必须从模板中删除帖子摘要。这会根据正在使用的模板而更改。

3.Make sure the comments is checked on the Layout page:

3.确保在布局页面上检查注释:

1) Click on the "Layout" tabs.

1)单击“布局”选项卡。

2) Click on the "Edit" button in the lower-right hand corner of the square box called "Blog Posts".

2)单击名为“博客帖子”的方框右下角的“编辑”按钮。

3) Under the "Post Page Options" make sure the "Comments" box has a checkmark next to it. If it doesn't, click that box and then click the orange "Save" button on the very bottom.

3)在“帖子页面选项”下,确保“评论”框旁边有一个复选标记。如果没有,请单击该框,然后单击最底部的橙色“保存”按钮。

4.Changing the template on the "Template" page where you click "Edit HTML" could cause other problems or glitches. Did you change your template at all, besides the changes I know about? When I loaded the template as a test site on blogger (even after the changes from your first question), the comments appear on my end, so the problem you're experiencing is not related to the fresh upload of the template.

4.在“模板”页面上更改模板,单击“编辑HTML”可能会导致其他问题或故障。除了我所知道的变化之外,您是否完全更改了模板?当我在博客上将模板作为测试网站加载时(即使在第一个问题发生更改后),评论也会显示在我的结尾,因此您遇到的问题与模板的全新上传无关。

Also check this:

还检查一下:

5.Inside each post, even if comments are turned on, you have a choice to make all comments hidden for that certain post. Check and make sure that the correct option is selected.

5.在每个帖子旁边,即使打开了评论,您也可以选择隐藏该特定帖子的所有评论。检查并确保选择了正确的选项。

1) Open the blog post in question, by going to the "Posts" tab.

1)打开相关博客文章,转到“帖子”标签。

2) Find the post you want comments to be shown on and click the title.

2)找到要显示评论的帖子,然后单击标题。

3) In the sidebar, right-hand side, you have a list of "Post Settings". Click the "Options" menu.

3)在侧边栏的右侧,您有一个“发布设置”列表。单击“选项”菜单。

4) Make sure under "Reader comments" the selected option is "Allow" and not "Don't allow, show existing " or "Don't allow, hide existing".

4)确保在“读者评论”下,所选选项为“允许”,而不是“不允许,显示现有”或“不允许,隐藏现有”。

These are the over-looked and simple solutions to making comments appear in the blog posts. Check the list above and if everything is correct and the problem still remains, let me know and I will look into it further.

这些是在博客文章中显示评论的过度简单和简单的解决方案。检查上面的列表,如果一切正确并且问题仍然存在,请告诉我,我会进一步研究。

相关文章