Skip to content

This script removes widows from post titles in wordpress

License

Notifications You must be signed in to change notification settings

jeffhow/widowfix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

widowfix

This script removes widows from post titles in wordpress

How does it work?

This javascript file retrieves every post title by the class '.entry-title' and if the title is longer than three words, replaces the final space with a non-breaking space ( ).

How to use is?

  1. Use the class '.entry-title' in your HTML.
  2. Add this script to the footer of your document
<script src="widowfix.js"></script>
 or add to your theme setup function
wp_enqueue_script( 'widowfix', get_template_directory_uri() . '/js/widowfix.js', array(), '0.0.1', true );

About

This script removes widows from post titles in wordpress

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published