0

This seems like it should be super-easy to resolve, but it has me stumped.

All the links on my page added via get_header() and get_footer() work just fine. The links added via single-class.php and archive-class.php don't work.

Looking at the source code in Google Chrome, the links appear to be perfectly formed, but when I click on them nothing happens. Here are two examples:

<a class="btn btn-default" href="http://markrummel.com/dev/enzas/classes/culinary-nunnsense-sunday-brunch/" alt="Culinary Nunnsense Sunday Brunch">Class Details</a>

<a href="https://www.facebook.com/EnzasItalian" target="_blank">Enjoy More Photos on Our Facebook Page</a>

The first one the href attribute is populated via get_permalink(). The second is hard-coded exactly as it appears above.

The class custom post type is added via a plugin I created. The single-class and archive-class are added via a custom theme I created.

Here are the two live pages:

archive-class.php --> http://markrummel.com/dev/enzas/classes/

single-class.php --> http://markrummel.com/dev/enzas/classes/culinary-nunnsense-sunday-brunch/

There are links a part of the body of other pages added via template-[template-name] that work just fine. It seems like it is only the main content area of the pages associated with the class custom post type that have broken links.

Any help figuring out what is going on would be most appreciated!

Thanks!

1 Answer 1

1

This is a javascript issue in your theme. You're blocking clicks on elements with the classname .class which contains those links in the file express/includes/scripts/scripts.js:

$('.class').click(function(e) {
    e.preventDefault();
});
1
  • Thank you so much! I combed through scripts.js, but didn't find this. Actually, that was just a dummy function to copy and paste for other click functions. It just so happens that when I added a custom post type class, it added the class class to the main entry. Thanks again! Commented Jan 21, 2015 at 4:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.