ThemeShaper Forums » Thematic

Themeshaper features - how to?

(6 posts)
  • Started 10 years ago by Queequeg
  • Latest reply from Queequeg
  • This topic is not resolved
  1. Queequeg
    Member

    Hi Ian,

    I was wondering about a couple features you have:

    1. How i could add a 'feature' section similar to what you have on the main page of your site? The black/yellow sections?

    2. You appear to have a second menu on the top right corner (service, about etc) - i tried following you secondary menu tutorial, but i messed it up every time. What i had the most trouble with was, how do i place it in that top right section? A widget, or something else perhaps?

    Posted 10 years ago #
  2. For the first part you're going to want to use something similar to the following code:

    <?php
    
    function my_additional_header() {
      ?>
      <div class='new-section'><h1>MY NEW HEADER SECTION</h1></div>
      <?php
    }
    add_action('thematic_belowheader', 'my_additional_header');
    
    ?>

    Note: the first and last lines may not need to be included if you place the code within the PHP tags.

    The best place to insert this code is in your child-themes functions.php, if you are using a child theme. Otherwise the functions.php of Thematic.

    You should give it a better name than my_additional_header and you should replace the whole line that include MY NEW HEADER SECTION with the actual code you want to use. You could skim through Ian's page source to see what he does (I'd use Firebug in the Firefox Browser). I kept it simple in this example so it's easy to change.

    For the menu, you're going to want to create a similar setup, but make a change to the add_action line by changing thematic_belowheader to thematic_header. This will insert the code within the header div, instead of after it.

    I'd say it's best to work in small steps. See if you can get my code to work, then expand it to the final product. The code above doesn't account for the style. Your going to want to add some CSS to get it to align right and be something other than plain text.

    Let's see where this gets you and work from there.

    Posted 10 years ago #
  3. Queequeg
    Member

    Thank you so much! This is great stuff. Works perfectly.

    I managed to get both that second menu area and the 'feature' section working, and even included a small widget area in the header that appears under the menu, and it's all working together smoothly. Now, i just need to try out some CSS styles on it!

    Do you have any rec's for some sites that list CSS properties and/or show examples?

    Thanks again, couldn't have done this without you.

    Posted 10 years ago #
  4. The best resource for web development is W3Schools, for CSS in particular: http://www.w3schools.com/css/

    Posted 10 years ago #
  5. Queequeg
    Member

    thanks! that's a great site!

    Posted 10 years ago #
  6. Queequeg
    Member

    How would i go about having the additional header section appear only on the main page? Is that possible?

    Posted 9 years ago #

RSS feed for this topic

Reply

You must log in to post.