• Resolved marius1989

    (@marius1989)


    Hello.

    First of all, thank you so much for this great plugin. Wonderful job!

    So my question is:

    Is it possible to remove the icon and the text (Clock Icon + “Opening Hours) in the widget when I display the opening hours?

    Is it also possible to remove the days when the business is closed?

    Thanks a lot!

    Regards

    • This topic was modified 7 years, 5 months ago by marius1989.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @marius1989,

    Yes, the plugin supports custom templates that you can drop into your theme to override the default templates:

    https://doc.themeofthecrop.com/plugins/business-profile/developer/templates

    In your case, you’ll want to override the opening-hours.php template.

    Thread Starter marius1989

    (@marius1989)

    Hey. Thanks a lot for your feedback. Really appreciate.

    So what do I have to change here?

    <div class=”bp-opening-hours”>
    <span class=”bp-title”><?php _e( ‘Opening Hours’, ‘business-profile’ ); ?></span>
    <?php foreach ( $data->weekday_hours as $weekday => $times ) : ?>
    <div class=”bp-weekday”>
    <span class=”bp-weekday-name bp-weekday-<?php echo $weekday; ?>”><?php echo $data->weekday_names[$weekday]; ?></span>
    <span class=”bp-times”>
    <?php foreach ( $times as $time ) : ?>
    <span class=”bp-time”><?php echo $time; ?></span>
    <?php endforeach; ?>
    </span>
    </div>
    <?php endforeach; ?>
    </div>

    This is the original one. I want to disable Clock Icon + “Opening Hours” above the business hours and also disable the days saturday and sunday (these are the days when the business is closed).

    I want to get rid of the red boxes: https://i.imgur.com/6qjXaNR.jpg

    Hope you can help me out ??
    Thank you in advance.

    Regards.

    • This reply was modified 7 years, 5 months ago by marius1989.

    Try the following:

    
    
    <div class="bp-opening-hours">
    	<?php foreach ( $data->weekday_hours as $weekday => $times ) : ?>
    	<?php if ($weekday === 'saturday' || $weekday === 'sunday') : continue; endif; ?>
    	<div class="bp-weekday">
    		<span class="bp-weekday-name bp-weekday-<?php echo $weekday; ?>"><?php echo $data->weekday_names[$weekday]; ?></span>
    		<span class="bp-times">
    		<?php foreach ( $times as $time ) : ?>
    			<span class="bp-time"><?php echo $time; ?></span>
    		<?php endforeach; ?>
    		</span>
    	</div>
    	<?php endforeach; ?>
    </div>
    
    Thread Starter marius1989

    (@marius1989)

    Thank you so much @natewr
    This is the solution I was looking for.

    Best regards!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable “Opening Hours” text and icon in Widget’ is closed to new replies.