Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter cgrandfield

    (@cgrandfield)

    Edit, actually the link I provided works. The script is there when you go to the post specific page.

    The scripts are not there when you load the toplevel page however.

    https://www.criticalclarity.com/

    Interesting.

    Plugin Author WraithKenny

    (@wraithkenny)

    Yes, it’s a limitation of the plugin. To add code to the page with the list of posts, you should use the “global” section of the plugin, and check for WordPress’s body class markers, like body.blog or a class or id of the particular post if ( $('#post-23').length ) { runAwesomeCode(); } or somesuch.

    Thread Starter cgrandfield

    (@cgrandfield)

    Does that make sense as the default behaviour for the plugin and would you be amenable to a pull request to change it?

    I would think that you would want the plugin to provide the same code in a front page that included that post as a sub-post.

    If so, let me know if you have any pointers for which files I should look to make this change.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Scripts working on post preview – do not work once post published.’ is closed to new replies.