Jump to content


Photo
- - - - -

Add category with different modifications that other categories

category css exclude secodary navigation page

  • Please log in to reply
9 replies to this topic

#1 strapanese

strapanese

    Newbie

  • Members
  • 9 posts
  • Framework Version:2.4.4
  • Country: Country Flag

Posted 27 August 2013 - 01:53 PM

Goal: I would like to add a category for “Press Releases” so my press releases can be posts, rather than linked Google Docs.

 

Problems:

 

I would like my post date to show in the Press Releases category, but not my service area categories.

Service area category ->

Please Login or Register to see this Hidden Content

I know this will require modification of the already-modified CSS…I just don’t know how to adapt the CSS to exclude one category.

 

I would like my Press Release category to have a secondary navigation just like the other pages in my Newsroom. Is this possible?

Current Press Releases page with secondary nav ->

Please Login or Register to see this Hidden Content

 

Please advise. Will email moderator if necessary.



#2 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 27 August 2013 - 04:57 PM

I would imagine the best way to make press releases is to create a custom post type and customize the layout of posts to include typical information for press releases.  This plugin may help you, though I haven't tested it.  It would assist in creating and displaying custom fields for that taxonomy (category).

Please Login or Register to see this Hidden Content



#3 strapanese

strapanese

    Newbie

  • Members
  • 9 posts
  • Framework Version:2.4.4
  • Country: Country Flag

Posted 27 August 2013 - 09:26 PM

Okay, thank you. I will look into that. What about the secondary navigation?



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 12988 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 28 August 2013 - 10:25 AM

You can just add the Simple Nav section to your Press Release page and select your menu.



#5 strapanese

strapanese

    Newbie

  • Members
  • 9 posts
  • Framework Version:2.4.4
  • Country: Country Flag

Posted 28 August 2013 - 03:03 PM

Press Releases will be a category, not a page. Am I able to add a Simple Nav section to only one category and not all of them? How do I do that?



#6 James B

James B

    Advocate

  • Moderators
  • 4979 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 29 August 2013 - 05:25 PM

Hi there, applying to the category template will apply to all category pages. You could use css to hide/display depending on the category page.

 

For example, after placing into the layout on the category page, set simple nav not to display sitewide. Then using css, set it to display on one particular page you want, something like the below

 

#simple_navluxwi0 {display:none;}

 

then

.category-my-new-category #simple_navluxwi0 {display:block;}



#7 strapanese

strapanese

    Newbie

  • Members
  • 9 posts
  • Framework Version:2.4.4
  • Country: Country Flag

Posted 29 August 2013 - 09:02 PM

What you said makes sense. Thank you. I know what I need to do, just not HOW to do it. Can you help with the CSS?
 
I added the simple nav and the banners sections to the Category template. I then placed a variation of your code into my site but I did it wrong...
 
#simple_navluxwi0 {display:none;}
.category-press-releases #simple_navluxwi0 {display:block;}
 
As you can see, I replaced .category-my-new-category with .category-pressreleases and it did not work (pressreleases is the slug so I assumed...) and then I tried .category-press-releases with no avail.
 
  1. What do I need to put in the CSS so that the "simple nav" and "banners" sections are visible in the Press Releases category and hidden in the others?
  2. What do I need to put in the CSS so that the "content box" section is shown in all categories EXCEPT the Press Releases category?
 
Press Releases Category (accessible through direct link):

Please Login or Register to see this Hidden Content

Outpatient Services Category (accessible on live site):

Please Login or Register to see this Hidden Content



#8 strapanese

strapanese

    Newbie

  • Members
  • 9 posts
  • Framework Version:2.4.4
  • Country: Country Flag

Posted 09 September 2013 - 12:30 PM

  1. What do I need to put in the CSS so that the "simple nav" and "banners" sections are visible in the Press Releases category and hidden in the others?
  2. What do I need to put in the CSS so that the "content box" section is shown in all categories EXCEPT the Press Releases category?


#9 Danny

Danny

    Is Awesome!

  • Moderators
  • 12988 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 09 September 2013 - 01:51 PM

@

Please Login or Register to see this Hidden Content



At this moment in time, you will need to use CSS to achieve this as far as I know. However, there is a issue on our issue tracker that will make this easier when it has been fixed. This means that you will be able to (if implemented) to have different category templates.



#10 strapanese

strapanese

    Newbie

  • Members
  • 9 posts
  • Framework Version:2.4.4
  • Country: Country Flag

Posted 09 September 2013 - 04:42 PM

Okay, in the mean time, is there someone who can help me figure out how to structure and code my CSS to achieve my desired results?

  1. What do I need to put in the CSS so that the "simple nav" and "banners" sections are visible in the Press Releases category and hidden in the others?
  2. What do I need to put in the CSS so that the "content box" section is shown in all categories EXCEPT the Press Releases category?






Also tagged with one or more of these keywords: category, css, exclude, secodary navigation, page