The Customizr theme displays by default your post titles as links pointing to the single post.
Here’s a simple way (using some javascript) to remove those links if you ever need to.
Paste the following code in your functions.php :
add_action('wp_head' , 'remove_post_list_title_links'); function remove_post_list_title_links() { ?> <script id="remove-links-in-title" type="text/javascript"> jQuery(document).ready(function($) { $('.entry-title').each(function() { var $title_link = $('a[rel="bookmark"]' , $(this)), $title_text = $title_link.text(); $title_link.remove(); $(this).prepend($title_text); }); }); </script> <?php }
More about customizing the Customizr theme here.
More about using jQuery in WordPress.
9 thoughts on “Removing the title links in post lists”
Hello,
Can I tweak this code to remove the links I have on the dates below a post in the metas? Please help. Check out news and interviews at syndicatedpulse.com. How do I add a Read More link in the meta if that is possible?
Thanks,
Vidya
First off, you are a complete genius! THANK YOU! I am learning and growing in this strange developer world that is complete foreign to me. I am trying to remove the URL link that is shown under every post of mine under the twitter social link on the main page. Is this possible? Also I have been having difficulty with my thumbnail photos and slider photos being able to resize and frame them to fit how I would like in the viewing.
Hi Breanne, thanks for your nice comment.
If you are new to the theme and WordPress, I would recommend to read the documentation and the related links about how to customize the theme.
I hope this will help you 🙂
What if I wanted to restrict this to one Post Category instead of removing from all Posts?
Hi, you could restrict the impacted selectors to a specific category by using the category class included in the body tag by WordPress :
Hi Rick, a quick and dirty approach would be to use
Hope this helps!
I just delete the page title ,, but even the menu is also deleted
why?where is wrong ?
Hi Tony, would you mind posting the issue (including your custom code) in a new thread in the support forum ?
Cheers
How do I remove the page title from a page but not the menu ?