Add custom HTML/JS to each post type via WP admin/page editor

[ad_1]

Hi,

Im working on adding a graph like [this]) on my custom post type.

It requires the graph library and the graph configs via js.

I want the library to load on this post type only and the graph configs on individual posts.

I made it work by adding a custom field for js that is inserted on the footer, but I don’t think it’s the best/secure way of doing so.

I want it to be editable via the admin console like a normal post would be, any ideas/opinions on executing this properly? I’m open to custom codes/plugins.

Any

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer