[Resolved] Adding Categories to Main Nav – Custom Community
Thanks in advance for your time and knowledge 🙂
I am (very happily) using the Custom Community theme at http://www.similaustudios.com.
My Ultimate Goals:
1. To have one, main navigation menu which lists “home,” “projects,” “media,” “blog,” “info,” and “shop.”
2. Be able to choose where a post appears (post a work-in-progress on the “projects” page, post a finished movie, song, etc… on the “media” page, post news and updates and various other information on the “blog” page).
It seems that I need to categories instead of pages for posting unique content in several different places and then add the categories to the main navigation bar but there’s no semi-obvious way to do this. I currently have “HOME,” “INFO,” and “SHOP” which are and will be static pages. I need to add “PROJECTS,” “MEDIA,” and “BLOG” as categories since I will be adding unique content to them regularly and respectively which, as I understand, is impossible to do with Pages – as wordpress defines them. If I am wrong about this and there’s an easier/better way to achieve what I’m attempting, I’d love to hear it!
I would just create a custom menu but there is no way within this theme to set it as the default and I have no idea where in the code I can remedy this.
Thanks again for your help, it’s massively appreciated!
Have you looked at this:
This might also be helpful for theme-specific help:
I have seen both of these resources (I know how to use google lol) and I have already searched the forums but nothing seems to address my specific problem with a solution.
This is the most relevant information I can find and, as another within that thread has pointed out, it is incomplete information and does not tell you how to REPLACE the default navigation with a custom one, only how to CREATE a custom menu.
I can create a custom menu but there is no way to impliment it within the Custom Community Theme. Custom Community apparently creates its own default navigation menu and I can’t change that to load a custom menu. Others who have asked this question seem to have gone unanswered, I was just hoping I might get lucky :-p
Thanks again and I hope I have made my problem more clear.
“You can also add custom links in your wp menu.” -http://support.themekraft.com/entries/21621451-custom-menu
But there are no instructions or information on how to accomplish this. Does anyone know? I would be more than happy to back-track and answer others’ unanswered questions regarding this if someone here could help. It seems to be a common question which has yet to be answered.
Provided by “mores“
“Something I created for a client was a template that lists posts from a category that has the same name as the page.
So, create a Page called “funnies” if you want to list all posts in the “funnies” category.
Oh, and the original content of the Page is displayed too, if you need an introductory text.”
<?php /* Template Name: ListPostsInCategoryThatHasSameNameAsPage */ ?> <?php get_header(); ?> <div id="content"> <div id="main"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h1><?php the_title(); ?></h1> <?php the_content(); ?> <?php endwhile; else: endif; ?> <?php query_posts('category_name='.get_the_title().'&post_status=publish,future');?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> <p><?php the_content(); ?> <?php endwhile; else: endif; ?> </div> </div> <?php get_footer(); ?>
“The template can be named anything you want – call it “pagecat.php” or something.
Then upload to your theme’s directory.
THEN, write a Page – and in the options under the editor, you’ll find a “template” dropdown. Select “ListPostsInCategoryThatHasSameNameAsPage” 😉
Then give the Page a title, for example, “tree”.
The Page will then show up in the navigation, and when you click on it, it will display all posts of the “tree” category under the actual Page content.
The only thing I think you got wrong was the “tree.php”, since the template file “pagecat.php” can be used over and over again, that’s the beauty of it.
Other than that, your analysis was correct.”
Hi there, Im trying to add this code to my website because i am having the same issue. I dont know how to upload the code to the theme’s directory. Where do i go for that?
thank you for your help
I haven’t tried this, but once you’ve opened your theme folder (public_html/wp-content/themes/custom-community) click on the New File icon. This is where you name it anythingyouwant.php or pagecat.php and save. Highlight the new file and click the Edit icon. It should come up blank. Just copy & paste Morse’s code into it. Change the Template Name in the code and save.
Hi, im still not understanding. Where is the theme folder? I downloaded the theme directly online from my host website so nothing is saved to my computer. Where do i add a new file and copy and paste the content?
Sorry for the wait. Which host are you using? Hostgator, GoDaddy, etc.?
With either one, you’ll have to log in to their Control Panel (a link to this should have been e-mailed when you sign up). After that, click the File Manager icon to access your public_html.
You can call your host/submit a ticket and they will walk you through it if you can’t find the Control Panel/File Manager.
- The topic ‘[Resolved] Adding Categories to Main Nav – Custom Community’ is closed to new replies.