According to: http://wpseek.com/get_comment_count/ $single
is the post ID.
Try:
public function get_comment_count($single){
if (isset($this->params['comments']) && $this->params['comments'] == 'yes'){
return '<div id="disquscomments"><a href="'.get_permalink($single).'#disqus_thread">Comments</a></div>';
} else {
return null;
}
}
Related Posts:
- post expire after x days
- Can’t get custom posts of taxonomy to show
- Get total number of comment of the posts written by an author
- How can I get WordPress to save comments in markdown format?
- Notify comment author upon reply
- Loop in elementor custom widget not working
- get_users(); Is an Undefined Function When Used in Cron Job
- i need to make custom cron_schedule with custom interval time as a parameter into a custom payment gateway plugin wordpress
- Paginated Comments “reply” does not work!
- How to fix vanilla comments extra iframe space
- Should all plugins be encapsulated in a Class?
- PHP code on Visual Composer Plugin
- Output before and after the loop
- if plugin is active? check if plugin is enabled or not?
- Disabling Comment Notifications for Post Author
- 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
- 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
- Display comments of users on single page
- 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?)
- 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
- Problem with the Loop – want to limit the access to three free articles
- Some code in shortcode function being ignored
- Subdomains with almost the same content
- Using window.onload with Ubermenu
- What is @Action in WordPress?
- WordPress Plugin manipulate have_posts()
- Inserting custom PHP script on homepage
- Add bcc to contact from on wordpress
- Getting taxonomy images to display on single-post with their terms
- wp_enqueue_scripts
- WordPress Console Application (ability to excecute a custom function via crontab only)
- Get all the URLs of the pages that uses a specific shortcode
- Wp Debug Enabled True Notices and Warning
- Pagination shows Same posts
- Remember the Meta Value With Radio Buttons
- Theme Functions run a function upon activation or preview
- How to modify the Loop from a plugin (instead of a theme)
- WP Subtitle Plugin Problem
- Custom Plugin scripts from admin working in frontend
- WooComerce Deposit: set specific shipping method and quantity based deposit amount
- 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?
- 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?
- 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
- Caching of combined CSS and JS fails because of losing MIME types through combining by PHP
- Change pricing in Woocommerce based on Category and Product [closed]
- How to see in Edit Comments if comment is from User and her Roles
- Register setting on plugin activation
- WordPress environment not loading properly
- How to remove a css class for any wordpress page
- WordPress not displaying information on post sent from custom admin form
- Place content inside the Post Loop
- Woocommerce: deleted single-product.php, everything still works. How is it possible?
- Is there any wordpress function to update a random post every 10 minutes?
- export high ress images to pdf
- page creator to leave comments ONLY
- custom url with custom post
- Working on fixing wp-front-end-editor, encountering undefined index
- MySql Query for WordPress
- Fake Single WordPress Post (Page) Loop
- Shrinktheweb plugin problem
- Photos do not show on SEO platform built into a wordpress plugin
- How do i use postMash to order posts in a custom loop?
- Showing author box on post detail page
- How to add homepage Widget?
- 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
- Shortcode inside a redirect [closed]
- Attachement title in wpallimport
- Block registration with viewScript
- How to get URL param for pagination in shortcode?
- Make plugin admin page visible to other roles
- 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?