Home>Support>Which file generates the ‘widget-title’ block?

Which file generates the ‘widget-title’ block?

Hi there
I’m currently customising a renamed copy of loop-carousel.php in the loops directory of my Vantage child theme.
It displays as I would expect when used as a template for the post loop widget, apart from the h3 widget-title (and contained vantage-carousel-title) block now being missing, meaning that the navigation arrows no longer appear.
I’m having trouble investigating further, as I can’t locate the file responsible for generating this block, loop-carousel.php only seeming to generate the subsequent vantage-carousel-wrapper block.
Any ideas as to where I should be looking?
Thanks

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 1 month ago spiralscratch

    No worries, found it:
    inc/widgets.php
    function vantage_filter_carousel_loop

  2. 7 years, 1 month ago spiralscratch

    All fixed – here’s what I did in case it helps anyone else

    Added override of vantage_filter_carousel_loop function to functions.php in my child theme so that the template test in the first line also includes my modified loop file

    if( !function_exists('vantage_filter_carousel_loop') ) :
    /**
     * Filter the carousel loop title to add navigation controls.
     */
    function vantage_filter_carousel_loop($title, $instance = array(), $id = false){
    	if($id == 'siteorigin-panels-postloop' && isset($instance['template']) && (($instance['template'] == 'loops/loop-carousel.php') || ($instance['template'] == 'loops/loop-carousel-MODIFIED.php'))) {
    		$new_title = '<span class="vantage-carousel-title"><span class="vantage-carousel-title-text">'. $title . '</span>';
    		$new_title .= '<a href="#" class="next" title="' . esc_attr( __('Next', 'vantage') ) . '"><span class="vantage-icon-arrow-right"></span></a>';
    		$new_title .= '<a href="#" class="previous" title="' . esc_attr( __('Previous', 'vantage') ) . '"><span class="vantage-icon-arrow-left"></span></a>';
    		$new_title .= '</span>';
    		$title = $new_title;
    	}
    	return $title;
    }
    endif;
    add_filter('widget_title', 'vantage_filter_carousel_loop', 10, 3);
    
  3. 7 years, 1 month ago Alex S
    Hi, I Work Here

    Hi Spiralscratch,

    I’m glad you were able to resolve this issue. Thank you for posting your solution!
    I’m sorry I wasn’t able to be of assistance this time. Please be sure to post another thread if you have any other questions.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More