The best way would be to create a custom plugin for your site. Take a look at the plugin handbook to get started
https://developer.wordpress.org/plugins/
In the plugin, you can just put the libraries in a folder, and include them in your main plugin code. Your plugin can then do one of these
- Register a shortcode
- Create a custom template tag, which would be just a function that outputs your content, and can be used in any other php file in your site.
- Create a block for the new block editor
Technically it’s possible to just put this in your theme, but it’s advised to put any custom code like this in a plugin for better maintenance, and ease of changing themes in the future.
Related Posts:
- How do I change/modify the_post_thumbnail(); html output?
- How do I make an HTML table from a database table?
- How to get the custom header image’s alt text?
- Modify previous and next text from pagination links
- WordPress custom taxonomy description for each post?
- Calling a method from functions.php on a click of a button
- Conditional statement for parent, child and grandchild pages
- Two posts in same div – WP loop
- How to add a post or page tag to the list of classes appearing in the body tag’s class attribute?
- HTML table from shortcode with multiple parameters
- To echo or not to echo?
- Correct syntax to html php conversion
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- How Display Posts on category
- ACF page while loop breaks footer while loop
- Getting a specific post values to another div or modal
- search and replace preword from author
- Embed html in php code
- WP grandchild categories in nested ul li
- Customize position of social icons in upme plugin [closed]
- Settings API callback function inserts html quotes from nowhere
- How create a Shortcode with hover and complex options
- WordPress Multiple Navigation bars
- Position banner to right of logo in header – messed up my header file
- How to separate HTML and WordPress files
- Login to wordpress by clicking a link and specifying usernaname and password in url
- Make PHP work with HTML tags
- Is this spyware on my site or a real Java update?
- Syntax error when I try to insert my loop into an unordered list? [closed]
- Search WordPress using static html page
- Function returns text instead of html [closed]
- Printing HTML codes
- How i can get post data from database when i am getting post id from url in wordpress
- WordPress plug-in for dynamic download link?
- How to remove the h6 tag for the entry-category Class
- Override user-edit.php to design own profile page
- Where can I find the inline-css of my theme header?
- Make textarea required. Help [closed]
- Menu Custom Data Attributes
- Highlight the links without using dropdown
- How to turn each phone number within the $content to a telephone link?
- Creating custom page template from existing PHP site
- wordpress site – using custom database and PHP
- How do I access post_meta key with php?
- Separate array output into a
- Website completely messes up when logging out
- Calling PHP Titles inside Javascript Markup
- How can I use custom menus with a Bootstrap WordPress theme?
- Remove in post content
- Adding attribute to the post.php form tag in wp-admin
- Using php inside javascript [closed]
- Replacing WordPress Icons (menu,icons32, etc)?
- WordPress custom post type and taxonomy
- Search AJAX Filters – Multiple Query Loops Into One Loop (Optimization)
- Display WordPress search results based on the selected Sub-Category
- html form: redirect page after form completes submit function and posts data
- HTML Form Question
- How do I call a value from the datase using ajax
- Hide A Class and Add Custom HTML Code Using WordPress
- Fatal error login WordPress [duplicate]
- Configure WordPress to Use Responsive Image Rendering
- How to use data URL in WordPress?
- Help me I cannot link my font-awesome to my WordPress Theme. I have my font-awesome folder already in my project
- How to use wp_ajax_set_post_thumbnail?
- Passing a value from an input field to a php function in WordPress?
- Comparison operator != not working in field [closed]
- How to find and delete a menu item in php?
- Custom woocommerce payment gateway – Form
- Problem with my Login Plugin
- How to return html as a string from php for WordPress
- Show subcategory name selected in specific category woocoommerce
- Make a full-width wordpress page
- Display child-page links in sidebar on both Parent Pages AND Child Pages
- Unable to insert current username into custom table through html form
- Add Text Area To Child Theme’s Home Page
- Splitting table data to pages with numbers
- how to remove replicating a tag inside loop?
- Add Alt attribute to image served with php
- How to add thumbnails from recent posts to owl-carousel in wordpress automatically?
- echo variable containing html and the_permalink();
- nested divs, classes for a grid in loop [duplicate]
- featured post as div background
- Trying to customize wordpress drop down categories
- how to manipulate HTML parameters using PHP conditions
- Display wordpress post to static website in the footer
- Php echo into tag
- Parse error: syntax error, unexpected ‘echo’ (T_ECHO) in C:\xampp\htdocs\AttendanceSystem\resources\php\method.php on line 250 [closed]
- How to edit homepage in WordPress?
- Load Meta box value into div AJAX [duplicate]
- WP_Query not returning results
- How make wp_nav() with my css?
- How do I link the side images?
- Is there a better way to output HTML as a shortcode?
- How to create a container in php then customise it in CSS
- Add multiple HTML attributes to an Elementor button
- Saving meta box data from selected option’s value in database is not working
- Word press – JSPDF – Sending PDF as attachment from wp_mail – Special characters
- How to show correct td of table tags in wp_query loop
- Endpoint exists and shows up in My Account dashboard. Need to add endpoint to My Account DROPDOWN menu in Porto theme
- Get variable from url