how to create 5star review rating for testimonials without plugin in WordPress

already I have created a Testimonial post type but I face a problem which is how to create a review 5-star rating system without any plugin in the meta box. This is my 5 start rating codes here… just I wanna fix the rating problem.

Plz, anyone help me.

                            <div class="single-slider">                                 <ul class="star-list">                                  <li><i class="fa fa-star"></i></li>                                 <li><i class="fa fa-star"></i></li>                                 <li><i class="fa fa-star"></i></li>                                 <li><i class="fa fa-star"></i></li>                                 <li><i class="fa fa-star"></i></li>                                                                  </ul>                                    <?php the_content();?>                                 <!-- Client Info -->                                 <div class="t-info">                                     <div class="t-left">                                         <div class="client-head"> <?php the_post_thumbnail('testimonial-img');?></div>                                         <h2><?php the_title();?><span><?php echo get_post_meta(get_the_ID(),'meta-subtitle-Testimonials2', true); ?></span></h2>                                     </div>                                     <div class="t-right">                                         <div class="quote"><i class="fa fa-quote-right"></i></div>                                     </div>                                 </div>                             </div> 

plz check the pic which i wanna

enter image description here

Source link plugin – show just anchor / link

I implemented a small source link plugin on my WordPress website via the following codes.

Single.php:

                        <?php global $  post, $  pages, $  page;  $  total = count( $  pages ); // Link źródłowy if ( $  total < 2 || $  page === $  total ) :          if ( $  url = get_post_meta( $  post->ID, '_source_link', true ) ) :         $  label = get_post_meta( $  post->ID, '_source_link_label', true );         $  label = $  label ? $  label : $  url;     ?>         <div class="source-link">             <b>Źródło:</b> <a href="<?php echo esc_url( $  url ); ?>" rel="nofollow" target="_blank"><?php                 echo esc_html( $  label ); ?></a>         </div>     <?php endif;  endif;  ?> 

Functions.php:

add_action( 'add_meta_boxes', 'wpse_source_link' );   add_action( 'save_post', 'wpse_source_link_save' );   function wpse_source_link() {      add_meta_box(         'source_link',         __( 'Link źródłowy', 'myplugin_textdomain' ),          'wpse_source_meta_box',         'post',         'side'     ); }   function wpse_source_meta_box( $  post ) {      wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' );       echo '<label for="source-link">Link</label> ';   echo '<input type="text" id="source-link"" name="source_link" value="'.     get_post_meta( $  post->ID, '_source_link', true ) .'" size="25" />';    echo '<label for="source-link-label">Nazwa strony</label> ';   echo '<input type="text" id="source-link-label"" name="source_link_label" value="'.     get_post_meta( $  post->ID, '_source_link_label', true ) .'" size="25" />'; }   function wpse_source_link_save( $  post_id ) {    if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )        return;    if ( ! wp_verify_nonce( $  _POST['myplugin_noncename'], plugin_basename( __FILE__ ) ) )       return;     if ( current_user_can( 'edit_post', $  post_id ) ) {        update_post_meta( $  post_id, '_source_link', sanitize_text_field( $  _POST['source_link'] ) );       update_post_meta( $  post_id, '_source_link_label', sanitize_text_field( $  _POST['source_link_label'] ) );     } } 

As you can see there are two fields: Link źródłowy (Source link) and Nazwa strony (website name – anchor). However, at this moment this plugin only works, when both fields have some text inside. Is there any way to make it work also with just anchor/link? I mean, if two fields are completed it should show anchor with link, but if just anchor has some text in it, then it should show only anchor. Same goes for link.

Does anyone know how to make it work like that? To be honest I’m a newbie and I have no idea.

Clicking custom plugin admin menu redirects to “No Update Required” on live site

I built a custom WordPress plugin that sends woocommerce purchase info to a CRM. The plugin works perfectly on localhost. But on live site, whenever I click on the admin menu, I always get redirected to "No Update Required" page.

enter image description here

Here is my main plugin file:

/**  * Plugin Name: Woo Crm  * Description: Sends customer data to the CRM on purchase.  */  if (!defined('ABSPATH')) {     echo 'I am a plugin I cannot do anything when called directly.';     exit; }  // Config define('PLUGIN_NAME', 'Woo Crm'); define('PLUGIN_SLUG', 'woo_crm'); define('PLUGIN_URL', plugin_dir_url(__FILE__)); define('PLUGIN_PATH', plugin_dir_path(__FILE__));  // Imports require_once(PLUGIN_PATH . 'utils/utils.php'); require_once(PLUGIN_PATH . 'views/views.php'); require_once(PLUGIN_PATH . 'services/crm/crm.php'); require_once(PLUGIN_PATH . 'views/components/settings/settings.php');  class WooCrm {     function __construct()     {         // Register Styles         add_action('admin_enqueue_scripts', array($  this, 'register_styles'));          // Create Menu Page         add_action('admin_menu', array($  this, 'plugin_setup_menu'));          // Add Settings Fields to Menu Page         add_action('admin_init', array('settings', 'init'));          // Woocommerce hook         /**          * First check if WooCommerce is activated          * Then check if hook isn't empty          */         if (class_exists('WooCommerce')) {             $  hook = get_when_to_send_data_hook();             if (!empty($  hook)) {                 add_action($  hook, array($  this, 'woo_order_create_client'));             }         }     }      function woo_order_create_client($  order_id)     {         // Create client logic     }      function plugin_setup_menu()     {         $  icon_url = PLUGIN_URL . "public/images/dash-icon.png";         add_menu_page(__(PLUGIN_NAME, PLUGIN_SLUG), __(PLUGIN_NAME, PLUGIN_SLUG), 'manage_options', PLUGIN_SLUG, array('views', 'admin'), $  icon_url);     }      function register_styles()     {         wp_register_style('woo_crm_admin', PLUGIN_URL . 'public/css/admin.css');         wp_enqueue_style('woo_crm_admin');     }  }  new WooCrm(); 

Any help would be highly appreciated.

Elementor plugin won’t let me edit the top section

I’m using the plugin Elementor to edit my wordpress theme and it wont let me edit the top two sections. Only the one’s after. I found one solution which was to "disable Header Overlay option" and I couldn’t find that. Then the other was to change the page layout settings (in elementor) to "Elementor Canvas" and when I did that it didn’t even show the top two sections. I am completely new to both WordPress and Elementor so can someone help me find a way around this? Thanks.Third Section Allows Editing

First Section/Second No Editing