| 开发者 |
logicrays
priteshm |
|---|---|
| 更新时间 | 2026年8月21日 21:01 |
| PHP版本: | 7.2 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
Go to the WordPress editor for any post or page. Look for the "Banner Image" meta box in the sidebar. Click "Choose or Upload an Image" to select or upload your image from the Media Library.
Go to the "Banner Image" settings menu in your WordPress admin dashboard, select the Custom Post Types where you want to show the metabox, and click "Save Settings".
You can place the [BANNER-IMG] shortcode inside the content editor of the post or page. Alternatively, to display it directly in your theme templates (like header.php), use the PHP code: <?php echo do_shortcode('[BANNER-IMG]'); ?>.
Yes. The banner image is post/page-specific. The plugin retrieves the image assigned specifically to the post or page currently being viewed.
The plugin wraps the image in a div with the class banner-image. You can customize its look by adding CSS to your theme's stylesheet. For example:
.banner-image img { width: 100%; height: auto; border-radius: 8px; }
If no image is uploaded or chosen for a post/page, the shortcode will output nothing, ensuring your page layout remains clean without displaying broken images.