In the last week or so two pretty minor, yet important, changes have happened here.
– Changed the layout of the tabbed section on the front page
– Added a third level of dept to the main nav bar
[Read Full Story]
On the main page, with the tabbed section, I did not like how the “Read more” type of link was working. It was ugly and inconsistent.
One day I started playing with it. Basically it all stemmed with “how” the data was pulled. With WordPress, there are normally two fundamental ways you can:
With the base theme from Revolution2, there is a third built into it of the_content_limit, though I do not fully understand it or can find good info.
With the_content – it just pulls the post in, and stops if you have added a “more” tag manually.
With the_expert – this pulls the first 55 words, unless you have manually added a specific expert when you make the post.
My issue was I wanted the link in the same location (or basically the same location) no matter what tab you looked at.
This took a few steps:
1. switch from the_content (or the_content_limit) to the_expert – this means that it will either end with a […] after 55 words, or you can choose what you want it to say.
2. add some code to enter the [Read Full Story] linked properly
3. edit the CSS
One issue we found was that in changing stuff from all relative to absolute (part of the CSS change), the site navagation was showing up behind the tabbed area — so, if you hovered over topics the stuff would be behind. Well, a friend John Brooks who is a CSS Pro better then any other I know helped me lean about z-index.
In the end, the tabbed section works properly.
3 Level Nav – now going deeper
As things evolve here, the other needed to work out was that the site nave was originally only looking at a depth of 2, and really needed to be 3. There are two issues that needed to be fixed:
1. the code that creates the nav – was set to depth = 2, just switched to 3 (easy)
2. the CSS was designed for 2 and not 3.
What did I do? I went to a theme that AllThingsOnDemand has access to, Revolution Album in this case, and found one that was designed for a depth of 3. Took the code, copied it over and edited it to look properly.