WP SITES

3082 Coded Tutorials & 284 Plugins

Add Custom Field Link To Query Loop Block Featured Image

This plugin enables you to link each featured image to a custom link using custom fields on a per post basis. The plugin works with the query loop block adding :

  • Fields to the query loop block Featured Image > Post Permalink settings to enable a field for the custom field name
  • Functionality to link the custom field name per featured image to the custom field added on the single post or added using code.

This enables you to add a custom link to each featured image to any/all query loop blocks.

Usage

One you’ve installed and activated the plugin from the plugin folder below, there’s 4 simple steps to link any featured image inside the query loop block to a custom field :

  1. Edit the page or post where you inserted the Query Loop block and click the featured image you want to link.
  2. Toggle the Enable custom field link?
  3. Add the name of your custom field in the Custom field name text box.
  4. Create a new custom field on any single post you plan to show inside the query loop block and add a URL to link the image. Make sure this custom field name matches what you entered in step 3.

Default Settings

The custom field settings added by the plugin work independent of the default Link to Post setting. If Enable custom field link is false, default settings apply. If Enable custom field link is true, the image will be linked to the custom field URL regardless of the default Link to Post setting.

Screenshots

Here’s the custom settings added to the Page > Query Loop > Featured Image > Post permalink settings.

Leave a Reply

New Plugins