Horje
Add custom javascript, IE specific javascript and even iOS specific javascript, to any page or post on your WordPress website.

Noted That:

  • To install correctly this javascript-per-page.zip.
  • Fisrt Download the javascript-per-page.zip to your computer
  • Extract/Open javascript-per-page.zip to Your Computer.
  • Then, Find readme.txt file inside javascript-per-page.zip and Open readme.txt.
  • Now, Read the Requirements of this plugin. Which Wordpress Version and PHP Version are required to run this Plugin in Your Wordpress Site.
  • Then, Follow the the Tips Below.

Start the Tips:

1. First Download "javascript-per-page.zip" Plugin to your Local Computer. (Click Download)

2. Then, Login to your "yourdomain.com/wp-admin" Dashboard.

/stack/wp/e1593231376d7d849d2-4597-4fa3-a6ff-1eca18f72aab.png

3. Then, Click on "Plugins" + "Add New" from left sidemenu of Dashboard.

/stack/wp/e1593231378Screenshot20.png

4. Now, Click on "Upload Plugin" button.

/stack/wp/e1593231380Screenshot-2019-4-2AddPluginsHorjeWordPress.png

 

5. Now, Browse "javascript-per-page.zip" Downloaded plugin from your computer, Where you downloaded javascript-per-page.zip According to Step – 1 Above then, click on "Install Now"

/stack/wp/e15931461531577025694plugin.png

6. Now, Click on "Active Plugin"

/stack/wp/e15932313830ca45529-bf73-4101-8178-53ae60ce549f.png

7. Then, See left sidemenu. "Javascript Per Page" folder is added on left sidemenu. Now, Click on "Javascript Per Page" folder.

   Noted that: If you do not see "Javascript Per Page" folder on left sidemenu then, see at left sidemenu "Settings" or "Tools".

8. Now you configure yourself oR Watch video tutorial below about Javascript Per Page Configurtions and Settings or How to work "Javascript Per Page" in your WordPress site.

 

oR

After Activated Plugin According to Step-6 then,

  1. Go to "Plugins" + "Installed Plugin" from Wordpress Admin Panel Leftside Menu.
  2. or Direct go to: https://yourdomain/wp-admin/plugins.php
  3. Then, Find "Javascript Per Page" Activated Plugin from Plugin List.
  4. Then, Click on "Settings" from Plugin that is Javascript Per Page
  5. Now, Edit/Add/Config the setting and Click on "Save Changes" button,
WP Plugin Setting



Guide
  1. Upload the plugin to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

To use this plugin, just add javascript files in the following formats to your theme’s base directory or a “js” subdirectory inside your theme’s base directory:

  • For pages create a file called page-[page_name].js where “[page_name]” is replaced with the slug of the page. Eg: page-about.js.

  • For author pages create a file called user.js and for individual user pages user-[username].js where “[username]” is replaced with the user’s login name.

  • For different post types user [post_type].js where “[post_type]” is replaced with the name of the custom post type. You can also use just ‘post’ for regular posts. Eg. post.js.

  • For individual posts use [post_type]-[post_name].js where “[post_type]” is replaced with the name of the custom post type or just ‘post’ for regular posts, and “[post_name]” is the slug of the post. Eg. post-10-tips-for-baking-pies.js, or, say if you had a “recipes” post type use something like recipes-classic-french-cheesecake.js.

  • For tag pages use tag.js or tag-[tag_name].js where “[tag_name]” is replaced with the slug of the tag

  • For category pages use category.js or category-[category_name].js where “[category_name]” is replaced with the slug of the category

  • For archive pages use archive.js

  • For home and front pages use home.js and front-page.js respectively

  • To activate IE specific javascript files just create js files with the following naming: ie.js (covers all IE versions), ie8.js (covers IE 8 and below), ie7.js (covers IE 7 and below), ie6.js (covers IE 6 and below).

  • To activate a iOS specific javascript create ios.js and enable in the plugin options.

NOTE: You can place your custom JS files in either the base directory of your theme, or in a “js” subdirectory inside your theme, but try to be consistent with where you place them.


javascript, specific, wordpress, website, your, page, even, custom, post,

Name

Reffered: https://wordpress.org/

Share on: