Try Tuts+ Premium, Get Cash Back!
How to Create a FAQ Page with WordPress and Custom Post Types

How to Create a FAQ Page with WordPress and Custom Post Types

Tutorial Details
  • Technology: Wordpress and jQuery UI
  • Difficulty: Intermediate
  • Estimated Completion Time: 45 minutes

Final Product What You'll Be Creating

In the web world, a FAQ page is created specifically for the viewers/customers, and contains general questions and their respective answers about a particular product or service. This tutorial details the process of creating a dedicated FAQ section in the WordPress backend with custom post types, as well as how to spice up the actual page a bit by using jQuery and CSS.

To accomplish our goal, we require a dedicated custom FAQ WordPress post type. That way, we can use the title and the content of these posts to display the FAQs in an innovative and user-friendly way.


Step 1: Installing WordPress

To begin creating the FAQ page, we, of course, must first install WordPress on our localhost. Installing WordPress is a piece of cake; however, if you’re new to this, here is a guide that details the process.

The TwentyTen template is the default theme that ships with WordPress.

Once WordPress is ready to go, we should next create our custom theme, which will implement the FAQ functionality. There are various methods of creating a custom theme. Some prefer to create a new blank white template, while others like to create child themes of the new TwentyTen template. I have been using the Starker’s theme, by Elliot Jay Stocks for a long time now; we’ll use it to create the new theme for our FAQ system.

Download the latest version of the Starker’s blank theme, and move the folder into ‘wp-content/themes’, located within the WordPress installation folder. Also, be sure to rename it to FAQ. Next, login to the backend administration panel of WordPress, click on ‘appearance/themes.’ You will find that the default ‘TwentyTen’ theme is activated, while the new theme, ‘Starkers,’ is listed below it. Activate the Starkers theme.

activate starkers theme

Upon activation, preview the site to verify that everything is, indeed, working properly. If all went according to plan, the site should look somewhat like the following image:

blank starkers theme

Step 2: Implementing the FAQ Custom Post

To implement the FAQ system, we are going to create a custom post type solely for this purpose. This will enable us to manage all the FAQs in one place, especially if the FAQ question base increases with time.

To implement a custom post, edit the functions.php file located in the FAQ theme folder. It will contain a good bit of code, so don’t be scared or confused. Scroll down to the bottom and append the following to add a new custom post. We begin by creating hooking a custom function to the initialization (init) action.

// ADDING CUSTOM POST TYPE FAQ
add_action('init', 'my_custom_init');

This custom function will contain all the metadata for the custom post, and will also register the custom post within the WordPress database. Now, within the function, we are first going to define the labels which will be used in the backend administration panels. By labels, I mean the text that is going to show up in the user interface for adding, editing, and searching the FAQs in the admin panel.

	 $labels = array(
	    'name' => _x('FAQs', 'post type general name'),
	    'singular_name' => _x('FAQ', 'post type singular name'),
	    'add_new' => _x('Add New', 'FAQ'),
	    'add_new_item' => __('Add New FAQ'),
	    'edit_item' => __('Edit FAQ'),
	    'new_item' => __('New FAQ'),
	    'view_item' => __('View FAQ'),
	    'search_items' => __('Search FAQs'),
	    'not_found' =>  __('No FAQs found'),
	    'not_found_in_trash' => __('No FAQs found in Trash'),
	    'parent_item_colon' => ''
	  );

After we’ve defined the labels, we next define the arguments array for the register_post_type method. These arguments contain all the important information which will define the components of our FAQ post. For example, will it have a tag box; an excerpt box? We pass the array of labels defined above as an argument, as well.

	$args = array(
	    'labels' => $labels,
	    'public' => true,
	    'publicly_queryable' => true,
	    'show_ui' => true,
	    'query_var' => true,
	    'rewrite' => true,
	    'capability_type' => 'post',
	    'hierarchical' => false,
	    'menu_position' => 5,
	    'supports' => array('title','editor','thumbnail','custom-fields')
	  );

