Duplicate Widget
A widget that can act as a duplicate of another widget (for synchronized use in another sidebar) Define a widget once, use it in multiple sidebars. This saves you from having to manually configure each copy of the widget and later having to worry about keeping them in sync should you ever need to make any changes. Particularly useful for those who define logic in their themes to conditionally include different versions of a sidebar depending on what template is being shown. Depending on use, it is an alternative to plugins that introduce in-widget logic to determine when widgets should be visible (Widget Logic, Section Widget, Conditional Widgets, etc). Quick overview of what this plugin does: Adds a widget called “Duplicate”. The widget’s only setting is a dropdown listing all active widgets. The selected widget will be the widget duplicated by the duplicate widget. A duplicate widget shows the same title and content as its source widget, even if those values later get changed in the source widget. A widget can be duplicated any number of times and can appear multiple times within the same page. (Yes, even within the same sidebar, though why would you do that?) A duplicate widget will abide by the configuration of the sidebar it is placed in, not the configuration of the sidebar containing the source widget. So it uses ‘before_widget’, ‘after_widget’, ‘before_title’, ‘after_title’ values of its own sidebar. Widgets that are duplicated will have “[D]” prepended to their name in the widget titlebar in the admin to denote they have duplicates. Also, at the bottom of the widget’s configuration form (when the widget is expanded), a short blurb also explains that the widget has duplicate(s) and a count of how many duplicates it has. If a widget is deactivated or deleted, if it has any duplicates, they get deleted as well. The widget id and widget type of the source widget are included as HTML classes in the duplicate widget’s markup. Links: Plugin Homepage | Plugin Directory Page | Author Homepage Filters The plugin exposes four actions for hooking. Typically, customizations utilizing these hooks would be put into your active theme’s functions.php file, or used by another plugin. c2c_before_duplicate_widget (action) The ‘c2c_before_duplicate_widget’ hook allows you to output text, or perform some sort of action, just before the output of the duplicate widget. Arguments: $instance (array) : The settings for the widget instance (namely: title and widget_to_duplicate) $args (array) : The configuration for the widget and sidebar Example: // Output an opening before duplicate widget content add_action( 'c2c_before_duplicate_widget', 'my_c2c_before_duplicate_widget', 10, 2 ); function my_c2c_before_duplicate_widget( $instance, $args ) { echo ' ; } c2c_after_duplicate_widget (action) The ‘c2c_after_duplicate_widget’ hook allows you to output text, or perform some sort of action, just after the output of the duplicate widget. Arguments: $instance (array) : The settings for the widget instance (namely: title and widget_to_duplicate) $args (array) : The configuration for the widget and sidebar Example: // Output an closing after duplicate widget content add_action( 'c2c_after_duplicate_widget', 'my_c2c_after_duplicate_widget', 10, 2 ); function my_c2c_after_duplicate_widget( $instance, $args ) { echo ' ; } c2c_before_duplicate_widget_form (action) The ‘c2c_before_duplicate_widget_form’ hook allows you to output text, or perform some sort of action, just before the output of the duplicate widget’s configuration form (in the WP admin). Arguments: $instance (array) : The settings for the widget instance (namely: title and widget_to_duplicate) Example: // Display a message just before the duplicate widget settings form add_action( 'c2c_before_duplicate_widget_form', 'my_c2c_before_duplicate_widget_form' ); function my_c2c_before_duplicate_widget_form( $instance ) { echo ' Note: this is a note above the widget settings form. '; } c2c_after_duplicate_widget_form (action) The ‘c2c_after_duplicate_widget_form’ hook allows you to output text, or perform some sort of action, just after the output of the duplicate widget’s configuration form (in the WP admin). Arguments: $instance (array) : The settings for the widget instance (namely: title and widget_to_duplicate) Example: // Display a message just after the duplicate widget settings form add_action( 'c2c_after_duplicate_widget_form', 'my_c2c_after_duplicate_widget_form' ); function my_c2c_after_duplicate_widget_form( $instance ) { echo ' Note: this is a note below the widget settings form. '; }
Top keywords
- widget64×8.64%
- duplicate39×5.26%
- duplicate widget28×3.78%
- c2c16×2.16%
- form13×1.75%
- action12×1.62%
- instance12×1.62%
- output10×1.35%
- c2c after duplicate8×1.08%
- c2c before duplicate8×1.08%
- settings8×1.08%
- sidebar8×1.08%
SiteOrigin Widgets Bundle
The SiteOrigin Widgets Bundle gives you all the elements you need to build modern, responsive, and engaging website pages. Using the Widgets Bundle, you can quickly and effortlessly add buttons, sliders, heroes, maps, images, carousels, features, icons, and so much more. SiteOrigin Widgets are ready to be used anywhere, in Page Builder by SiteOrigin, in the Block Editor or your theme’s widget areas. The Widgets Bundle is even compatible with other popular page-building plugins. Our collection is growing, and here are some of the powerful widgets included so far: Accordion Efficiently display content in expandable sections, maximizing space for improved organization. Anything Carousel Display images, text, or any content in a highly customizable and responsive carousel slider. Author Box Display author information, including avatar, name, bio, and post links in a customizable box. Blog Showcase blog content in personalized list or grid layouts with flexible design and display settings. Button Create a custom button with flexible styling, icon support, and click tracking functionality. Button Grid Add multiple buttons in one go, customize individually, and present them in a neat grid layout. Contact Form Add a contact form with custom fields, design options, spam protection, and email notifications. Call To Action Prompt visitors to take action with a customizable title, subtitle, button, and design settings. Editor Insert and customize content with a rich text editor offering extensive formatting options. Features Showcase features with icons, titles, text, and links in a customizable grid layout. Google Maps Embed a customizable Google Map with markers, directions, styling options, and interactive elements. Headline Engage visitors with a prominent, stylish headline and optional divider and sub-headline to convey key messages. Hero Image Build an impressive hero image section with custom content, buttons, background image, color, and video. Icon Display a customizable icon with color, size, alignment, and optional link settings. Image Add a responsive image with custom dimensions, positioning, caption, link, and styling options. Image Grid Showcase images in a responsive grid layout with custom size, spacing, alignment, and captions. Image Slider Create a responsive slider with customizable image and video frames, navigation, and appearance settings. Layout Slider Design responsive slider frames with unique layouts, backgrounds, and content built with Page Builder. Lottie Player Bring your content to life using interactive Lottie animations with personalized settings and links. Post Carousel Display blog posts or custom post types in a responsive, customizable carousel layout. Price Table Display pricing plans in a professional table format with custom columns, features, and design. Recent Posts Drive traffic to your latest content with a visually appealing, fully customizable recent posts showcase. Simple Masonry Layout Display images in an attractive masonry grid with adjustable columns, gutters, and optional captions. Social Media Buttons Add social media buttons to your site with personalized icons, colors, and design settings. Tabs Create tabbed content panels with customizable titles, content, initial tab, and design settings. Taxonomy Automatically display the taxonomies of the current post with customizable labels, colors, and link settings. Testimonials Feature testimonials from satisfied customers with tailored layouts, images, text, colors, and mobile compatibility. Video Player Embed self-hosted or externally hosted videos with a customizable player, controls, and responsive sizing. Ready to Be Used Anywhere Page Builder by SiteOrigin: Insert widgets in Page Builder by SiteOrigin in either the Classic Editor or Page Builder Layout Block in the Block Editor. Block Editor: The Widgets Bundle is 100% Block Editor compatible. Insert widgets using the SiteOrigin Widgets Block featuring a live widget search form. Theme and Plugin Widget Areas: Insert widgets in any theme or plugin widget area. In Other Popular Page Builder Plugins: Insert widgets in Elementor or Beaver Builder. Built for Speed We carefully built each widget for the best possible page size and load time. The Widgets Bundle is perfectly compatible with Autoptimize and all other major performance plugins. SEO Optimized The Widgets Bundle uses modern SEO best practices and seamlessly integrates with all major SEO plugins. Accessibility Ready The Widgets Bundle is accessibility-ready. Tab through all form fields and settings, make changes without using a mouse. Actively Developed SiteOrigin has been creating magical tools for your WordPress website since 2011. We actively develop the Widgets Bundle with updates released several times a month, including new features and fixes as required. View our Widgets Bundle work on GitHub. Create Custom Widgets Access a huge array of features and save time by developing custom widgets for your theme or plugin on the Widgets Bundle Framework. Read more in our extensive developer documentation. Documentation Documentation is available on SiteOrigin. Support Free support is available on the SiteOrigin support forums. SiteOrigin Premium SiteOrigin Premium enhances the Widgets Bundle with a vast array of additional features and settings. Take your layouts to the next level with SiteOrigin Premium addons. SiteOrigin Premium includes access to our professional email support service, perfect for those times when you need fast and effective technical support. We’re standing by to assist you in any way we can.