<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GoodLayers Events &#8211; GoodLayers</title>
	<atom:link href="https://docs.goodlayers.com/category/goodlayers-events/feed/" rel="self" type="application/rss+xml" />
	<link>https://docs.goodlayers.com</link>
	<description>Documentation</description>
	<lastBuildDate>Fri, 28 Apr 2023 12:23:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>GoodLayers Event &#8211; Add an excerpt in the event post</title>
		<link>https://docs.goodlayers.com/goodlayers-event-add-an-excerpt-in-the-event-post/</link>
		
		<dc:creator><![CDATA[loc]]></dc:creator>
		<pubDate>Fri, 28 Apr 2023 12:22:39 +0000</pubDate>
				<category><![CDATA[Developers]]></category>
		<category><![CDATA[GoodLayers Events]]></category>
		<guid isPermaLink="false">https://docs.goodlayers.com/?p=2860</guid>

					<description><![CDATA[In the Confera theme, we have a few styles for the even/conference style like: &#8211; List style: https://demo.goodlayers.com/u/confera/online/schedule-list-1/ &#8211; Grid style: https://demo.goodlayers.com/u/confera/online/schedule-card-style/ In those styles, we don&#8217;t support the excerpt, that&#8217;s why we&#8217;re creating this article to help you add the excerpt by yourself. Step 1: Step 2: Call the file from child theme to [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="has-vivid-red-background-color has-text-color has-background" style="color:#ffffff">The developer documentation assumes you have knowledge and coding skills. While we created these docs to help you achieve things not available in the original features, we do not provide support if something doesn&#8217;t work when referencing the developer documentation. If the example code doesn’t work for you, please debug it yourself or hire a freelancer to help with debugging. <br><br>All customizations will be lost when you update our theme/plugin to a new version in the future. To avoid this, you must use filters and actions: https://developer.wordpress.org/plugins/hooks/.</p>



<p>In the <a rel="noreferrer noopener" href="https://themeforest.net/item/confera-online-conference-event-wordpress/29139864" target="_blank">Confera theme</a>, we have a few styles for the even/conference style like:</p>



<p>&#8211; List style: https://demo.goodlayers.com/u/confera/online/schedule-list-1/</p>



<p>&#8211; Grid style: https://demo.goodlayers.com/u/confera/online/schedule-card-style/</p>



<p>In those styles, we don&#8217;t support the excerpt, that&#8217;s why we&#8217;re creating this article to help you add the excerpt by yourself.</p>



<h2 class="wp-block-heading"><strong>Step 1:</strong></h2>



<ul class="wp-block-list">
<li>Backup your website.</li>



<li>Create a folder call: <strong>goodlayers-event</strong> in the child theme.</li>



<li>Copy those files into the <strong>goodlayers-event </strong>folder: event-item.php, event-style.php and pb-elelement-event.php.</li>
</ul>



<h2 class="wp-block-heading"><strong>Step 2:</strong></h2>



<p>Call the file from child theme to override the original file from the goodlayers event plugin. Please add this function in the functions.php file of the child theme:</p>



<pre class="wp-block-code"><code>// Call the customize file in the child theme
require_once get_stylesheet_directory() . '/goodlayers-event/event-style.php';
require_once get_stylesheet_directory() . '/goodlayers-event/event-item.php';
require_once get_stylesheet_directory() . '/goodlayers-event/pb-element-event.php';</code></pre>



<p>Override the original file after setup theme:</p>



<pre class="wp-block-code"><code>// Override the original file after setup theme
add_action('after_setup_theme', 'gdlr_core_event_add_pb_element_custom');
if(!function_exists('gdlr_core_event_add_pb_element_custom')){
	function gdlr_core_event_add_pb_element_custom(){
		if(class_exists('gdlr_core_page_builder_element')){
			gdlr_core_page_builder_element::add_element('event-g', 'gdlr_core_pb_element_event_g_custom');
		}
	}
}</code></pre>



<h2 class="wp-block-heading"><strong>Step 3:</strong></h2>



<h3 class="wp-block-heading">Go to event-style.php:</h3>



<p><strong>Original Code: </strong></p>



<pre class="wp-block-code"><code>	if( !class_exists('gdlr_core_event_g_style') ){
		class gdlr_core_event_g_style{</code></pre>



<p><strong>Change it to:</strong></p>



<pre class="wp-block-code"><code>if( !class_exists('gdlr_core_event_g_style_custom') ){
		class gdlr_core_event_g_style_custom{</code></pre>



<p>Search <strong>event style 1</strong> and add the excerpt.</p>



<p><strong>Original Code:</strong></p>



<pre class="wp-block-code"><code>$ret .= '&lt;div class="gdlr-core-content-wrap" >';
$ret .= $this->get_title($args);
$ret .= $this->get_info($infos);
$ret .= '&lt;/div>';</code></pre>



<p><strong>Change it to:</strong></p>



<pre class="wp-block-code"><code>$ret .= '&lt;div class="gdlr-core-content-wrap" >';
$ret .= $this->get_title($args);
$ret .= $this->get_info($infos);					
if( !empty($args&#91;'excerpt-number']) ){
    $ret .= $this->get_excerpt($args&#91;'excerpt-number']);
}
$ret .= '&lt;/div>';</code></pre>



<h3 class="wp-block-heading">Go to event-item.php</h3>



<p><strong>Original Code:</strong></p>



<pre class="wp-block-code"><code>// Around line 6-7	
if( !class_exists('gdlr_core_event_g_item') ){
		class gdlr_core_event_g_item{

// Around line 363
$query = $this->query;
$event_style = new gdlr_core_event_g_style();

// Around line 397
$event_style = new gdlr_core_event_g_style();

// Around line 499
add_action('wp_ajax_gdlr_core_event_g_ajax', 'gdlr_core_event_g_ajax');
add_action('wp_ajax_nopriv_gdlr_core_event_g_ajax', 'gdlr_core_event_g_ajax');
if( !function_exists('gdlr_core_event_g_ajax') ){
    function gdlr_core_event_g_ajax(){</code></pre>



<p><strong>Change it to:</strong></p>



<pre class="wp-block-code"><code>// Around line 6-7	
if( !class_exists('gdlr_core_event_g_item_custom') ){
		class gdlr_core_event_g_item_custom{

// Around line 363
$query = $this->query;
$event_style = new gdlr_core_event_g_style_custom();
$event_style->get_content($this->settings);

// Around line 397
$event_style = new gdlr_core_event_g_style_custom();
$event_style->get_content($this->settings);

// Around line 499
add_action('wp_ajax_gdlr_core_event_g_ajax', 'gdlr_core_event_g_custom_ajax',9);
add_action('wp_ajax_nopriv_gdlr_core_event_g_ajax', 'gdlr_core_event_g_custom_ajax',9);
if( !function_exists('gdlr_core_event_g_custom_ajax') ){
    function gdlr_core_event_g_custom_ajax(){</code></pre>



<h3 class="wp-block-heading">Go to pb-element-event.php</h3>



<p><strong>Original Code:</strong></p>



<pre class="wp-block-code"><code>// Around line 6
add_action('plugins_loaded', 'gdlr_core_event_add_pb_element');
	if( !function_exists('gdlr_core_event_add_pb_element') ){
		function gdlr_core_event_add_pb_element(){

			if( class_exists('gdlr_core_page_builder_element') ){
				gdlr_core_page_builder_element::add_element('event-g', 'gdlr_core_pb_element_event_g'); 
			}
			
		}
	}
	
	if( !class_exists('gdlr_core_pb_element_event_g') ){
		class gdlr_core_pb_element_event_g{

// Around line 121
'condition' => array( 'event-style' => 'style-2' )

// Around line 339
'event-style' => 'style-1', 'event-info' => array('date', 'time', 'location'),

// Around line 449
$event_item = new gdlr_core_event_g_item($settings);</code></pre>



<p><strong>Change it to:</strong></p>



<pre class="wp-block-code"><code>// Around line 6
if( !class_exists('gdlr_core_pb_element_event_g_custom') ){
		class gdlr_core_pb_element_event_g_custom{

// Around line 121
'condition' => array('event-style' => array('style-1', 'style-2', 'style-1-room', 'style-card', 'style-multi-date', 'style-grid'))

// Around line 339
'event-style' => 'style-1', 'event-info' => array('date', 'time', 'location', 'caption'),

// Around line 449
$event_item = new gdlr_core_event_g_item_custom($settings);</code></pre>



<p>Please clear the cache/cookie on your website before check it again.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