Now that the arguments are defined, we can register the custom post type using the register_post_type method. You can learn more about this method by referring to its documentation in the WordPress Codex.

function my_custom_init()
{
  $labels = array(
    'name' => _x('FAQs', 'post type general name'),
    'singular_name' => _x('FAQ', 'post type singular name'),
    'add_new' => _x('Add New', 'FAQ'),
    'add_new_item' => __('Add New FAQ'),
    'edit_item' => __('Edit FAQ'),
    'new_item' => __('New FAQ'),
    'view_item' => __('View FAQ'),
    'search_items' => __('Search FAQs'),
    'not_found' =>  __('No FAQs found'),
    'not_found_in_trash' => __('No FAQs found in Trash'),
    'parent_item_colon' => ''
  );
  $args = array(
    'labels' => $labels,
    'public' => true,
    'publicly_queryable' => true,
    'show_ui' => true,
    'query_var' => true,
    'rewrite' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'menu_position' => 5,
    'supports' => array('title','editor','thumbnail','custom-fields')
  );
  register_post_type('faq',$args);
}

Check the administration panel to determine if the FAQ type post has, in fact, been added successfully. Hopefully, you’ll see the FAQ tab in the sidebar.

Custom post added to dashboard

Dummy FAQ Posts

Now go ahead and add some demo FAQs, because we need some data for creating and testing the template. The title of each FAQ post should be the question, and the content will be the answer.

Adding some demo posts

Step 3: Coding the Template

So far, we’ve created FAQ custom posts, as well as inserted a set of sample data. Now, we’ll code the template to display the FAQs, accordingly. The main logic I have used for organizing the template is: use the FAQ’s unique ID to link the question to the answers. Hence, we have two parts in the template: the questions section, listing all the FAQ titles; and the answer section, which displays the content of each of the FAQs.

Find the header.php file, open it, delete the div with an id of “access” at the bottom, and also the paragraph which contains the description of the blog. Now add the following code.

<body >
	<div id="page-wrap">
	<h1>
		<a href="" title="" rel="home">
	</h1>
	<?php
	/**
	 * The main template file.
	 *
	 * This is the most generic template file in a WordPress theme
	 * and one of the two required files for a theme (the other being style.css).
	 * It is used to display a page when nothing more specific matches a query.
	 * E.g., it puts together the home page when no home.php file exists.
	 * Learn more: http://codex.wordpress.org/Template_Hierarchy
	 *
	 * @package WordPress
	 * @subpackage Starkers
	 * @since Starkers 3.0
	 */
	 get_header(); ?>

	<?php
		query_posts('post_type=faq&order=ASC')
	?>

After we retrieve our FAQ post data, we must frame the architecture of how the questions will be displayed. We shall do it in the following manner. All the content is wrapped within a div with an id of “content.”

<div id="content">
    <?php if (have_posts()) : ?>	
        <h3>FAQs</h3>
        <div id="questions">
            <ul>
                <?php while (have_posts()) : the_post(); ?>
                <li><a href="#answer<?php the_id() ?>"><?php the_title(); ?></a></li>
                <?php endwhile; ?>						
            </ul>		
        </div>	
    <?php else : ?>
        <h3>Not Found</h3>
        <p>Sorry, No FAQs created yet.</p>
    <?php endif; ?>	

The most important part here is where we assign the hyperlink with a value of ‘#answer’ and append the post’’s id to it. We can use this to jump to the answers, when clicked.

After we’ve displayed all of the questions, we “rewind” our posts to return to the beginning.

	<?php rewind_posts(); ?>	

Now we will structure how the answers are going to appear, just below the questions.

<?php if (have_posts()) : ?>								
    <div id="answers">
        <ul>
            <?php while (have_posts()) : the_post(); ?>
                <li id="answer<?php the_id(); ?>">
                    <h4><?php the_title(); ?></h4>
                    <?php the_content(); ?>
                </li>
            <?php endwhile; ?>						
        </ul>		
    </div>
    <?php endif; ?>
    <?php wp_reset_query(); ?>
</div>
<?php get_footer(); ?>

