I send a message earlier about how text was appearing in the EE Widget – it didn’t match the format of other text blocks in the side bar. I was told that the widget uses normal paragraphs but I would like it to match the format and spacing of my other Widgets, without effecting the main text content.
Do you know how I can do this? I can do basic stuff but I’m not a programmer so please go easy on me!
Thanks for coming back to me, I’ve tried that and it still looks the same.
In summary I altered the widget.php file in wp-content>plugins>event-espress>templates I swapped ALL of the <p> for
I put a infront of every single <p>
I changed every </p> for a
And I put:
/* Before widget (defined by themes). */
echo $before_widget;
echo ”;
AFTER before_widget
and the following BEFORE the after_widget
/* After widget (defined by themes). */
echo ”;
echo $after_widget;
and it looks like it did before – do you know where I am going wrong? In the old thread you said that this would be added to EE 3.2 – I’m guessing this didn’t happen?
I have another error, which seems to be caused by that widget.php
After I have put that widget.php file in place, the EE Widget looks like it should however, when I update pages or posts the whole page goes white – I can move back in the browser and the action will not have been saved but if I click update or publish the page just goes white.
I have deleted the widget.php and the problem goes away. I upload and I get the same problem.
What version of Event espresso are you using? It’s possible that because I used the latest version of the template it could be affecting it. Or the code wasnt added correctly.
//Here we can create messages based on the event status
$status = event_espresso_get_is_active($event->id, $all_meta);
//Print out the array of event status options
//print_r (event_espresso_get_is_active($event->id));
//You can also display a custom message. For example, this is a custom registration not open message:
$status_display_custom_closed = $status[‘status’] == ‘REGISTRATION_CLOSED’ ? ‘ – <span class=”espresso_closed”>’ . __(‘Regsitration is closed’, ‘event_espresso’) . ‘</span>’ : ”;
//End
if (!is_user_logged_in() && defined(‘EVENTS_MEMBER_REL_TABLE’) && !empty($member_only) && $member_only == ‘Y’) {
//Display a message if the user is not logged in.
//_e(‘Member Only Event. Please ‘,’event_espresso’) . event_espresso_user_login_link() . ‘.’;
} else {
//Serve up the event list
//As of version 3.0.17 the event list details have been moved to event_list_display.php
switch ($status[‘status’]) {
case ‘NOT_ACTIVE’:
//Don’t show the event if any of the above are true
break;
default:
?> “><?php echo stripslashes_deep($event->event_name) ?> – <?php echo event_date_display($event->start_date) ?>
<?php /* These are custom messages that can be displayed based on the event status. Just comment the one you want to use. */ ?>
<?php //echo $status_display; //Turn this on to display the overall status of the event. ?>
<?php //echo $status_display_ongoing; //Turn this on to display the ongoing message. ?>
<?php //echo $status_display_deleted; //Turn this on to display the deleted message. ?>
<?php //echo $status_display_secondary; //Turn this on to display the waitlist message. ?>
<?php //echo $status_display_reg_closed; //Turn this on to display the secondary message. ?>
<?php //echo $status_display_not_open; //Turn this on to display the secondary message. ?>
<?php //echo $status_display_open; //Turn this on to display the secondary message. ?>
<?php //echo $status_display_custom_closed; //Turn this on to display the secondary message. ?>
<?php
break;
}
}
}
/* After widget (defined by themes). */
echo ”;
echo $after_widget;
}
/* Update the widget settings. */
function update($new_instance, $old_instance) {
$instance = $old_instance;
/* Strip tags for title and name to remove HTML (important for text inputs). */
$instance[‘title’] = strip_tags($new_instance[‘title’]);
$instance[‘category_name’] = $new_instance[‘category_name’];
$instance[‘show_expired’] = $new_instance[‘show_expired’];
$instance[‘show_secondary’] = $new_instance[‘show_secondary’];
$instance[‘show_deleted’] = $new_instance[‘show_deleted’];
$instance[‘show_recurrence’] = $new_instance[‘show_recurrence’];
$instance[‘limit’] = $new_instance[‘limit’];
return $instance;
}
/**
* Displays the widget settings controls on the widget panel.
* Make use of the get_field_id() and get_field_name() function
* when creating your form elements. This handles the confusing stuff.
* */
function form($instance) {
It’s similar but what you pasted here doesnt have the code I added in the pastebin. I would make sure the widget.php is copied to the wp-content/uploads/espresso/templates directory and then edit that file and remove its contents. Then copy the pastebin code and paste it into the empty widgets.php file and save.
The support post ‘Widget Text Format’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.