If you, for some reason, don’t want to use the shortcode ([ratings]
), you can always use the_ratings()
directly in your template.
Make sure you are within the loop so it’ll be able to identify the correct post ID for you.
If you want to use it outside the loop, you can pass your ID manually. The function’s signature is
function the_ratings($start_tag = 'div', $custom_id = 0, $display = true) {
so you could call it as
the_ratings("div", 123)
if you wanted to output the ratings for the post with the ID 123.
Related Posts:
- Should all plugins be encapsulated in a Class?
- How to get the active theme’s slug?
- Preserve custom URL parameter on more pages
- PHP code on Visual Composer Plugin
- if plugin is active? check if plugin is enabled or not?
- Making plugin unique to not conflict with plugins with the same name
- How to find out if option exists but is empty?
- How to store ACF custom fields data in a custom table
- Trying to disable plugins doens’t work
- Thumb rating for wordpress – top user
- Errors while using ajax from external wordpress page
- shortcode doesn’t work
- Have Plugin Handle Specific URLs
- Setting up widgets in wordpress with a unique ID for the after_title argument
- allow arabic letters when register new account
- How to get all events from ‘All in one Events calender’ plugin in JSON format?
- How do you remove plugin edit option?
- Make specific products accessible only to a user role in WooCommerce
- Where should I save an API key of my user when installing my plugin?
- Accessing post’s meta data based on user’s click of a post
- Custom form action to handle data inside a plugin
- WP Post Template – Templates in own folder
- How to add equivalent of php include to one page (as plugin?)
- Override Plugin Script Fucnction in WordPress
- Image upload and download from front-end
- Shrink down register_settings on Settings API
- Parse error: syntax error, unexpected ‘new’ (T_NEW) in /misc/41/000/204/381/9/user/web/ragami.net/wp-settings.php on line 219
- How to call WordPress function other files
- Removing an action from wp_footer called in a class that’s inside a bigger class
- Ajax call returning 0
- Using Wishlist Member and I need to access a user’s status
- Why namespaces are rarely used in WordPress plugins?
- Some code in shortcode function being ignored
- Subdomains with almost the same content
- Using window.onload with Ubermenu
- What is @Action in WordPress?
- PHP Error When a plugin is active
- Inserting custom PHP script on homepage
- Include a php file from another plugin
- Add bcc to contact from on wordpress
- Getting taxonomy images to display on single-post with their terms
- wp-mail attachment is not sent for no reason?
- Custom shortcode for displaying user based on a role parameter
- wp_enqueue_scripts
- WordPress Console Application (ability to excecute a custom function via crontab only)
- Save user total active time after login in wordpress [closed]
- Get all the URLs of the pages that uses a specific shortcode
- Calling a save function from a “submit” button
- Wp Debug Enabled True Notices and Warning
- Pagination shows Same posts
- Theme Functions run a function upon activation or preview
- WP Subtitle Plugin Problem
- Custom Plugin scripts from admin working in frontend
- WooComerce Deposit: set specific shipping method and quantity based deposit amount
- Unexpected add action function in WP plugin
- How to get brand children with woocommerce brands
- Prevent WordPress from sending set-cookie http header
- Is there any way to sync Facebook Comments and with comments on WordPress website?
- WordPress rewrite rule depend on meta values not ids
- location lock wordpress website
- Use AJAX to fetch Current Post Thumbnail for WordPress when Uploaded throughMedia Uploader Frontend
- Easiest way to load/fire a handful of functions, IF checkbox is checked?
- Problem with wordpress has_action() function
- Offering a freemium plugin (a free version + paid version)
- Why is my form going to frontend on html form submission present on the php files inside my custom plugin?
- How much PHP and MySQL or MariaDB knowledge should I know to start writing WordPress themes and plug-ins and whatever else a beginner can edit?
- post id or permalink auto-incrementing number and reset everyday
- How To Use htaccess to Rewrite Link Structure for a Page that is Generated Programatcially
- WordPress logout appends cache/all/index.php to the site_url()
- Reverse count page view and show on other page
- Change (replace) word in metabox
- Limiting buddy press features based on membership level (PMPro)
- Caching of combined CSS and JS fails because of losing MIME types through combining by PHP
- Passing ajax variable to more than one wordpress plugin function
- Add class as plugin for other plugins
- Social sharing plugin directing to blank page after post sharing
- Displaying friend’s posts only
- using href when creating wordpress plugin calls empty page instead of php file
- Saving custom form fields
- How to add php stylesheet to admin section instead of admin_head hook
- Template from scratch: Sidebars not showing widget
- Contact Form 7: custom validation [closed]
- Enforce conditions only for draft posts using WyPiekacz, ignore pending and published posts
- How to add homepage Widget?
- how to restore wordpress backup(.rar) manually?
- White Screen When Includding A Folder With PHP Files
- What can I do to customize a widget provided with this plugin? from where have I to start?
- WordPress create permalink structure for custom post type with userid
- Two sites one PC
- PHP if url extension action=discussion condition use [closed]
- Shortcode inside a redirect [closed]
- Attachement title in wpallimport
- Block registration with viewScript
- Can’t use updated variables in handle function
- How to get URL param for pagination in shortcode?
- Make plugin admin page visible to other roles
- Is there any WordPress Plugin that provides video editing from front end side? [closed]
- How Create LastMod and Update Date Only on Taxonomy Category and Tags
- Accessing Correct Database to Create REST API Endpoint
- How do I replace a logo image that’s hard-coded into a plugin’s logo.php file?