How to show a category post in a single page in thesis theme?

In this tutorial I will show you how to display your all post in a single page under a category. For e.g. If you are writing about fifty vehicle, and created a page for each vehicle in your site,  do you want to link all those post in a single page? Then, here is the solution for this. It’s very simple to use and there is no need of any category based related post plugins to use these in thesis theme.

Watch this full video tutorial

If you can’t watch this video,  keep reading rest of the post to follow the steps.

Before you adding this code, it will look like below image.

Before Adding

Add this below code to custom_function.php

In this code by default I want to show 10 posts under a category if you want more than this just replace this 10 with your number of post.

// paste this code into custom_function.php

function custom_cat_page() {

global $post;

$temp_query = $post;

$postID = $post->ID;

$custom_cat = get_post_meta($postID, 'custom_cat_page',$single=true);



$posts = new WP_Query('cat='.$custom_cat.'&showposts=10');

while ($posts->have_posts()) : $posts->the_post();


<h3><a href="<?php the_permalink() ?>"><?php echo $post->post_title ?></a></h3>

<?php the_excerpt();
<p><a href="/?cat=<?php echo $custom_cat;?>">View the Archives</a></p>


$post = $temp_query; }


<?php }


Now we are going to find the category ID.

To do this Go to post and select categories. It will show all the categories. Place your mouse over the category which you want. At the bottom status bar, it will show the category ID.

Note this ID because we are going to add it in another place.

See the screen shot below:

Find Category ID

Next step select the post which you want to show all the related information.

At the bottom of thesis theme you will see a tab custom field.

Clicks enter new tab and type custom_cat_page and your category value.

Then publish the post.

Enter category ID

Now you will see the all the relevant posts under the category. It will look like below screen shot.

After adding

Hope you found this useful. Share this on social media, it might helpful for other thesis users also.  Leave a comment about your thoughts. For more checkout our all Thesis theme tutorials..

{ 77 comments… add one }

