[resolved] Customise widget (3 posts)

  1. macrocurio
    Posted 3 years ago #


    I'm currently modifying a clients site that was already setup with a theme. On the home page there is a widget that pulls the title and excerpt from a few posts and puts them in a slider (I have shown some of that code below). I just wanted to find out if it's possible to have the first word of the title styled in a different way to the rest of the title.

    Cheers :)

    /* Slider */
    function my_post_type_slider1() {
    	register_post_type( 'extra-slider',
    				'label' => __('Extra Slider'),
    				'public' => true,
    				'show_ui' => true,
    				'show_in_nav_menus' => false,
    				'menu_position' => 5,
    				'supports' => array(
  2. bcworkz
    Posted 3 years ago #

    It may be possible, but the code you posted is not where it happens. You somehow need to filter the title content as it's loaded into the slider and add span tags around the first word.

  3. macrocurio
    Posted 3 years ago #

    Thanks for that, I'll keep trying :)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.