• Hi.
    I’m developing a website for my uncle, he work as an artist.
    He needs to post both video and images on his website, but they have to be under different pages, the ” ART ” page only displays images and text using highslide and some homemade css. but when i post “Video”, they show up there as well
    My question;

    How do i make sure the “Video” page only display posts in the “video” category, and the “art” page only displays the “art” category

    I am running K2 i that helps.
    I would be really grateful for help!
    (and yes, i have used the “search” function)

Viewing 12 replies - 1 through 12 (of 12 total)
  • Not sure what do you mean by “pages”. Are we taling about Pages? Those should NOT be used for displaying posts.
    Use Category_Templates instead.

    And when you post something – define in which category they should go.

    Thread Starter Erik

    (@axel-hoel)

    I suppose i shuold have been more specific…
    Sorry about that.

    We are indeed talking about
    Pages

    I have two Pages, VIDEO and ART, and i also got two categories, VIDEO and ART. As you might guess, i want the two categories on different Pages.

    I don’t really understand how work with Category_Templates

    How should i modify the code to only show one category per page?

    Really Grateful for you answer!

    You don’t need Pages for what you want. That’s your first mistake…

    WP does it for you out of the box: when clicking on a category name(link) it will display ONLY posts from that category. Every WP installation does it without your intervention.

    You may use the Category Templates IF you want to style differently the layout of the posts listing for different categories. If not, you don’t need them.

    yup … just give link for category πŸ™‚

    n it will display all post under cat your choice πŸ˜€

    Thread Starter Erik

    (@axel-hoel)

    You don’t need Pages for what you want. That’s your first mistake…

    WP does it for you out of the box: when clicking on a category name(link) it will display ONLY posts from that category. Every WP installation does it without your intervention.

    You may use the Category Templates IF you want to style differently the layout of the posts listing for different categories. If not, you don’t need them.

    Okay… i need to link, that sounds smart….
    but how do i make the link?

    To make it all easier, i figured i should link to the page this time
    LINK

    Don’t bother with the text, it’s in swedish.
    I have three pages, Art, Video and CV
    If you click the art page, you get all my posts, since i want a static “start” page, i just set the art page to show all of my posts….
    I’m starting to get a felling that tells me i should change that…

    So, how do i post these “links” and make them look like pages, but showing only one category?

    Really appreciate the help!

    A brief explanation –

    Posts – used for dynamic content (like news or articles)

    Pages – used for static content – things that never change, like your Uncle’s contact details.

    If your uncle is constantly adding new artwork to his portfolio, perhaps his art should be posted as ‘Posts’ and not ‘Pages’. Then he has an ‘Art’ category and a ‘video’ category’.

    By default, WordPress can display every single post in a category, and the link is usually something like:
    http://www.yoursite.com/category/art/

    So this is your link.

    And then, to post these ‘links’ in your navigation, you can use a plugin like Page Links To, where you create ‘pretend’ pages that actually are linked to the category page.

    Thread Starter Erik

    (@axel-hoel)

    A brief explanation –

    Posts – used for dynamic content (like news or articles)

    Pages – used for static content – things that never change, like your Uncle’s contact details.

    If your uncle is constantly adding new artwork to his portfolio, perhaps his art should be posted as ‘Posts’ and not ‘Pages’. Then he has an ‘Art’ category and a ‘video’ category’.

    By default, WordPress can display every single post in a category, and the link is usually something like:
    http://www.yoursite.com/category/art/

    So this is your link.

    And then, to post these ‘links’ in your navigation, you can use a plugin like Page Links To, where you create ‘pretend’ pages that actually are linked to the category page.

    Thanks a lot!
    The plugin you linked to works like a charm!
    However, i would like to make a couple of cosmetic changes. When somebody (me) clicks on the art page, the browser sends me to http://mysite.no/categoty/art but at the top of the page the text

    Archive for the ‘art’ Category

    shows up.
    How do i remove the text? I’m running the latest version of K2, and the archives is starting to annoy me.

    Thanks again for all your help!

    Glad it worked for you πŸ™‚ It’s one of my favourites as well!

    If I remember correctly, since it’s K2, you might have to edit header.php directly. There will probably be something between
    <title></title>
    that has
    is_category()
    which defines what the title displays if the page that loads is a category.

    You might find the WordPress documentation on Conditional Category Tags rather more useful in terms of customising this tag part further to suit your (Uncle’s) site.

    And finally, if you wanted to change the layout of how the category page is displayed, it’s best to refer to the ‘Category Templates’ documentation link that moshu posted much earlier.

    I believe you are talking about the text that actually comes from a plugin called Breadcrumb Navigation XT. Basically you have to edit that plugin to make that text no longer show, but luckily this is pretty easy.

    Go to your plug in folder and search for the “breadcrumb-navigation-xt” folder. There should only be one file in there named “breadcrumb-navigation-xt.php” This is the file you need to edit. In that file, just search for “archive_category_prefix” and “archive_category_suffix”. Once you find those, you should see the text you are talking about. Feel free to edit those two tags to whatever you like, reupload them to your site and your text should be clean and tidy.

    Thread Starter Erik

    (@axel-hoel)

    Glad it worked for you πŸ™‚ It’s one of my favourites as well!

    If I remember correctly, since it’s K2, you might have to edit header.php directly. There will probably be something between
    <title></title>
    that has
    is_category()
    which defines what the title displays if the page that loads is a category.

    You might find the WordPress documentation on Conditional Category Tags rather more useful in terms of customising this tag part further to suit your (Uncle’s) site.

    And finally, if you wanted to change the layout of how the category page is displayed, it’s best to refer to the ‘Category Templates’ documentation link that moshu posted much earlier.

    It worked! but once again i said something and meant something else….
    I managed to get as static <title> tag, but when i once of the pages thats using the Page Links To plugin, i get all of my content in that category, but just above it, there is a text sayning

    Archive for the ‘video’ Category

    I better give you a link since i can’t explain properly
    LINK

    I belive it has something to do with K2, and i tried to turn the function “archive pages” both on and of, but non of it removed the help

    Thanks for putting up with me!

    @manturafs; I’m sorry but i don’t have the Breadcrumb Navigation XT. plugin installed.

    @alex: I think it might actually be a good idea to retain at least some indication of the original title in the <title> tag?

    To clarify: when navigating to the ‘Art’ category of your site, one might expect to see ‘Frithjof Hoel – Art’ (or something like that) in the title. It certainly helps when a search engine starts to index your site, as otherwise every page title might look the same in the search results, so visitors can’t tell which page is which. – A long-winded explanation, sorry!

    I’d quite forgotten this, but a good resource for most of your questions are probably best answered by those on the K2 Support Forums since K2 is quite ‘advanced’ compared to some standard themes.

    RE: Archive for the ‘art’ Category

    That’s in the archive.php template file of (almost) all the themes… usually there is a long-long list of IF conditionals at the top.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Specific categories on specific pages’ is closed to new replies.