Leave a Comment

  • Deepika January 7, 2010, 1:55 AM

    Hi friend,
    You have shared an interesting article. I am very eager to try it. Hope it works good for me.. I will inform you about this after trying in blog friend.

    • Pascal January 7, 2010, 9:37 AM

      Thanks Deepika.

      • aviationMY January 7, 2010, 2:54 PM


        i want to know how to make Article by Pascal Sundar at each post below content like yours above including your thumbnail..i found that was so great! many article you have wrote and how many people views that post/article..could you show me how??

        thank you!

  • Jaydip Parikh January 7, 2010, 12:13 PM

    YEah. This is interesting article. Will help to reduce bounce rates.

    • Pascal January 7, 2010, 1:20 PM

      Yes. You are correct Jaydip.

  • Nitin January 25, 2010, 2:42 PM

    Hey…that was a good tip…

    if I may request…can you help me with the php for showing post categoy in a second nav menu (that is below header).

    What I mean is that this second menu (containing the categories under which a post has been filed) displays on post pages only, and not on home page. Of course this customisation is for Thesis. My site isnt live yet…

    Am using this function, but it displays on all the categories (unrealted ones too) on post page

    function cat_nav() {
    if (is_single()) { ?>

    <?php }

    Thanks in advance!!

    • Pascal January 25, 2010, 3:21 PM

      Hi Nitin,

      This is what i have understood from your comment – You need a second navigation and this navigation should be in post pages only-it should contain only categories links- Its ok.

      But I could not understand more than that.
      And the code you given here is not complete code you have used for showing categories in second nav. Give the full code also. And tell me exactly what categories you need in your second nav? You have told your site not live. But giving a view of that site to us will help us more to clarify.


      • Nitin January 25, 2010, 6:05 PM

        Hey Pascal….Thanks for a quick reply!!

        I think the function I posted has been stripped out by your blog, I don’t have a workout for this. This code has been mentioned here on DIY forums

        Yes you got it right this is what I meant, in fact to clarify further the following link is a screen capture of homepage on my test site, this site is not online..and only shows the default Nav Menu

        Now if I open a post page, I want a second nav menu after the header image that will only show the categories under which the post has been filed. The following link clarifies this

        You would notice that two categories have been shown here, however only the category “commodity prices” actually applies to this particular post, “uncategorised” is superfluous.. How do I get this working i.e. only the category that is relevant should populate the second nav menu..

        in fact I got inspired by this post by Kristarella on DIYTHEMES forums however, this post is relevant for versions prior to 1.6 only… I think the codes have changed..

        I’m not an expert on tech issues, can you help me on this please

        • Pascal January 25, 2010, 8:16 PM

          Hi Nitin, Thanks for clarifying bit more.

          But unfortunately there are no template tags or parameters in wp_list_categories to exclude or include related categories. So that your requirement goes hard to fix.

          But for current time, what you can do is, you can simply exclude the category ‘uncategorizied’ from appearing menu by doing this.

          Replace title_li= by exclude=7&title_li

          Here again replace number 7 by category id. You can find the category id no in last of the category edit link in admin page. If you want to remove two categories, give the numbers separated by comma also.


          • Nitin January 25, 2010, 8:31 PM

            Thanks Pascal…I’m glad you took time to look in to the matter

    • aviationMY January 25, 2010, 6:47 PM

      Hi Nithin,

      I have a site but not yet publish for public but for pascal only…and Pascal has tweak and fix it since last week! You don’t have to worry of not be able to log in again.

      He is a the honest person i ever met even we are living in different country!

      Create another admin profile and give it to Pascal.

      But to solve your problem, at least shows your website here so can troubleshoot them!

      pertaining to your question.

      There is a Conditional Tags to show on front-page, page only, post only or page 404 only and etc.

      Once you used to can put anything in your website also try with playing with the hook.

      if (is_single()) { ?>


      if (is_single() || is_page() || is_front_page() ) { ?>

      learn about Conditional Tags. Separate it by the || symbol.

      hope it works.

      throw your doubtfulness here so we can together try to resolve it!

      • Nitin January 25, 2010, 8:28 PM

        Thanks AviationMY…

        my site is not online…I am using XAMPP and have created a local host on my PC…I can make it online by end of next week only because of some webhost issues…but then again customisations mentioned on are I thought why not give it a try till my webhost issues are resolved…I’ll try to learn about condition tags..thanks again

  • Latief@AnotherBlogger January 27, 2010, 10:52 AM

    Interesting bro, I just wonder when I launch my video tutorial, lol! Thanks.
    Just voted the article on MMO Social Networ.
    Btw can I use it on my Theme? I’m not using Thesis 🙁

    • Pascal February 11, 2010, 6:42 PM

      NO it’s worked only in Thesis

  • mustafa February 11, 2010, 6:19 PM

    hi pascal i do it it seems very cool but it dosent show picture or video how can i do

  • mustafa February 11, 2010, 6:25 PM

    hi agan me 🙂 finally i dont want arciheves i want it shows page number 123.. how can we do please?

  • mustafa February 11, 2010, 6:37 PM

    Dear pascal i saw a site when we click this adress it shows category’s Archives page but it include text and picture but when i link page with category adress like it show only title no text no picture it very very important can you solve this my problem

    • Pascal February 11, 2010, 7:05 PM

      do you want like this site..

  • mustafa February 11, 2010, 7:35 PM

    yeah absolutely i want like this site ! (show the category’s archives in page not only title, i want title with summary of article and picture when i click or it must be show) this please help me

    second one when i link /?cat=3 it work but when i link /category/video it doesnt work i work on local

  • mustafa February 11, 2010, 9:28 PM

    Dont you help me ? 🙁

  • mustafa February 11, 2010, 10:46 PM

    thanks i will follow you and i think you will solve this problem .i made my blog with using your blog’s information.

    • Pascal February 11, 2010, 10:59 PM

      Thanks mustafa.

  • mustafa February 12, 2010, 6:08 PM

    Hi pascal i think this if you want i can send my site’s databese and files on rapid to you may be you can work on it

    • Pascal February 12, 2010, 10:27 PM

      Hi Mustafa, Currently No customization technical staffs available here to handle your databases and theme customizations.

      If you got error when you handle our codes, we can correct. But we checked our codes already. So most probably they will be working fine.

    • aviationMY February 12, 2010, 10:30 PM


      Hi, why dont you just create another admin and give it to dont have to worry about not be able to login again.

      i had gave him mine before this to fix my thesis because it only works on Firefox and when open in IE or Chrome it messed up(better you check it now)

      and indeed, thank to FourBlogger especially Pascal for fixed it for me…

      just give him another admin account..once his finish you can delete it if you want to…my site now is under progress..the fixed theme don by Pascal already stored as backup and what u saw in my site now is just a touch from me..

      p/s: we love to see what other Thesis user had done to their themes…show us your site!

      • Pascal February 12, 2010, 10:56 PM

        Hi Aviation, Thanks for comment.

        But currently we don’t have staff to take these type of customization works.

  • mustafa February 12, 2010, 11:16 PM

    i understood you and i work on local i finished my site i cant do only this to show a category’s archives in page i want show this in page with title and text for example i cant do this i search for a week but i cant find anything so i cant publish my site because of this

  • Pascal February 12, 2010, 11:41 PM

    1. Go to Thesis options-> Post Images and Thumbnails -> Default post image settings and mark the check box of “Show images on archives pages” and click save.

    2. Go to Thesis options -> Display options -> Archives -> Select any one of of the given “Post excerpts” or Everthings’s a teaser or same as your home page…. The one among the three will satisfy you.

  • mustafa February 13, 2010, 12:03 AM

    very very thanks pascal how can’t think this before you are my hero now 🙂 it solved

    • Pascal February 13, 2010, 12:16 AM


      It took more time as you are requesting your query in different post. Because we have explained a different thing in that post. We got confused as you mentioned about the post & category links….

  • mustafa February 13, 2010, 3:52 AM

    hi pascal again me my english not perfect and in this site’s explain i cant understand can you explain this simple you can tell me how can i do it please simple not complicated

    • Pascal February 13, 2010, 10:35 PM

      Hi mustafa, for your query we are seeing that sugarrae site link,once we finished, i will explain you.

      • Pascal February 13, 2010, 11:33 PM

        Hi Mustafa,

        That is a plugin which helps you to customize the wordpress dashboard for registered subscribers. This plugin is not going to be a need for wordpress bloggers. Because most of the blogs don’t allow readers to register in their blog.

        I will explain in simple.

        You can allow anyone to register your blog here. . Just tick the check box in “Membership – Anyone can register” and set the default role for them as subscriber.

        If you done this, any one can register your blog at

        You can do the above and login as subscriber to your dashboard. You will see very less options and more ugly wordpress dashboard.

        What sugarrae did in that Customize your community plugin is, that plugin allows you to customize the subsriber dashboard profile view as more beautifuly, most probably you can customize as the same as your blog layout with header and side bar etc….


  • mustafa February 14, 2010, 12:09 AM

    Dear Pascal yeah i know alot of blogs dont allow became member but i want this but instaled this puling i cant understand there below i cant show this puling in page , i did
    . and i click it already only i want this when member goes to your profile they will se good dashboard and this puling make this but i cant work it

    To customize the CYC plugin to work with your template, you’ll need to visit the administration panel at Settings > CYC. Once there, you’ll see three boxes you can insert code into:

    * Box One: Code to insert after the header has been loaded
    * Box Two: Code to insert before the sidebar is loaded
    * Box Three: Code to insert after the sidebar has been loaded

    Those familiar with Wordpress and CSS will likely have no problem figuring out what goes there. For those who are more “blogger” than “coder”, I’m going to explain how to find what to put in those boxes below:

    Look at your single post template file in your blog theme (usually single.php) and find every div tag that is opened () but not closed () before the following piece of code:

    After finding them, insert all of those div tags into Box One.

    Next, look for the piece of code that calls for your sidebars. I use the Thesis theme, so mine is:

    But yours may look more like this:

    Once you find the sidebar code, look to see how many of the tags you put into Box One are closed BEFORE the sidebar code appears and insert those div close tags () into Box Two.

    Next, look to see how many of the tags you put into Box One are closed AFTER the sidebar code appears and insert those div close tags () into Box Three.

    • Pascal February 14, 2010, 10:31 AM

      We couln’t tell how to do that. Because i haven’t tried that plugin till now. I first apply the plugin in my testing site and after that i will tell how to do that.

  • mustafa February 16, 2010, 8:27 PM

    hi pascal i published my site i ask you something how can i good optimize for google serching (seo) goole doesnt show my site now
    the second one did you anything about CYC puling if you did can you share to me 🙂

    • Suresh February 16, 2010, 9:36 PM

      hai mustafa,
      check your wp-admin privacy settings whether you are enabled your blog visible in search engine or not..
      For doing this go to wp-admin->settings->privacy
      in privacy select the option ‘I would like my blog to be visible to everyone, including search engines’
      ans save it.

      • mustafa February 16, 2010, 9:46 PM

        Yeah i clicked it already but i published site 3 days ago and i installed all in seo pack and i use this /%postname%/

        • Suresh February 16, 2010, 9:51 PM

          Wait for a week your site will appear in google search..further if you have same problem we will check it..

        • aviationMY February 16, 2010, 10:01 PM

          Hi Mustafa,

          pertaining to your comments..

          you have to wait about a week for Google, Bing, Yahoo to indexing your blog…

          so how to know the Google has already indexing your blog?

          in Google search just type your site BUT no the Google homepage like

          in order to get this opportunity like just type F than it wiil appears facebbok you must mastered the SEO…

          let s take in example the last time i just type in FOURBLOG in my and appears with
          80, 700, 000- DAMN!!!…this fourblogger seems has a lot of traffic coming in their blog every day! teach me some SEO please! haha…

          to be like the takes time though..depends on how you attract the visitor to come into your website.

          pertaining to your answer.. go to your homepage and type in your full url


          it must be appear though..

          p/s: @fourblogger- im waiting for tutorial of WHAT TO BE PUT IN SEO DETAILS FIELDS IN THESIS theme..

          • Pascal February 16, 2010, 10:51 PM

            Hi Aviation,

            Thanks for asking us continuously. We will produce more video tutorials on coming months. Hope we will create SEO tutorials as video series. That series of posts will help to all bloggers. Currently we have been testing out different things about SEO. If everything goes fine, You will get amazing tutorials for SEO.

            I introduce a blog to you . This blog is handling by entrepreneur Neil Patel. He posted a basic SEO article also yesterday. Keep on reading his blog.

        • aviationMY February 16, 2010, 10:12 PM

          @ mustafa

          check this link

          there your site has already indexed by Google of 30 search result in 3 days published..

          Congrats from AviationMY-Malaysia…

          just wait for a week..keep on blogging..

          • Pascal February 16, 2010, 10:44 PM

            Hi Aviation, Thanks for interacting with our readers.

            Appreaciate you.

  • mustafa February 16, 2010, 10:19 PM

    i think so in a week it must be appear in google joomla tkake two days for appear in google thanl your comment suresh have you got any information how can we work it i asked to pascal too. but i guess pascal is bussy i saked him alot of things and he answered in patience

    • Pascal February 16, 2010, 10:55 PM

      Mustafa, Pascal here.

      Your site already crawled by google. type


      We have been working on your CYC question. But we hope it will take at least couple of days to be finished.



    • aviationMY February 16, 2010, 11:01 PM

      ok..lets talk about CYC

      base on my point of view..

      this thing i don’t know how it works, im not a pro and what im gonna say might be stupid but to build a community, just using Twitter and Facebook…

      add Facebook fan page in your blog to build your own Fan Club…

      though, you want have a registered users? just now i stop by your site and WOW! your customization is awesome…love the content in the middle..

      but when i about to comment in your blog i need to register first…that make you blog not visitor-friendly.

      as for me, im only the admin or create a guest post like i write a post in your site and my role just a author or contributor…so you need to create another account for me which you can delete my account as your convenience..

      the sweet moment in blogging when somebody drop a comment moreover a compliment or a developing comments to us..

      im like floating at this time…haha..the more the comments, the higher im floating( ok just kidding )

      BTW, i look at your site and your meta keyword and description are:

      Edebiyat , Sanat, makale, deneme, sessizgemi, ilginç,gazete, edebisanat, aruz vezni, şiir ,güzel sözler

      are you targeting only for your country or universal? at least put some English words there…

  • Judd April 15, 2010, 4:21 PM


    Just gettting into thesis and love the article.

    I wanted to change


    Which works! However I want it to look like the homepage and have the read more. Currently it just shoots out all the whole post instead of stopping at the read more.

    Any ideas? Thanks so much.


    • Suresh April 15, 2010, 11:02 PM

      hai judd,

      some words in the comment is missing ..i couldn’t get it..

  • Judd April 15, 2010, 4:22 PM

    Darn my code did not show up

    php the_excerp


    php the_conten

    • Suresh April 15, 2010, 11:05 PM

      It will work for the_excerpt() and the_content()

      • Judd April 16, 2010, 12:41 AM

        I was able to get the php the_content to display the posts. However, they show the complete post instead of showing the post content up to the read more insert. Like the homepage basically. I am unsure if this is thesis overriding or if there is something in the functions I can specify.


        • Suresh April 16, 2010, 9:17 AM


          If you want all posts like homepage means use the_excerpt() function..

  • Judd April 16, 2010, 8:37 PM


    I have added back the the_excerpt() function and than specified the image that can go with the post.

    So on the category page it will now show the image I had specified as the thumb and the excerpt for each post. Great!

    So I guess the work around for a category page, is to show a excerpt and than specify a image to go with it on the post options.

    (This is a category page)

    On the page that I wanted to use your post tutorial. It does not show the image.

    (This is a page)

    So this is my problem, I want either content to allow the ability to us read more and have an image above the read more tag or use excerpt and allow for a image to go with each post that is place on to the page

    Any help will be appreciated.


    • Suresh April 17, 2010, 9:41 AM

      hai judd,

      Thsi code is not giving thumb nail image in the post excerpt. if you want you should add the code before or after the the_excerpt() function…

  • Judd April 17, 2010, 4:01 PM

    Thanks! I am going to look into that, would you mind giving the line of code you need to add or point me in the right direction. It looks like it might be a thesis thing.


  • Judd April 17, 2010, 4:29 PM

    So I found the ?php the_post_thumbnail(); ? code which posted above the except and got the dreaded fatal error. Not sure what I do here. I suspect it is the functions file I need to mess with.

    • Suresh April 18, 2010, 9:09 PM


      Not this php function to add thumb nail image in category post. you should get the code from your side directory..

  • mansoor May 9, 2010, 5:46 PM

    Hi Pascal;

    I have a question regarding categories on thesis theme. when i click on a category at thesis website like yours, i am taken to a category page e.g here you see we can read all the titles in that category but no excerpt or content of that post….. how can we achieve this that when we click on a category link we are not only shown titles but also excerpt

    • Suresh May 9, 2010, 7:20 PM

      hai mansoor,

      Go to thesis options in wp admin.
      expand display options here click archives we have options to display archives like title only, with excerpt or like teaser.. we can choose any one..

      In thesis 1.7 go to site options..

  • David July 6, 2010, 2:33 AM

    Just wanted to say thanks for this. I’m about to install thesis on site my site and have been playing around with it a bit so I can get my site the way I want it…

    This is the cleanest example of displaying posts on a page I’ve seen so far. Now I just have to figure out how to display the posts as a thesis teaser… 🙂

  • Steve Jackson September 6, 2010, 2:01 AM

    For the life of me, I can’t get the post image or thumbnail to show. What’s wrong with my code??

    function custom_cat_page() {

    global $post;
    $temp_query = $post;
    $postID = $post->ID;
    $custom_cat = get_post_meta($postID, ‘custom_cat_page’,$single=true);

    have_posts()) : $posts->the_post();

    <a href="”>post_title ?>
    by on

    <a href="/?cat=”>View the Archives


  • Julie @ Inspired to Write October 23, 2010, 4:40 AM

    This is close to what I want, but I am wondering how can I make categories that have only ONE post show that post in full page instead of just the title. For example, I would like when people go to “Submit Guest Post” (under Guest Posts category) that the full post will be there and they will not have to click on the title to read it. So, is there anyway in Thesis to have the first post of a category show the full post and the rest as excerpts/teasers?? THANK YOU or ANYONE that can help!!

    • Oren December 18, 2010, 2:08 PM

      need the same please… 🙂

  • wahid polin December 5, 2010, 12:23 PM

    hey pascal,thnx for this awesome post..I was looking for this quiet a while…But only thing missing is that i also want to show the thumbnail images with that,it’s really important cuz i m using this on a page.without the images it looks something like related posts but want to make the page a standalone page…will it be possible?

  • MAHAR SHOAIB January 19, 2011, 7:24 PM

    Thanks for this Tut.

    Keep it up.

  • Regina June 29, 2011, 10:46 PM

    Thanks Pascal. Another great help. Site is coming along great, so glad I have time to work on it again!

  • Mary Bouldin October 13, 2011, 2:31 PM

    Thanks much! I had no trouble doing this with sites I created from scratch, but with a client that insisted on Thesis, well, I was at a complete loss. I went from clueless to finished in maybe 5 minutes? You rock…

  • avinash gaud November 22, 2011, 12:05 PM

    Heyy thanks for the post but can you tell me how to display video using embed code in post

    • FourBlogger November 27, 2011, 9:49 AM

      Paste the code in HTML editor to display in post.

  • Chris Cobb December 21, 2011, 11:37 PM

    Thanks Pascal for the code – very good!

    Question – is there a way to not show the article in the list that the custom field is assigned to? Currently the articles list shows the title and excerpt of the same post it’s attached to. How do I show all the article in the category except the one I’m using with the as the main article?

    Make sense,

  • faanigee December 26, 2011, 6:36 PM

    any one tell me how i can give the look of this site(freemooviesonline dot com) to my site (movies-mart dot com)
    plz help me if any one can either in wordpress or joomla with rocket themes

  • Andrea April 18, 2012, 7:39 AM

    I’m not seeing the Custom Field box at the bottom of my page after I add your custom.php code. Outside of updating the custom.php file, is there something else I need to do? I’m using Thesis 1.8.4.

    • Andrea April 18, 2012, 7:42 AM

      Oh. And I meant custom_function.php.