• I would like to create a category which list all the posts within it but I don’t want the name of the category to appear on the nav bar at the top of the page.

    If anyone knows how to do this, please help me.
    I would greatly appreciate it.

    Many thanks

Viewing 12 replies - 1 through 12 (of 12 total)
  • I would like to create a category which list all the posts within it but I don’t want the name of the category to appear on the nav bar at the top of the page

    Create a category called “All Posts”, then make all your categories (at least what are now your ‘top-level’ categories) have “All Posts” as the parent category.

    Then assuming that the “All Posts” category is category id 6, use something like this to view your list of categories with the “All Posts” category:

    <?php wp_list_categories('child_of=6&show_count=1&title_li=<h2>Categories</h2>'); ?>

    Thread Starter ian-ratledge

    (@ian-ratledge)

    Will this enable me to keep the 5 categories I have on my nav bar there but keep the other category somewhere else?

    Go on my site, https://www.crystalgamer.com. You will see 5 categories in the nav bar and I want to create another category called “Previews” but not have it on the nav bar.

    Should I follow the instructions in the previous post or is there something else I need to do?

    wouldn’t it be just easier to exclude the Previews category ?
    Let’s assume the category id is 6

    <?php
    wp_list_categories('exclude=6&title_li='); ?>

    The question is, do you want to exclude it ONLY from the menu, or also from the rss, search, single posts etc..

    I want to create another category called “Previews” but not have it on the nav bar

    If your theme is using the template tag, wp_list_categories(), might need need to use the exclude argument for that Previews category.

    Previously you said “I would like to create a category which list all the posts ” so not where that fits into your equation…

    Thread Starter ian-ratledge

    (@ian-ratledge)

    Thank you very much. You wouldn’t believe how much that has helped me.

    I have 1 other question.

    How can I rearrange the categories into any order I want rather than them being alphabetical?

    Once again,
    Many thanks

    look at the link that MichaelH gave you..
    if you missed it, it’s HERE

    or you can also use PLUGINS like THIS one, or THIS one, if you do not like to touch the code..

    Thread Starter ian-ratledge

    (@ian-ratledge)

    There is 1 more thing which I need urgent help with.

    On my site https://www.crystalgamer.com, I would like to make some headings that are spread all around the home page. I am trying to achieve something similar to that on https://www.paragamer.com.

    If you look on https://www.paragamer.com, you will see that there are are lots of headings like:

    “Editor’s Picks”
    “Reviews”
    “Previews”
    “Interviews”
    “Editorials”

    There is also a “latest news” heading on the sidebar.

    I would like to achieve something like this on my site and get rid of the “Headline” and “Browse Categories” headings.

    I know very little about coding and I would greatly appreciate it if someone could tell me exactly what code to put in and edit and in which php file.

    Please Help

    Greatest thanks

    That site looks to be using a variation of this theme:
    https://michaelhutagalung.com/2008/05/arthemia-magazine-blog-wordpress-theme-released/

    So you might take a look at that for possibilities.

    Thread Starter ian-ratledge

    (@ian-ratledge)

    I had a look but I am still not sure exactly what codes I need to put where.

    I know next to nothing about html and I was wondering if anyone can tell me the exact code I need to put the headings (editorials, reviews etc) spread around the home page like it is done on https://www.paragamer.com

    Below is a copy of my index.php file. Perhaps you can show me using this what to do?

    I very greatly appreciate any help.
    Greatest thanks.

    [moderated code at https://wordpress.pastebin.ca/1363725 ]

    As an example there three lines of code assume specific categories and or names to be used in the display of various sections:

    <?php query_posts("showposts=1&category_name=Headline"); ?>
    
    <?php query_posts("showposts=4&category_name=Featured"); $i = 1; ?>
    
    <?php $display_categories = array(5,6,7,8,11); $i = 1;
    
    query_posts("cat=-27,-28&paged=$page&posts_per_page=5"); ?>
    Thread Starter ian-ratledge

    (@ian-ratledge)

    How can I use this code to move headings anywhere on the page?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Secret Categories’ is closed to new replies.