A plugin is just a file that gets loaded into WordPress, it doesn’t have a location on the page. In fact WordPress doesn’t know which page it is yet when plugins are loaded. It may not even be a frontend page!
So if a plugin is just a place to put code such as hooks and filters, how do you embed code in a page?
There are several methods:
- blocks
- shortcodes
- widgets
- theme template files
You can register blocks/shortcodes/widgets in a plugin, whereas templates files are theme specific.
I recommend searching the site for how to create and use a shortcode, this will be the easiest option for you at the moment.
Related Posts:
- Error Warning: Declaration of description_walker::start_el after PHP upgrade [duplicate]
- WordPress Warning: preg_replace(): JIT compilation failed: no more memory
- Autoloading in Child Theme
- WSOD but WP_DEBUG not giving any errors
- Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”
- Append code into wp-config.php
- How to turn off redirection from ‘domain.com/login’ to ‘domain.com/wp-login.php’
- Looking for a better way to handle an ajax script that pulls in post data on click
- add_rewrite_rule with bottom priority doesn’t handle the WordPress pages
- Adding featured image via PHP
- How to return multiples lines in a shortcode?
- wp_enqueue_style with style.php and WordPress functions
- fallback image for featured image
- How to set status codes such as 401 and 403?
- Minify HTML, CSS, JS with PHPWee?
- Add attribute / custom attribute to product in woocommerce
- Access/update database with jQuery
- How to create another version of my site based on the same database
- How to get bool with `get_option()` when already registered setting with type `boolean`
- How do themes render caption texts in extended markup (e.g. “wp-caption” paragraphs)
- WordPress widget/sidebar dividers?
- Displaying theme options in css
- PHP code inside shortcodes
- PHP help get_template_directory + PHP include
- Latest post in a specific menu
- Querying wpdb using PHP
- Reload part of checkout on changed shipping method
- how to combine wordpress htaccess on my root domain + php on subfolder
- Input data from email form not going to JSON file
- Font Awesome changing default WordPress Font
- Should `wp_login` be used since it’s deprecated?
- admin-ajax Firing Error 400 When Logged In
- How to use a custom hook
- Hide HTML element (by class or ID) with PHP
- wp_force_remove_style’ not found
- Pagination on Custom Post
- Why can’t I return a value from $wpdb->get var?
- how to save checkbox data for custom setting?
- How to keep the capability of users and disable Gutenberg editor in WordPress?
- ACF Repeater Pagination stopped working since upgrade to php7.2
- Using featured image of blog archive page
- Fatal error: Uncaught Error: Call to undefined function get_header() [closed]
- Highlight the links without using dropdown
- Automatically Add Page Links to Nav Menu
- blank white page when post/update/change option etc
- Incrementing PHP variable onclick to display posts by month
- add button to specific post
- WordPress PHP syntax doesn’t seem to be working correctly
- Why, when moving a WordPress multisite network, have my theme customisations stopped working?
- Where should I copy a PHP file from wp-includes to, in order to override it in my child theme?
- How to edit wordpress pages through cpanel? [closed]
- Is it possible to restrict files from your wordpress uploads (not logged-in users or guest)?
- Adding attribute to the post.php form tag in wp-admin
- limit number of post for achive page
- How to get movies by date
- Get options from database using php class
- Problem in replacing the_content with the_excerpt()
- How to change the author box selection on a post to a custom taxonomy
- Is there way to toggle the publish date display?
- Need to add a post’s featured image to a section on the frontpage
- Output product category link from WP_Query
- How to send a php var to jQuery Ajax call with two different file
- Variation prices breakdown only for single product page
- not outputting medium size image URL
- How to use wp_ajax_set_post_thumbnail?
- Best way to use variables in multiple functions?
- Passing a value from an input field to a php function in WordPress?
- Download Featured Image Link in Post Shortcode
- Get product price in a different currency using WooCommerce Currency Switcher
- Show subcategory name selected in specific category woocoommerce
- Posts Per Page with a button to add more Posts
- Cannot fetch posts with certain ‘product_cat’. WP_Query is empty
- WordPress files break if I edit them, but adding a closing PHP tag fixes it
- Add custom attribute to product’s HTML to woocommerce cart page
- Change WooCommerce template for PDF – access to custom field
- Detect what link user clicks and Redirect to a specific page for logged in users only
- Displaying logged in user name
- Advanced WordPress SQL Query
- How to detect if a revision was made by woocommerce or wordpress?
- Editing existing pre-created menus in PHP
- Create a hierarchical loop at predefined markup requirements
- Setting ‘post_format’
- Custom Meta Boxes and Fields Multicheck Issue
- nested divs, classes for a grid in loop [duplicate]
- Hide sharing box and author box with a metabox on WordPress
- WordPress Website Featured Image Replacement Issue
- Or operators in PHP [closed]
- how to iterate through xml data?
- Adding slides to an existing carousel manually
- Shortcode to include PHP file, pass various parameters to include?
- Why can’t I include echo inside a variable? [closed]
- WP_Query not returning results
- $post->ID calls for current page, but what is the code to call for any new page created and published in WordPress?
- How to increase excerpt length in wordpress? [duplicate]
- Are WordPress & PHP objectively and based on evidence going to die because the future is made of frontend rendering instead of server side rendering? [closed]
- Not able to see the error [closed]
- How do I link the side images?
- Alternative to php echo within code
- Why does WordPress not send the user the email to add a password?
- How to put a class in the p tag automatically added by the_content() in the wordpress loop?