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?
- Custom Dynamic Tag in Elementor not showing image
- WP Post Template – Templates in own folder
- Register Page Template from Plugin
- Private Plugin Updates – Localhost
- How to change custom post type pemalink Hierarcy
- Get post values of form created by widget in sidebar
- Any hook for pre-plugin-update -either bulk or single plugin update
- Get plugin option in another PHP file
- wp_create_nonce function doesn’t work inside a plugin?
- Test files for plugin development
- Input with spaces in Shortcode attributes overwritten by defaults
- Theme’s default styles are overriding my plugin’s custom CSS
- Unable to override pluggable function wp_mail
- Avoid class name collision when using third party libraries in plugins?
- How to create custom tables in WordPress using my own plugin?
- New User Form – Custom Menu Page
- Own plugin corrups plugin-activation
- wordpress plugin is not activating from widget
- All Users > User List > Update User Meta Field Inline
- Checking instances of scripts in wp_head
- How to save post change url youtube link?
- Best approach to fetch data from wp options to js file or php file
- Correct way to perform non-cacheable DB query
- Allow users of my plugin to define their own shortcode rather than use mine?
- Is it possible to create Custom Post plug-in?
- Adding widgets to header and footer from plugin
- uninstall.php file in Plugin to clean DB
- Creating a plugin to sanitize comment and the url field before display only
- Edit Yoast SEO breadcrumbs output [closed]
- Creating plugin using simple_html_dom parser?
- Object Oriented Plugin not working
- Does WP identify plugin by plugin name or plugin_basename?
- switched from query_posts to WP_query, not working now?
- Making a plugin only available on the front-end for the logged in super admin
- Rotate Widgets or Content Blocks every x sec/min
- Multi language site [closed]
- How to style the RSS wordpress?
- How can I disable widget from being visible on some pages?
- Create entire wordpress as a github repositery?
- Help With MySQL to WPDB Query Conversion
- When to load auto-login code?
- AJAX search posts and pages
- How to find the origin of a file upload from within wp_handle_upload?
- How to display more than one instance for a widget?
- How to create an archive page (with links) for a date range?
- How would I go about creating a user ranked post popularity page?
- CSV file generation failing
- Updating the Drag-To-Share eXtended share URLs?
- Custom random quote widget breaks when used in multiple sidebars
- finding whether request is for post, and post id
- Building plugin with changeable custom post type values…advice needed
- Hooking in to replace the Sidebar/Widget areas
- How to get all of the activate_plugin action parameters?
- __callStatic method handler passed to add_action causes bug in PHP
- Enqueue WordPress plugin scripts below all other JS
- Display update notification messages like ‘What’s New’
- How to add Internationalization in WordPress using Javascript/React?
- Do widget options need to be escaped widget()?
- CRUD and Frontend show from a custom table without shortcode
- How to get specific setting by settings_fields()?
- Save / Show multi line text in metabox
- Creating mySQL procedure with $wpdb
- how to disable blockrenderAppender inside all Innerblocks?