ThemeShaper Forums » Acamas

[closed]

Navigation - Adding Items

(10 posts)
  • Started 14 years ago by benjaminjtaylor
  • Latest reply from rymarchant

Tags:

  1. Excuse the nOOb question.

    I'd like to add a number of navigation items:

    >> Nav Item 1. Links to Home
    >> Nav Items 2-3. Links to specific categories

    What's the easiest way to customize the navigation? I can't figure out where the correct header.php file is located, OR is that even the file I should be editing?

    I have three folders under /public_html/wp-content/themes

    1) /public_html/wp-content/themes/thematic
    SUB- /public_html/wp-content/themes/thematic/thematic-sample-child-theme
    2) /public_html/wp-content/themes/acamas-variant
    3) /public_html/wp-content/themes/acamas

    As a possible solution can I use Wordpress Navigation List Plugin NAVT?

    If there is already an answer in the forum please let me know.

    Thanks,

    Posted 14 years ago #
  2. Hi Ben,

    let's start with the "Home" link .. add the following code to the functions.php:

    function childtheme_menu_args($args) {
        $args = array(
            'show_home' => 'Home',
            'sort_column' => 'menu_order',
            'menu_class' => 'menu',
            'echo' => true
        );
    	return $args;
    }
    add_filter('wp_page_menu_args','childtheme_menu_args');

    .. and now the category links:

    - install Page Links To

    - get the category IDs (Dashboard/Posts/Categories .. hover over the category names .. the status line in your browser should show the link ending with cat_ID=xx)

    - copy the category.php to category-xx (xx is the category ID)

    - create a page with the category name .. at the end you have the "Page links to" box .. enter the url to your category like http://www.yourdomain.com/category/yourcategory/

    That's it.

    Cheers,

    Chris

    Posted 14 years ago #
  3. I'll try this on the Acamas theme today, thanks for the reply and assistance Chris! Very much appreciated.

    thx
    BT

    Posted 14 years ago #
  4. wpnoob
    Member

    Hi Chris.

    Long time lurker, first time poster. Could you explain why this steps:

    - get the category IDs (Dashboard/Posts/Categories .. hover over the category names .. the status line in your browser should show the link ending with cat_ID=xx)

    - copy the category.php to category-xx (xx is the category ID)

    Couldn't we just use page links to directly and just skip over these two steps? I'm only asking because I'm looking to customize my nav menu too but I didn't understand this step. Thanks!

    Posted 13 years ago #
  5. madfatter
    Member

    Hi,

    I'm attempting to create some pages that list specific categories much like the original poster was attempting to do. Before searching the forum I actually did what wpnoob suggested and linked the News page to mysite/category/news using Page Links To - which does the job but the title is listed as "Category Archives: News" -- I need it to be "News".

    I didn't understand what was meant by "- copy the category.php to category-xx (xx is the category ID)" Does it mean copy it in the same folder and rename it? Would this step help me in anyway? Or is there a simple way to remove "Category Archives:" from the title?

    Thanks for any advice.

    Posted 12 years ago #
  6. Here is a way to remove those words from the title. Add this code to your child theme's functions.php

    -Gene

    Posted 12 years ago #
  7. madfatter
    Member

    Hi Gene,

    It looks like the code didn't get posted.

    Thanks,

    Trevor

    Posted 12 years ago #
  8. that's odd

    function childtheme_category_page_title($content) {
    	global $post;
    
    	if (is_category()) {
    		$content = '<h1 class="page-title">';
    		$content .= ' <span>';
    		$content .= single_cat_title('', FALSE);
    		$content .= '</span></h1>' . "\n";
    		$content .= '<div class="archive-meta">';
    		if ( !(''== category_description()) ) : $content .= apply_filters('archive_meta', category_description()); endif;
    		$content .= '</div>';
    	}
    	return $content;
    }
    add_filter('thematic_page_title', 'childtheme_category_page_title');
    Posted 12 years ago #
  9. madfatter
    Member

    That did it! Thank you very much!

    Posted 12 years ago #
  10. rymarchant
    Member

    Hey there,
    Just wondering how I'd expand that bit of code to remove the "Category Archives:" from the title of the page...

    Thanks!

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.