ThemeShaper Forums » Thematic

display catergories posts on page

(7 posts)
  • Started 10 years ago by tommo77funk
  • Latest reply from tommo77funk
  • This topic is resolved
  1. Hi,

    First of I love thematic and am very happy, so thank you ! I am now using power blog with a view to updating one of my sites so I am practising on a test site till then.

    Please see http://www.panoraks.co.uk

    My problem is that I want to display a list of posts from a specific category on a certain page. I did this for one catergory by placing

    <?php query_posts('cat=krpano&showposts=10');
    while (have_posts()) : the_post(); ?>

    into a page template, but then I tried for other catergories and it did not work. I tried query_posts('category_name=krpano'); as well. Whilst looking on certain forums for an answer I came across this new plug-in that was recommended called 'query posts widget' so I am trying to use this. I am having 2 problems that i am hoping to get help for.

    1. As its a widget and I wanted the posts to appear in the main page area, I decided to put it in 'page top' it appears fine but always with a sidebar regardless of me writing in functions.php not to display a sidebar on that page.

    2. When the list is displayed in page top there is always 1 extra post appearing underneath, example on homepage http://www.panoraks.co.uk

    Any ideas would be appreciated, however I realise these questions should also go on the plug-ins forum, so I will ask there too.

    Really I just wondered what is the best way to get working catergoried posts on pages, when using thematic. If anyone has an example of a thematic page template that does this I'd love to see it.

    Many thanks,

    tom

    Posted 10 years ago #
  2. Hey Tom,

    you don't need to change a thing and you don't need a plugin to list the posts in a certain category .. just do a simple copy and rename. If you want to have the full post .. copy Thematic's index.php to your child theme's directory and rename it to category-ID.php. Replace ID with the category ID .. install the Page-Links-To plugin, create a new page and link it to the category. It'll call the category-whatever.php.

    Cheers,

    Chris

    Posted 10 years ago #
  3. .. by the way .. let me know if you want to keep the posts on a single post page separate for a user is coming from the home / frontpage (exclude the posts listed on your category pages) or stay in a certain category for all posts if the user is coming from a category page ..

    Posted 10 years ago #
  4. Cool ! thanks Chris - I think I understand, but hope you dont mind a couple more questions to make sure I got it right.

    I installed Page-Links-To plug-in and made a file called category-virtual-tours.php (also category-5.php) which I uploaded to my child theme. On a new page I could not put a link to this file as the whole url did not work and when I just did the file name, it was referenced after /wp-admin/ in the permalink structure. I did some more reading and found a similar post on this forum where you say to put in the url like this http://www.panoraks.co.uk/article/virtual-tours/ so I did and it works, but I have 2 questions regarding this.

    1. the pages no longer have there own page permalink, is that right ?

    2. For some reason this page http://www.panoraks.co.uk/article/virtual-tours/ does not have Category Archives: virtual tours and diplays the whole post but another page I made to display a catergory does http://www.panoraks.co.uk/article/virtual-tours/krpano/ have Category Archives: krpano and just displays excerpt. Strange I dont know how I've done it.

    I feel like I might have got this wrong as I am not actually using a category-whatever.php file to display these. I would really grateful if you could confirm I got the right end of the stick.

    Thanks for your time, I really appreciate it and thematic :)

    Posted 10 years ago #
  5. ah ha i think I get it. The other categories are using archives.php yep i think i'm definatley holding the wrong end of the stick...

    Posted 10 years ago #
  6. wo hoo ! I got it it was the catergory-5.php that was making it display right and the others wrong so I made up more files with the numbered ID's and it works as intended. Marvellous ! I cant stop smiling :)

    Cheers Chris !!!!

    Posted 10 years ago #
  7. Is there a way for me to lose the 'article' in the permalink structure, and breadcrumbs is showing the page as coming from blog, and also the page visited shows on my latest news section and not on the virtual tours page.

    e.g. http://www.panoraks.co.uk/article/virtual-tours/

    nearly there !

    Posted 10 years ago #

RSS feed for this topic

Reply

You must log in to post.