Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8241275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:47:00+00:00 2026-06-07T20:47:00+00:00

I am given a developing CMS site in wordpress.I am learning now html,css,php,jquery,ajax and

  • 0

I am given a developing CMS site in wordpress.I am learning now html,css,php,jquery,ajax and ofcourse doing research on wordpress..

so my site should some what look like this

enter image description here

now in this the

There is only one page that is displayed …main page

and i have 3 pages(about,home,people) created in wordpress (WordPress—>Pages—->new page—>write content)

1)In main page as shown in image i want 3 panels (About,Home,People) all of which are collapsed when main page page is opened

2)but once clicked on Home it should expand the home panel and display the page contents there itself without reloading the page.And other panels should collapse at the same time.

3)When Clicked on menu bar item (About or any other) The Panel with same name should expand..

If there are any sites that people know that will somehow answer my queries, please pass them on.

EDIT1

I downloaded the jquery examples from site http://jqueryui.com/download

i want the tabs as in collapsible.html example

now the below code is the page.php

      <?php wp_enqueue_script("jquery"); // added this line  16-7-2012
?>

    <script type="text/javascript" src="<?php bloginfo('template_directory');          ?>/js/jquery-1.7.2.js"></script>
    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.ui.core.js"></script>
   <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.ui.widget.js"></script>
  <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/query.ui.accordion.js"></script>

   <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>/js/demos.css" type="text/css" media="screen" />
   <link rel="stylesheet" href="<?php bloginfo('stylesheet_url');  ?>/js/jquery.ui.all.css" type="text/css" media="screen" />



<script>
$(function() {
    $( "#accordion" ).accordion({
        collapsible: true
    });
});
</script>


   <?php get_header(); ?>

<div class="content">

<?php if (have_posts()) : ?>

    <?php $page_id=1332;?>
<?php get_page( $page_id ) ?> 

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

        <h1><?php the_title(); ?></h1>

        <?php the_content('Read more'); ?>



    <?php endwhile; ?>
</div>

<?php else : ?>

    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.</p>
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>

<?php endif; ?>

 <?php if (is_single()) comments_template(); ?>

</div>

 <?php get_sidebar(); ?>

<?php get_footer(); ?>

as it loads all the pages..
In WP pages(content section) i have written the html code given in jquery examples i.e the below code:

  <div id="accordion">
  <h3><a href="#">Section 1</a></h3>
   <div>
    <p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
</div>
  <h3><a href="#">Section 2</a></h3>
  <div>
    <p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
</div>
  <h3><a href="#">Section 3</a></h3>
  <div>
    <p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
    <ul>
        <li>List item one</li>
        <li>List item two</li>
        <li>List item three</li>
    </ul>
</div>
<h3><a href="#">Section 4</a></h3>
<div>
    <p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>
</div>

but its displayed as plain textt with no accordion tabs

enter image description here

EDIT2

    function{
  $(function() {
      $( "#accordion" ).accordion({
        collapsible: true
      });
  })};

EDIT3

   jQuery(document).ready(function(){   
  $(function() {
    $( "#accordion" ).accordion({
        collapsible: true
    });
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T20:47:01+00:00Added an answer on June 7, 2026 at 8:47 pm

    As for the collapsible part, you could use the jquery ui accordion.:
    http://jqueryui.com/demos/accordion/

    The simplest way would be to do it w/o ajax and just render all your pages in the main page.
    see http://codex.wordpress.org/Function_Reference/get_page and wordpress: How can I display multiple pages on one page?

    There for you’ll just need to modify the index.php file in your theme.

    —

    You could also load the pages content via ajax as described here:
    jQuery Accordion and loading content through AJAX

    For that you’ll also need to modify the page.php template to show just the content, with no header / footer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a little jQuery selector game. Essentially, you're given some HTML code, and
I'm developing a site where a user conducts a given transaction and once completed,
I am developing an application in which I am using HTML documents.Now I want
I am developing android applications using Eclipse IDE. Now, I have given someone else's
This is my first WordPress 3 site. I'm currently developing a site for a
I am developing an UI(Home screen) just like this screen given in this link
We are developing an application which consists of: a source code base given to
I'm developing simple CUDA app. I followed steps given on http://www.ademiller.com/blogs/tech/2010/10/visual-studio-2010-adding-intellisense-support-for-cuda-c/ but still there
I'm developing a website in PHP and I'd like to give the user to
Given this method to work on a HTML page in a webbrowser: bool semaphoreForDocCompletedEvent;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.