You can see that we are going to list the content of each post in a list element. Each list element will have an id of “answers” with the post ID appended to it. This is important: when the question is clicked, the view jumps to the content of the respective post. If you’re working along, preview your site; you should see all the posts listed in the architecture described above.

FAQ displated without any styling

Step 4: Styling the Template

Styling of the FAQ page depends entirely on your tastes; you can proceed in any manner you wish. If you’re a designer, feel free to skip Step 4. What I have personally implemented is a smooth and clean layout. When the user clicks on the question, the page smoothly scrolls down to the respective answer and highlights it by changing the colour and increasing the font size. To achieve this, we’ll start by styling the template with CSS. We can make use of CSS3 to add some shadows and transition effects, too. Add the following CSS to styles.css.

body{
    background-color: #bcbcbc;
}
.clear {
    clear: both;
}
h1,h2,h3,h4,h5,h6{
    color:#424242;
    font-family:Georgia,Arial,Helvetica,sans-serif;	
    text-shadow: #fff 1px 1px 0px;
}
h1 a{
    color:#424242;
    font-size:50px;
    position:relative;
    top:11px;
    font-weight: normal;
    z-index: 100;
}
h3{
    font-size: 20px;	
    font-weight: bold;
    margin-bottom: 20px;
}
h4{
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
}
a{
    color: #3299bb;
    text-decoration: none;
    -moz-transition: all 0.2s ease-in-out;
    -webkit-transition: all 0.2s ease-in-out;
    -o-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;
}
#page-wrap{
    width: 750px;
    position: relative;
    margin: 0px auto 20px auto;
    padding-top: 50px;
}
#content{
    background-color: #e9e9e9;
    padding: 64px 35px 22px;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    -webkit-box-shadow: rgba(0,0,0,1) 0px 0px 4px;
    -moz-box-shadow: rgba(0,0,0,1) 0px 0px 4px;
    box-shadow: rgba(0,0,0,1) 0px 0px 4px ;
}
#content p{
    text-align:justify;
    font-size: 12px;
    line-height: 18px;	
    margin-bottom: 10px;
}
#questions{
    margin-bottom: 50px;
}
#questions li{
    margin-bottom: 20px;
    color: #3299bb;
    list-style-type: disc;
    list-style-position: inside;
}
#questions ul li a{
    font-weight: bold;	
}
#questions ul li a:hover{
    color: #00befd;
}
#questions ul li a:active{
    color: #e78c03;
}
#answers ul li{
    margin-bottom: 30px;
    clear: both;
}
#footer{	
    padding-top:5px;
    text-align:center;
}
#footer p{
    color: #424242;
}
#footer a{
    color: #424242;
    font-weight: bold;
}

After styling the page, we should style the current FAQ. Note that we’ve also added a ‘Top’ button to the current FAQ. To create the button, we’ll use a handful of CSS3 properties.

