ThemeShaper Forums » Thematic

[closed]

Add skip-link (to #main not #content) only on front-page of Feature site

(8 posts)
  • Started 4 years ago by rdhenry
  • Latest reply from rdhenry
  • This topic is resolved
  1. rdhenry
    Member

    I used the skip-link (to #content) as a template to write a skip-link (to #main). That works fine; however, I'm having trouble placing it where I want (maybe in #access, thematic_belowheader, or #main or thematic_aboveheader.)

    As you've probably guessed, I'm slowly learning php as I go.

    Thx for any help or ideas.

    Posted 4 years ago #
  2. rdhenry
    Member

    Oh yeah, I only want it to show up on front-page in Thematic Feature Site.

    Posted 4 years ago #
  3. rdhenry
    Member

    Here is the solution I came up with (minus the CSS.) I hope I add this correctly. I'm sure there must be more elegant solutions.

    // Add a skip-link
    function skip_link_main() {
    // Show only on front-page
    // then define the action to take: skip to Thematic #main area instead of Thematic #content area
    if (is_page() && is_front_page()) {?>
    <div class="skip-link-main"><a href="#main" class="button" rel="nofollow" title="<?php _e('Skip navigation to the main', 'thematic'); ?>"><?php _e('Down to "Latest News & Services"', 'thematic'); ?></a></div>
    <?php }
    	//end action:
    	}
    	//now we can add our new action to the appropriate place like so:
    	add_action('thematic_header','skip_link_main',3);
    Posted 4 years ago #
  4. rdhenry
    Member

    BTW here's the link: http://slhenry.com/ to see how it turned out

    Posted 4 years ago #
  5. mpanda
    Member

    Hi Henry,
    I love your latest news crawling banner with pagination.
    Is it a plugin or what else?
    Thank you,

    Mario

    Posted 4 years ago #
  6. rdhenry
    Member

    @mpanda: thx, I used Smooth Slider found at http://www.clickonf5.org/smooth-slider

    If I had more time, I would have followed "Step-by-Step to Create Content Slider" found at http://www.webdesignbooth.com/step-by-step-to-create-content-slider-using-jflow-a-minimalist-jquery-plugin/

    As it is, I had to get the site up-and-running. I will probably come back and create my own slider in the future after the dust settles.

    BTW both solutions allow you to add images to the slider. You can even replace the random feature implementation of Thematic Feature site using Z's contribution found at #post-9214 "Displaying recent posts in the Thematic Featured Site Theme home page." I tried it and it worked for me but ultimately went w/ a different design direction.

    Posted 4 years ago #
  7. mpanda
    Member

    Thank you Henry,

    I'll play around it as I'd need to display a gallery of images.

    Henry, do you know if such plugin will work also for standard pages, I mean not only homepage?

    A little off topic :)...congrats also for the contents of your site as childs need a lot of help and love to pass through the divorce of parents.

    Mario

    Posted 4 years ago #
  8. rdhenry
    Member

    @mpanda: it has a lot of flexibility to create multiple sliders and work on different pages.

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.