0
votes

i am developing a CMS site in wordpress ...

the final web page should some what look like :

Website

I want just one page (front page) and on that i want to display subpages titles in it. (About,Home,People)...

So when the subpage title is clicked it should expand and display the the page content in the panel,on same page and at same place.

any ideas regarding same? Thanks in advance...:)

EDIT1

[accordions] [accordion title="Accordion 1"] Accordion 1 Content here [/accordion] [accordion title="Accordion 2"] Accordion 2 Content here [/accordion] [accordion title="Accordion 3" last="last"] Accordion 3 Content here [/accordion] [/accordions]

after puting the above code in the page content looks like this:

enter image description here

but on click of ACCORDION 1 its not getting expanded..

2

2 Answers

1
votes

You can write your own template, which does a query (checks for a subpage), and adds its content between div tags.

When it's done, then it's time for JS/jQuery . Search for tab jQuery scripts, so you get some information.

Anyway, you will mostly need to use hide() / show() functions to reach something like that.

Also, did you made that template, and are you familiar with programming in WP?

<?php
$args = array(
    'numberposts' => -1,
    'post_parent' => $post->ID,
    'post_type' => 'page',
    'post_status' => 'publish',
    'orderby' => 'menu_order,title',
    'order' => 'ASC'
);
$my_pagelist = get_children($args);
?>

Above is code for displaying subpage content, below is the jQuery tutorial for tabs.

http://jqueryui.com/demos/tabs/

EDIT:

Also, check this site - http://www.learningjquery.com/2006/09/slicker-show-and-hide it will show you some info about show/hide functions. Also more information about WP get_children function is found here - http://codex.wordpress.org/Function_Reference/get_children

0
votes

If I understand your question correctly, in the latest version of WordPress.

Login to your admin panel.

Click on the 'Settings' tab, then the 'Reading' sub-tab.

Change the 'Front page displays' option to 'A static page'.