简体   繁体   English

通过Wordpress更改首页内容

[英]Change frontpage content via Wordpress

I just started to work with Wordpress (Theme Development) and due to awesome functions like bloginfo('description') and others my static homepage looks a lot like a regular site, but editable with the Wordpress Dashboard. 我刚刚开始使用Wordpress(主题开发),并且由于功能强大,例如bloginfo('description')和其他功能,我的静态主页看起来很像常规站点,但可以使用Wordpress仪表板进行编辑。

But now, I want to put more information on my homepage which I can edit through the dashboard. 但是现在,我想在主页上放置更多信息,可以通过仪表板进行编辑。 I guess this is really basic Wordpress and that a simple Wordpress function or MySQL-query should be enough, but I can't seem to find it. 我猜这真的是基本的Wordpress,简单的Wordpress函数或MySQL查询就足够了,但是我似乎找不到它。

This is my code right now: 这是我现在的代码:

    <div class="fp-container">
    <div class="fp-border">
        <h1 class="fp-description"><?php bloginfo('description'); ?></h1>
    </div>
    <div class="fp-text">
        <p><?php bloginfo('description'); ?></p>
    </div>

As you can see, between the '< p>' and '< /p>' I call the description for the second time, how can I call another string that can be entered through the Dashboard? 如您所见,在第二次调用“ <p>”和“ </ p>”之间,如何调用可以通过仪表板输入的另一个字符串?

Rik 里克

Please try this: 请尝试以下方法:

<div class="fp-container">
<div class="fp-border">
    <h1 class="fp-description"><?php bloginfo('description'); ?></h1>
</div>
<div class="fp-text">
    <?php the_content(); ?>
</div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM