Wordpress 子页面 [英] Wordpress subpages

查看:28
本文介绍了Wordpress 子页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我被要求在 Wordpress 中设计一个网站.只是一个粗略的设计如下所示:

所以我想要的是当我点击关于它应该展开并显示页面内容.有点像这样:

有人对在同一位置显示页面内容而不是在新页面或窗口中打开有任何想法吗?

提前致谢.. :)

编辑 1

下面是page.php的php代码

 <div id="content" class="page"><div id="盒子"><h3><?php the_title();?></h3><?php if (have_posts()) : ?><?php while (have_posts()) : the_post();?><div class="post" id="post-<?php the_ID(); ?>"><?php the_content();?><br/><div style="clear:both;"></div>

<?php endwhile;?><?php endif;?>

我希望菜单如图所示显示.所以根据Arconix Shortcode Collection的教程,它说我必须编写代码,例如

 [手风琴][手风琴标题="关于"]关于这里的内容[/手风琴][手风琴标题="结果"]结果内容在这里[/手风琴][手风琴标题=人物"最后=最后"]人物内容在这里[/手风琴][/手风琴]

现在在这个而不只是我们写的内容水,我希望它是

1)页面中的内容,例如关于页面关于的内容(因为页面可以在wordpress页面中创建--->新页面.所以如果我想要的话要编辑此内容,我只需转到页面并编辑关于页面).

2) 并且只有在鼠标点击后才能显示内容..

编辑 2

在我想要包含手风琴的页面中,我从页面中选择给定的选项

一旦我点击它.没有选择页面的选项,如下所示:

所以有人对此有任何想法..?

解决方案

有一个 WordPress 插件可以轻松实现这一点 - http://wordpress.org/extend/plugins/arconix-shortcodes/

带有此插件的手风琴文档位于 https://arconixpc.fogbugz.com/default.asp?W4

(该插件还有更多功能.)

I have been asked to design a site in Wordpress .Just a rough design looks like given below :

so what i want is when i click on ABOUT it should expand and display the page content.Somewhat like this :

Any one has any idea regarding displaying the page content at same place instead opening in new page or window ?

Thanks in advance.. :)

Edit1

the below is the php code of page.php

 <?php get_header(); ?>
 <div id="content" class="page">

 <div id="box">
  <h3><?php the_title(); ?></h3>

<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
        <?php the_content(); ?><br /><div style="clear:both;"></div>
    </div>
<?php endwhile; ?>
<?php endif; ?>   

i want menus to be displayed as shown in the images .So as per the tutorial of Arconix Shortcode Collection it says i have to write the code as for example

  [accordions]
  [accordion title="About"]
  About Content here
  [/accordion]
  [accordion title="Results"]
  Results Content here
  [/accordion]
  [accordion title="People" last="last"]
  People Content here
  [/accordion]
  [/accordions]

Now in this instead of just the content watever we write i wanted it to be

1)content from a page for example in case of about its the content from page About(as pages can be created in wordpress Pages--->new page .So in case if i want to edit this i just go to pages and edit the about page).

2)and the content should get displayed only after mouse click..

edit 2

In the pages wherever I want to include accordion i select the given option from the pages

once i click on it .There is no option to select a page as shown below:

so anyone has any idea regarding this..?

解决方案

There is a WordPress plugin that can accomplish this easily - http://wordpress.org/extend/plugins/arconix-shortcodes/

Documentation for Accordions with this plugin at https://arconixpc.fogbugz.com/default.asp?W4

(The plugin does much more as well.)

这篇关于Wordpress 子页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