How to make plugin title text bold

  • Hi

    I’m using this for calling custom widget https://wordpress.org/plugins/woocommerce-custom-widget-product/screenshots/

    and it’s working fine for me but I want to make title text bold I’m pasting it’s code below

    <?php
    /*
    Plugin Name: Woocommerce Custom Widget Product
    Description: This plugin help display a list of customs products on your website
    Author: Binh Nguyen
    Version: 1.01
    Author URI: http://vietcomic.net/
    */

    if ( ! defined( ‘ABSPATH’ ) ) exit; // Exit if accessed directly

    class Bi_Widget_Product extends WP_Widget
    {

    function __construct()
    {
    parent::__construct(
    ‘woocommerce_ndbProducts’,
    __( ‘WP Customs Products’, ‘ndb’ ),
    array(‘description’ => __( ‘This plugin help display a list of customs products on your website.’, ‘ndb’ ))
    );
    }

    public function widget( $args, $instance ) {

    extract( $args );
    $title = apply_filters( ‘widget_title’, $instance[‘title’]);
    $ids = $instance[‘ids’];
    $arr_id = explode(‘,’,$ids);
    $query_args = array(
    ‘post_status’ => ‘publish’,
    ‘post_type’ => ‘product’,
    ‘no_found_rows’ => 1,
    ‘post__in’ => $arr_id
    );

    $r = new WP_Query( $query_args );
    if ( $r->have_posts() ) {

    echo $before_widget;

    if ( $title )
    echo $before_title . $title . $after_title;

    echo ‘<ul class=”product_list_widget”>’;

    while ( $r->have_posts()) {
    $r->the_post();
    global $product;
    ?>

  • id ) ); ?>” title=”<?php echo esc_attr( $product->get_title() ); ?>”>
    <?php echo $product->get_image(); ?>
    <?php echo $product->get_title(); ?>

    <?php if ( ! empty( $show_rating ) ) echo $product->get_rating_html(); ?>
    <?php echo $product->get_price_html(); ?>
  • <?php
    }

    echo ”;

    echo $after_widget;
    }

    wp_reset_postdata();

    echo $content;

    }
    // Widget Backend

    public function form($instance){
    $title = (isset($instance[‘title’])) ? $instance[‘title’] : __( ‘Products’, ‘ndb’ );
    $ids = $instance[‘ids’];
    ?>
    <p>
    <label for=”<?php echo $this->get_field_id(‘title’); ?>”><?php _e(‘Title :’); ?></label>
    <input class=”widefat” id=”<?php echo $this->get_field_id(‘title’); ?>” name=”<?php echo $this->get_field_name( ‘title’ ); ?>” type=”text” value=”<?php echo esc_attr( $title ); ?>” />
    </p>
    <p>
    <label for=”<?php echo $this->get_field_id(‘ids’); ?>”><?php _e(‘IDs :’); ?></label>
    <input class=”widefat” id=”<?php echo $this->get_field_id(‘ids’); ?>” name=”<?php echo $this->get_field_name( ‘ids’ ); ?>” type=”text” value=”<?php echo esc_attr( $ids ); ?>” />
    </p>
    <?php

    }

    public function update( $new_instance, $old_instance ) {
    $instance = array();
    $instance[‘title’] = ( ! empty( $new_instance[‘title’] ) ) ? strip_tags( $new_instance[‘title’] ) : ”;
    $instance[‘ids’] = ( ! empty( $new_instance[‘ids’] ) ) ? strip_tags( $new_instance[‘ids’] ) : ”;
    return $instance;
    }

    }

    function Bi_Widget_Product_register_widgets() {
    register_widget( ‘Bi_Widget_Product’ );
    }
    add_action( ‘widgets_init’, ‘Bi_Widget_Product_register_widgets’ );

    The blog I need help with is: (visible only to logged in users)

  • Sorry but that site you are referring to is not hosted WordPress.COM and those are the only sites we provide support for here. We cannot use woocommerce on WordPress.COM hosted blogs. You need a WordPress.ORG install to use it.

    WordPress.COM and WordPress.ORG are completely separate and have different logins, features, run different versions of some themes with the same names, and have separate support documentation and separate support forums. Read the differences here http://en.support.wordpress.com/com-vs-org/

    If you don’t have a username account at WordPress.ORG click http://wordpress.org/support/ and register one on the top right hand corner of the page that opens, so you can post to the support forums there.

    Resetting your WordPress.ORG password http://codex.wordpress.org/Resetting_Your_Password
    WordPress.org support docs are at https://codex.wordpress.org/Main_Page

  • The topic ‘How to make plugin title text bold’ is closed to new replies.