While inserting js directly in header.php
can work it’s not recommanded to do that. You’d better add your scripts to the WordPress queue:
function wpse_109879_insert_hyphenator() {
wp_register_script('hyphenator', 'https://raw.github.com/bramstein/hypher/master/dist/jquery.hypher.js', array('jquery'), null , false);
wp_enqueue_script('hyphenator');
}
add_action('wp_enqueue_scripts','wpse_109879_insert_hyphenator');
Regarding CSS you probably use the wrong class, you can try .single-post
or .single
EDIT: I see you use raw script. Maybe you’d better copy paste code from github into another js file you can call directly from your theme. This would allow to insert code you use to initialize hyphenator so you have only one file to manage hyphenator.
Related Posts:
- Print Current Post Index number within Loop
- Front-End Post Submission
- How To Disable (or Remove) “All Posts, Published, and Trash” in Dashboard Posts
- how to get a different html for odd/even posts?
- How to manually link posts to each other in WordPress
- Post/Page Publish/Update button not clickable once I make an edit
- How do I create a link that will always show the latest post?
- How to display posts by current user/author in a custom page template?
- Display all search results
- $post->ID not working
- featuring old articles without messing up with the archive
- Add default content to post (for specific category)
- Setting pagination for images attached to a post
- Is there a plugin that creates a WP post based on a Twitter account’s hashtag?
- blog page showing only first post
- Is it possible to show a different WP menu when using password protected pages?
- Human Time Diff, change mins to minutes
- POST from jQuery to PHP
- get_post_custom stripping styling issue
- Including text at the end of every post
- same template for multiple custom post type single
- Redirect before post page
- Fetch posts from current week (Sunday to Saturday)
- Using radio button meta data from a custom meta box
- Display the Content of a Post with qTip2
- Scheduled posting not working
- Converting multiple loops into one single loop with pagination
- How to set post expiration date and time and move the page to archive after expiration [closed]
- .current-menu-item class on custom post type children pages – again?
- Run a function when post is deleted?
- Get posts by multiple ID’s (query)
- Exclude posts w/ specific post_meta on Rest API endpoint
- Should $found_posts be returned as string in ‘found_posts’ filter hook?
- Add a class to post title if a link ends with a certain extension
- Admin Notices don’t display on the admin screen for certain post
- Theme removed “Edit Post” link on the front end. I wish it back
- Custom WP_Query with complex ‘post_status’ argument
- Saving category to a post, before publishing the post
- is there a way to show the the post title after the image?
- Add the description field on the attached media
- Is there a way to notify specific users when new posts are published to specific pages?
- get_adjacent_post by language
- Force authors to Preview a post before publishing
- Bulk delete WordPress posts with phpMyAdmin
- While loop articles – if statement order
- Count number of posts of current month
- How to create a sub post?
- How to get post body look same as my visual editor?
- Check if a custom post type has already been created
- Uploading images in custom post form
- Isn’t the way posts are displayed very unefficient?
- Post Filtering by GET URL parameters
- showing posts of an specific category in admin custom menu with style of admin posts section
- Related Posts function not working
- Unabled to Change Permalinks – Even Using the “Edit” (Resets to Original Permalink on “Update”)
- Get post related to particular meta box? [closed]
- Exclude a category of posts in author template
- post type slug vs page slug
- Open post within Foundation 3 Reveal
- marking a post that was sticky on category template
- Extract the last published post
- Deleting post tags removes categories
- Format array of objects to json for wp-json
- Add checkbox in admin post list – show checked post in widget
- How show custom message after post pulished or update
- How to remove the icons corresponding to “by” (author) and “date” from posts?
- how to filter posts by category without page load (ajax) in wordpress?
- Display specific posts based on an ID of another post
- How do I scope out why I have two “posts” menus in an admin?
- long-title posts do not want published
- Create posts by any logged in users
- insert post fails after multiple postings
- why my post not redirecting to custom created single-show.php file?
- how to fetch posts from Api in chunks or parts?
- if CPT content is empty then
- How to add multiple(but specific) posts to different areas in one page?
- Don`t show short description on a single page
- How to get all posts in gallery post format template
- Append a random string to a post permalink
- Posts in Page – How to customize the URL?
- Next/Prev category post in same button
- WordPress – Update all existing posts at once
- Can I save part of the post in an external file and join it on the fly to avoid redundancy in the wp_posts table?
- Show category post with excerpt text
- Moving Posts to a new site and maintaining URLs
- Display Post by menu order
- Create a Page Template Which Displays All Posts by Current User
- Special Query: Title, Terms, Content – %LIKE%
- Authors can edit all posts, except when an owner is specified?
- Formatting error while publishing theblog from Microsoft Word
- Create post from form with image
- WordPress Custom Theme: My site shows the same posts on Page 1 and Page 2 and so on [duplicate]
- Add News Feed to bespoke website, only to one page on whole site
- How to display my categories in a list (to a post, not the sidebar)?
- WordPress post enumeration
- Imported Posts missing summary text on staging site
- Read more opens attachment
- How to show video from post on the all posts page?
- Show a page counter for pagination
- WP_Query post_tilte search in posts table