Show comments in a popup
You’re re-inventing the wheel here 😉 The Problem You’re bypassing WordPress with this approach, so that’s explains the error message. Accessing any custom file, within your theme directory, will not load WordPress core automatically. Already available This is already supported by the WordPress core. You should check out comments_popup_link() and comments_popup_script(). In general, you can … Read more