You have to call the_post(); before you use the_permalink() or the_title(). Both functions work with a global $post object that will be set up by the_post();.
Related Posts:
- Conditionally enqueue a widget’s script/stylesheet in HEAD (only when present on page!)
- Plugin upgrading: Widget settings
- How can I make my custom shortcode work in a Custom HTML Widget?
- How to pass JavaScript variable to PHP in wordpress widget?
- Is dynamic forms/entries possible in Widget?
- How do I add a widget programmatically to a newly created site (WPMU) within a plugin?
- WordPress widget / plugin….fields not appearing in my widget
- Created Widget Not Showing up on Admin Panel
- How do I register a stylesheet inside a WordPress widget?
- Detect if a plugin was included in a certain page
- Passing $this->get_field_name() to javascript
- Can I use a form in a dashboard widget?
- Ajax gives 400 error
- Ajax contact form widget plugin data not insert in database
- Fetch Children of Grouped Products Inside WooCommerce Product Loop
- WordPress Widget – Saving multidimensional arrays into $instance
- Widget’s container?
- strange shortcode error: does shortcodes requires any dependency?
- WordPress Widget Not Saving Instance
- How to set the default value as the saved value once a form of widget is saved?
- My widget won’t update its values when save is clicked
- How to add captcha to publish widget
- Disable Author Archive just for certain roles in bulk
- Table of contents (TOC) plugin is not showing header tag
- Widgets are not displaying in the admin panel
- How to overwrite the category template in a plugin
- The styles in the recent posts widgets plugin not working
- Using foreach loop for `$instance` of form and update array widget iteration
- One time call to external API in widget
- Widget outputs the value but doesn’t save anything inside the textarea
- WordPress Widget: Is it possible to make the form dynamic without updating?
- Plugin Works, but Widget Doesn’t
- Widget Script Loads at Bottom of Page
- Widget redirecting to home page
- WordPress plugin not eching popular posts
- What are the downsides of using bootstrap in plugin development?
- What can I do to customize a widget provided with this plugin? from where have I to start?
- is_plugin_active function doesn’t exist
- How can I find plugins’ slug?
- Get plugin directory from a theme
- How to call a plugin function from index.php
- My custom made plugin has “a new version available” which links to unrelated plugin
- Rewriting every url
- Where can I find a schema of wordpress plugin core architecture?
- How To Determine If A Filter Is Called In A Sidebar/Widget Context?
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- How Does WordPress Uninclude/Deactivate A Plugin?
- Custom admin column disappearing when using Quick Edit [duplicate]
- Create page when plugin is activated
- How to un-attach rich text editor from named textarea elements
- How can I translate the name of my Plugin for other languages?
- How to fetch serialized data from wordpress options
- how to not show plugin in admin area
- Memory Leak in plugin action
- Remove Widgets in Dashboard
- WordPress network: set themes and plugins for new blog
- How to get the custom page get_permalink?
- Getting User email on logout. wp_logout
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- How can I add a custom meta value on file upload?
- Advanced Custom Fields into functions.php
- Logs to check when the plugin was first installed for the first time
- Can a plugin add to header/footer/body content?
- Admin-ajax.php is dying “0” without processing function
- Add a Custom Permalink option in the Permalink Admin Screen?
- How to remove an Ajax action
- nonces in custom oop plugin
- How Can A Plugin Hook Itself To the End of Every Excerpt?
- Allow Facebook to preview posts before published
- Has anyone used require.js for handling plugin scripts?
- Multisite Widget/Content
- publish_post plugin hook doesn’t always pass $post->post_content
- Multiple files in a plugin
- Wp die causing 500 Internal Server Error?
- Let user subscribe to specific categories
- adding a new value to a serialized array in WP_option table
- add action for displaying posts using a shortcode
- Write to / remove from default .htaccess file from plugin?
- Best way to hook a custom url?
- How to cancel WordPress’ action/filter when using OOP with anonymous callback
- What is the best way to mimic a search query within a plugin
- Remove rewrite rules generated by plugin during deactivation
- How do I add a custom sub menu menu under Woo-commerce marketing?
- How to load plugin after page is loaded – pagespeed issues
- Programatically download a plugin
- Widget for adding HTML markup to a page
- Do action only on certain front end pages?
- Call to a member function have_posts() on a non-object on normal loop
- WordPress Gutenberg react make import of __experimentalUseInnerBlocksProps which is no more experimetal
- How to stop activating a plugin and show admin notice when dependent plugins minimum version is not met
- Fixing WordPress’s Bug (failed to send buffer of zlib output compression) results in “White Screen of Death”
- WordPress.org Plugin Directory doesn’t recognise screenshots [closed]
- How to check current user before all actions and filters?
- changes to widget settings not showing up in individual pages pages until they’re updated [closed]
- Plugin: register_deactivation_hook works perfectly well, while register_activation_hook suddenly stopped working
- How can I make my metabox appear?
- Consolidate plugin functionality into a theme
- qTranslate remove default directory from link
- How to Add Custom New Published Post Counter Icon on Top of the WordPress Site [closed]
- Setup page on first login on multisite