.current-faq{
    background-color: #424242;
    color: #e9e9e9;
    padding:30px 30px 23px;
}
.current-faq h4{
    color: #e9e9e9;
    font-weight: bold;
    font-size:22px;
    text-shadow: #000 1px 1px 0px;
}
.top-button {
    border-top: 1px solid #96d1f8;
    background: #2289a8;
    background: -webkit-gradient(linear, left top, left bottom, from(#3299bb), to(#2289a8));
    background: -moz-linear-gradient(top, #3299bb, #2289a8);
    padding: 4px 8px;
    -webkit-border-top-left-radius: 6px;
    -moz-border-radius-topleft: 6px;
    border-top-left-radius: 6px;
    -webkit-box-shadow: rgba(0,0,0,1) -1px -1px 0;
    -moz-box-shadow: rgba(0,0,0,1) -1px -1px 0;
    box-shadow: rgba(0,0,0,1) -1px -1px 0;
    text-shadow: rgba(0,0,0,.4) -1px -1px 0;
    color: #ffffff;
    font-size: 11px;
    font-family: Georgia, serif;
    text-decoration: none;
    vertical-align: middle;
    font-weight: bold;   
    float: right;
    right:-30px;
    position: relative;
}
.top-button:hover {
    border-top-color: #0b93bd;
    background: #0b93bd;
    color: #ffffff;
}
.top-button:active {
    border-top-color: #e78c03;
    background: #e78c03;
}

Check if the ‘current’ class is working properly by assigning the class to any of the list elements. The current FAQ should look like the following:

Current Class Styling

Step 5: Adding a Pinch of jQuery UI

We’ll use jQuery UI to add some effects to the page. You can download jQuery UI here. We only need limited use of the whole UI library, hence, downloading only the UI core components will suffice. We also need the jQuery scrollTo plug-in for achieving the smooth scrolling effect — though you could also easily code this functionality on your own. Nonetheless, to save time, you can download the plug-in here.

First, we reference jQuery, the jQuery UI Core files, and the scrollTo plug-in within the header.php file. You can do this by adding the following code just before the wp_head() method.

<?php wp_enqueue_script("jquery"); ?><!--VERY IMPORTANT-->

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js" type="text/javascript"></script>

<script src="<?php bloginfo('template_url') ?>/js/jquery-ui-1.8.4.custom.min.js" type="text/javascript"></script>

<script src="<?php bloginfo('template_url') ?>/js/jquery.scrollTo.js" type="text/javascript"></script>

<script src="<?php bloginfo('template_url') ?>/js/main.js" type="text/javascript"></script>

The wp_enqueue_script statement is needed in order to load jQuery safely.

To enable our desired functionality, we fetch the value of the href attribute from the clicked element (i.e. the question). This value is the id of the list element which contains the answer. Then, we scroll to the list element, and apply the ‘current’ class. jQuery UI will ensure that the class is implemented on the list element smoothly and dynamically.

$(document).ready(function(){
	$("div#questions ul a").click(function(){
		var selected = $(this).attr('href');	
		selected += '"'+selected+'"';
		/*--Removing the Current class and the top button from previous current FAQs---*/
		$('.top-button').remove();
		$('.current-faq').removeClass();
		$.scrollTo(selected, 400 ,function(){ 
			$(selected).addClass('current-faq', 400, function(){
				$(this).append('<a href="#" class="top-button">TOP</a>');
			});
		});		
		return false;
	});

As mentioned earlier, we also have a ‘Top’ button which scrolls the page back to the top.

$('.top-button').live('click',function(){
		$(this).remove();
		$('.current-faq').removeClass('current-faq',400,function(){
			$.scrollTo('0px', 800); 
		});				
		return false;
	})		
});		

Step 6: Conclusion

What you’ve learned today is merely one way of implementing a FAQ page. WordPress provides the power of custom fields, which can be used to further improve the functionality of the FAQ system. When it comes to adding other features to our FAQ page, your own creativity is the only limit! Feel free to share your ideas in the comments!

Tags: Wordpress
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://www.demogeek.com DemoGeek

    Clear and very effective tut. One minor irritation was with the text transition effect when you click on a question. I would rather avoid that, just by trying it couple times brought me headache!

    • Micek

      Agreed, the chosen effects are dizzying; however, I like the general idea of highlighting the answer you just selected.

    • # Fez

      I agree, very effective tut indeed. However the implementation with jQuery isn’t looking that great.

      An alternative way would have been to have the headings clickable with collapsable answers underneath them. The text animation really does look bad.

    • http://www.code-pal.com Sumeet Chawla

      Thank you. The main aim of the tutorial is to implement the FAQ custom post, fetching and displaying it on the front end. I agree the jQuery part might be a bit over the top, but I just wanted to spice up the front end a bit and also teach some effect in the process. The effect might not be suitable in this case but might be helpful in some other scenario. What do you think?

      • # Fez

        Yeah Sumeet, don’t worry, the implementation was great. :)

    • http://pceasies.com pceasies

      Try changing the padding of li > p to 0, 5, 5, 5. Then just change the background color to yellow instead of using that big gray box.

      • http://www.demogeek.com DemoGeek

        That’s better for sure…it was a minor irritation that I thought was giving a damp to the excellent article. Nothing to complain!

  • http://webcodetuts.com agilius

    Great idea! I never thought about having a FAQ section represented in such a manner :D This is truly a cool idea!

  • http://www.a1media.ca Douglas Helmer

    Nice tutorial. I’m really loving the WordPress custom post types.

    I’ve gone through your tutorial and am struggling somewhat with exact placement location of some of the code snippets. Perhaps the Starkers template has changed somewhat, but I found that if I followed your instructions in Step 3 that I ended up with two body tags after inserting your first piece of new code. I just removed the original body tag which included a php tag to insert a body class tag.

    Also in Step 3, after the first bit of new code. You then have 3 subsequent bits of code to insert, but you weren’t really explicit that each should be inserted after your first code piece, which caused me a moment’s pause, but indeed it seems logical that’s where they are meant to be placed.

    In Step 5, I noticed that JQuery UI is now at version 1.8.6 and your code uses 1.8.4. Not really a big problem, I’m sure most people catch that, but I thought I would mention it. And as for placement, should that first snippet of code be placed on the line immediately above the wp_head() method, or just above the opening php tag that contains the wp_head method?

    As for the last two snippets of code in Step 5, I had no idea where those went, but I saw there was a call to a main.js in the js folder in your first snippet, so I created that file..

    Everything worked for a bit, but I changed something and now I can’t get it working again. LOL!

    Anyway, I do think it’s a very good tutorial and WordPress custom post types are really wonderful. Please do more! :)

    • http://www.code-pal.com Sumeet Chawla

      Well pointed out Douglas. I think there has been some mistake on my part while including the code part of the first

      snippet.In step 3, the modification that is to be done in the header is only this “Find the header.php file, open it, delete the div with an id of “access” at the bottom, and also the paragraph which contains the description of the blog. ”
      What I forgot to mention is that after editing the header file edit the ‘index.php’ file and then insert that piece of code

      in it. The piece of code will not contain the initial body tag, div#page-wrap tag and the h1 tag. It will start from the

      get_header method only. This is the reason you were receiving the extra body tag. I will convey the message to

      Jeffrey to edit that part.

      After the first piece of code, the following pieces of code will come sequentially after it. As for placement of the script codes, you can place just before the wp_head php tag but I don’t think it will matter placing it before the pingback link tag. What is important is the wp_enqueue_script method.The jQuery code goes in a JS file.

      Glad you liked the tutorial :)

      • http://www.a1media.ca Douglas Helmer

        Thanks for the clarification. My local test demo works great now :)

        If I were more adept at WordPress, I’d have figured out that those last three snippets from “Step 3: Coding the Template” were meant to go into the index.php file. Alas, I’m just a newbie with WP.

        I deleted the existing loop in the index.php and replaced it with your code. I also deleted the call to the sidebar and the extra footer call in the index.php. Once I did all that, it worked like a charm and didn’t have all the extra sidebar info I was seeing before.

        Once again, kudos on a very informative tutorial.

  • http://daltonrooney.com/wordpress/ Dalton

    This is a great tutorial as far as custom post types go, but I agree with others who have said the jQuery design & implementation is a little over the top.

    Just to share, I have developed a WordPress plugin that uses custom post types to create an FAQ section, very similar to this one—it can be demo’d here: http://daltonrooney.com/wordpress/q-and-a-frequently-asked-questions-plugin

    Might save someone a lot of time.

    • http://www.code-pal.com Sumeet Chawla

      The plugin looks great Dalton :) It very helpful for those who do not want to go through the process of creating a custom template and post for implementing this functionality.

  • http://sideradesign.com paul

    I think this is a very creative use of custom post types to solve a common challenge in WordPress sites. bravo to you :)

  • http://www.hiddendepth.ie/ Dave

    A great tutorial Sumeet !!!

    Hope to see lots more of you on Nettuts

  • http://www.wealthbuildingcourse.com/ Thomas Herold

    Looks very nice…

    Question: How do I prevent the FAQ posts from going public (into my regular post stream and RSS) ?

    Thomas

  • Ti Tiger

    Awesome idea :)

  • http://www.xcellence-it.com/ Xcellence-IT

    Hey, great tutorial… you noted down each details that are necessary.

    Thanks

  • http://www.wsiwebefectivo.com diseño web guadalajara

    I have read all the steps.Its very nice.There are various methods of creating a custom theme. Some prefer to create a new blank white template,while others like to create child themes of the new TwentyTen template.It does apparently allow us to create custom menu widgets for our sidebars with all the bells and whistles.

  • Gabor

    Very Useful, great tut. Thx.

  • http://angusfretwell.com Angus Fretwell

    Wow, I gave a jQuery lesson at my school (I seem to know more than the teachers -__-) about making a jQuery-powered FAQ page, and the FAQ page I used in the example looked very similar to the one in this article – weird!

  • http://wpblazer.com Leo

    In step 5, what’s the purpose of line 4 in the second snippet? I can’t figure it out.

    selected += ‘”‘+selected+’”‘;

    • http://www.code-pal.com Sumeet Chawla

      I actually used it to make the id which I fetch from the href attribute as “id”. Its not required though. It works fine without it.

  • http://newdailyblog.blogspot.com Tahsin Hasan

    thanks for the post. … see also on tahSin’s gaRage.

  • http://www.sonaliagrawal.com Sonali Agrawal

    Awesome tut! I have it implemented in one of my projects but the problem I am facing now is that the FAQ page is only displaying 10 questions, not more than that. What could be the problem? Appreciate your help.

    http://demo.sonaliagrawal.com/MES/faq/

    • http://www.code-pal.com Sumeet Chawla

      You can include this option in the query string: posts_per_page=-1
      Then it will query for all the posts in the FAQ category.

      • http://www.sonaliagrawal.com Sonali Agrawal

        Thanks…That worked!

  • http://prepaidradar.de/ PrepaidRadar

    Hey, very great tutorial. Thanks for the good clarification

  • http://www.thedevelopertuts.com Bratu Sebastian

    Great tutorial, I didn’t know that post types in wordpress are so capable.

    However, I would code my own because WordPress is a slow technology. Just by seeing 2 whiles in there I realize how much easy money the wordpress hosting businesses make.

    You can always save 2 buffers in a single while():

    if (have_posts()) :
    $questions = ”;
    $answers = ”;
    while (have_posts()) : the_post();

    $questions .= ‘<li><a href=”#answer<?php the_id(); ?>”><?php the_title(); ?></a></li>’;
    $answers .= ‘<li id=”answer<?php the_id(); ?>”>
    … the_title(); …
    … the_content(); …’;
    $answers .= ‘</li>’
    endwhile;
    endif;
    wp_reset_query();
    get_footer();

    echo $questions;
    echo $answers;

    There. One loop. Your server thanks you and you pay less on that expensive VPS.

    • http://www.thedevelopertuts.com Bratu Sebastian

      Actually, you have to echo $questions and $answers before get_footer(); ( idiot me! ) :)

    • http://www.code-pal.com Sumeet Chawla

      Yup, the code can be optimized in may ways. I wanted it to keep simple so that I can clearly explain what is going on and how the FAQs are structured. Your way of optimizing is much better than the initial code which I pointed out.

      General tip for everyone: The algorithm with the lowest time complexity should always be used for web oriented stuff because, as Bratu pointed out, it saves web hosting resources :)

  • http://360signals.com 360Signals

    Super!! Thanks for this amazing tutorial!

  • http://bluzgraphics.com Paz Aricha

    Awesome Tutorial! Thanks!

  • Dan

    @sumeet

    Why did you call jQuery with the WP string and then add the Google API source right after it? Is this redundant or is this the correct way?

    I thought all you had to do is call jQuery with the WP tag.

  • http://www.code-pal.com Sumeet Chawla

    Yup, its redundant. Only the wp_enqueue_script is enough to call the javascript file. I actually wanted to insert the one from google. To load the jquery from Google instead of loading the one provided with wordpress itself, one has to add this code to the functions.php file.

    function my_init_method() {
    wp_deregister_script( ‘jquery’ );
    wp_register_script( ‘jquery’, ‘http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js’);
    }

    add_action(‘init’, ‘my_init_method’);

    Am stressing on using the enqueue script method to load jquery because plugins which use jquery library, also load the jquery and this could cause major problems. I learned this the hard way haha :|

  • http://www.bionicworks.com Thai Bui

    Great walkthrough. I had no idea how to add admin panels until this. Thanks a million!

  • http://www.freerobin.com Freerobin

    hi, nice article, but i don’t find that plugin :(

    try to look my wordpress theme site
    is under costruction
    Download wordpress theme
    bye

  • http://www.phillprice.com Phill Price

    Nice article. Although in it you enqueue jQuery but I think the next line writes it as a normal script? (Step 5 line 1 and 3)

    • http://www.code-pal.com Sumeet Chawla

      Yes, I clarified it in a comment above.

  • Sriramajeyam

    great creativity.. thanks..

  • http://javedweb.com/ Javed Gardezi

    Thank you for such a nice post .. and its really helpful for my project…

  • http://osakaair.com John Zephjo

    Great tutorial. Thanks for the Post. Helped me a lot

  • http://www.designtodevelop.com Steven

    This is brilliant just what I’m looking for. Always wonder what is the best way for clients to create FAQ pages easily.

    Thanks for the great tutorial

  • http://im.jaskni.com JASKNI.W

    Awesome!
    thnx very much!

  • arnold
  • http://www.aisle7studios.com Aisle7Studios

    This is a great tutorial, but for some reason when the FAQ page is listed with other pages in the navigation using wp_list_pages, it doesn’t get highlighted as current nav. Does anyone know how to fix this?

    • http://www.aisle7studios.com Aisle7Studios

      It seems to be because of the query_posts code. When using WP_Query, the problem goes away.

  • http://www.liamjaydesigns.com/ Liam

    A great tutorial which has helped me get to grips with WordPress custom posts. Big thanks Sumeet! :)

  • Waqas

    can we use this theme inside another theme only for one page? if yes then how.

  • http://wppremium.info neel

    Excellent use of wordpress new custom post type feature. So from now on you can create your own FAQ page without using a plugin…

  • http://www.ratesman.funsite.cz Ratesman

    This is a great tutorial, thanx :)

  • http://www.balkanbeats-berlin.de Balkanbeats

    this tutorial was wery helpfull … thanks

  • http://www.Tripad.im Tripad

    There is just one error in the script that was breaking it :

    $(document).ready(function(){

    needs to be changed to

    $(document).ready(function($){

    Wonderful tutorial ..it was really helpful :D

  • http://www.elerwanda.com Tim

    Hi,
    I use the studium theme.
    Would it be possible to use this type of FAQ on my site.
    I think the underlying code is a bit different.

    Thanks,
    Tim

  • mounir

    These is not a tutorial for newbies !!
    i don’t get it !! how did you implement the FAQ menu in the wordpress dashboard !!
    the code that are you talking about to add it in the function.php are already there !!

  • http://www.sahajayogabenessere.com Silvana

    Nice tutorial.
    In particular I like the questions to superheroes :)

    I did not know you could use anchor tag to point to list items.

  • http://tutspress.com tutspress

    its awesome! I have using this FAQS page on my free themes :) great tip.

  • http://vabulous.com Vab

    This is exactly what I was looking for! I love how you can use custom post types for a whole faq section that will divide each question into posts! woohoo! The SEO value derived from this approach is better than having a single page with questions.

  • Romain

    Nice tuts !!

    But how can I do the same thing, with taxonomy for grouping different king of post ?

  • Chetan

    NiceTutorial………….

  • saeed

    Hi!
    I design a WordPress theme.
    And now I want to add a help page for theme!
    Please guide me!
    golpesar20088@gmail.com
    tahnk you

  • Anand Prakash

    I am getting two FAQs on the same page. The bottom one scrolls me to the top (which is working fine) on clicking the question.

  • NileshKacha

    Again ++