Profile pluging
Add more profile on WordPress
<?php /* Plugin Name: Bride Profiles Widget Description: Adds a custom widget to display profiles of 6 brides on the home page. Version: 1.0 Author: Your Name Author URI: https://yourwebsite.com */ // Register the widget function register_bride_profiles_widget() { register_widget('Bride_Profiles_Widget'); } add_action('widgets_init', 'register_bride_profiles_widget'); // Create the widget class class Bride_Profiles_Widget extends WP_Widget { // Widget setup public function __construct() { $widget_options = array( 'classname' => 'bride-profiles-widget', 'description' => 'Displays profiles of 6 brides on the home page.', ); parent::__construct('bride_profiles_widget', 'Bride Profiles Widget', $widget_options); } // Widget display public function widget($args, $instance) { echo $args['before_widget']; // Widget content echo '<h3>Bride Profiles</h3>'; echo '<ul>'; // Query the 6 latest bride profiles $profiles_query = new WP_Query(array( 'post_type' => 'bride', 'posts_per_page' => 6, )); // Loop through the bride profiles if ($profiles_query->have_posts()) { while ($profiles_query->have_posts()) { $profiles_query->the_post(); // Display the bride profile echo '<li>'; echo '<h4>' . get_the_title() . '</h4>'; echo '<div>' . get_the_content() . '</div>'; echo '</li>'; } } echo '</ul>'; echo $args['after_widget']; } }