problem with anchors in custom wordpress theme

Hi
I’ve created a theme for wordpress www.litl.michalweb.pl. On the left side I have a sidebar with permalinks anchors. Each link has a form:

http://litl.michalweb.pl/upcoming2/#seven

and then in one of the posts I created an anchor like this

Read More
<a  id="seven">Event 7</a>

Im also using jscrollpane plugin and it looks like it doesn’t work as it should.
Here is how I’m using it:
calling jquery:

<?php wp_enqueue_script( 'jquery' ); ?>

and placing the script:

$j(function()
{
        $j('.scroll-pane').jScrollPane(
        {
            hijackInternalLinks: true
        }
    );
 });

I don’t know if it is important but here is the .htaccess file

 # BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L] 
</IfModule>

# END WordPress

The weird thing is that my anchors works if I just place the code in the sidebar by:

<a href="http://litl.michalweb.pl/upcoming/#seven">All events7</a>

but it doesnt work if Im trying to use wordpress links.
Here is most of my sidebar.php:

<div id="primary" class="widget-area" role="complementary"><ul class="xoxo">
<?php if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
    <?php wp_list_bookmarks( 'show_description=1&limit=4&between=<br />'); ?>

<?php endif; // end primary widget area ?>
        </ul><br><br><br>
<a href="http://litl.michalweb.pl/upcoming/#seven">All events7</a>
<a href="http://litl.michalweb.pl/upcoming/#three">All events3</a>

</div><!-- #primary .widget-area --> 

I think that the problem is caused by the fact that I’ve created this template from scratch using some online tutorials and probably there is one small bit that Im missing either in header.php, index.php or somewhere else. Unfortunately I cant make it work and jScrollPane doesn’t behave like it should.
I hope someone could point me to a solution to my problem.
Thanks
Michal

Related posts

Leave a Reply

1 comment

  1. What does the resultant HTML of your wp_list_bookmarks function look like? Also, does it work if you use a name attribute in addition to id (not valid HTML5, I know), OR use a heading / span element for the anchor?