Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter stuffen17

    (@stuffen17)

    I have tried the same with global sites / global tables turned off – it works fine, the event_id’s are created correctly.

    Must really have something to do with global tables?!

    Try this:

    [event]#_ATT{DESTINATION_URL}[/event]

    Placeholder only seem to work like this when using within content…

    Thread Starter stuffen17

    (@stuffen17)

    I could not see the events, they were neither in trash nor saved as drafts, just gone – but still in wp_em_events.

    However, for some reason I cannot replicate this error now. Maybe it was just compatibility issues with another plugin.

    If this will happen again I will update here.

    Thanks for the help!

    Thread Starter stuffen17

    (@stuffen17)

    Hello angelo,

    I already got the column to show, as shown in the tutorial above. However, as I said before, I have trouble getting the actual Category Name by post_id (because I do not quite understand the structure of the objects). I can′t seem to get the code right… I was hoping some1 could help me with those 2-3 lines of code.

    Thread Starter stuffen17

    (@stuffen17)

    Hello,

    thanks for the help.

    For sure I did some mistakes there, however, it was not the only code I tried. (I looked up get_term_by and I suppose it′s only working for a CATEGORY ID, not post_id.)

    In another support post someone writes that with this code I get the categories:
    $cat = $EM_Event->get_categories()->categories;

    Now I suppose I have an Object which is an array of category objects?!

    How do I access the category name from there?

    already tried
    $cat->name
    with no luck.

    Alternatively
    get_the_terms( $post_id, 'event-categories' ) this should get me also the categories, same as the upper code – right?
    Here the same problem – how do I get the category name from here on?

    Thread Starter stuffen17

    (@stuffen17)

    Hey,

    WP All Import creates Posts and can use custom fields. On the first import from WP All Import it creates the posts under “events”. They yet do not appear in wp_em_events because the posts are marked as “drafts”.

    When updating the XML again, the events get updated and because of that, i think, converted into “events” appearing in wp_em_events.

    I was wondering which action creates an event and which action creates a post within Events Manager?

    And can I set custom fields such as _events_status from outside the plugin (inside WP ALl Import, where I can set custom fields of a post/event)?

    Thread Starter stuffen17

    (@stuffen17)

    It did seem to work all the time, however, I got some problems, I suppose, by using WP All Import Pro.

    I have imported XML Files and created Events with them.

    I did this a couple of times and deleted the Events in between inside Events Manager. Sometimes I clicked “delete posts” in WP All Import Pro too.

    In the end, some events where still in the wp_em_tables in MySQL Database even though I had no entries in the Events Manager.

    So be careful…

    Thread Starter stuffen17

    (@stuffen17)

    $latest_posts = new WP_Query($args);
    
    		$output = 	'<div class="w-shortblog '.' date_atleft'.$attributes['el_class'].'">
    							<div class="w-shortblog-h">
    								<div class="w-shortblog-list">';
    		global $disable_section_shortcode, $post;
    		$disable_section_shortcode_tmp = $disable_section_shortcode;
    		$disable_section_shortcode = TRUE;
    		while($latest_posts->have_posts())
    		{
    			$latest_posts->the_post();
    
    			$excerpt = $post->post_excerpt;
    			if ($excerpt == '') {
    				$excerpt = get_the_content(get_the_ID());
    				$excerpt = do_shortcode($excerpt);
    				$excerpt = $this->sections_fix($excerpt);
    
    				$excerpt = apply_filters('the_excerpt', $excerpt);
    				$excerpt = str_replace(']]>', ']]>', $excerpt);
    				$excerpt_length = apply_filters('excerpt_length', 55);
    				$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');
    				$excerpt = wp_trim_words( $excerpt, $excerpt_length, $excerpt_more );
    			} else {
    				$excerpt = apply_filters('the_excerpt', $excerpt);
    				$excerpt = str_replace(']]>', ']]>', $excerpt);
    			}
    
    			$output .= 				'<div class="w-shortblog-entry">
    										<div class="w-shortblog-entry-h">
    											<a class="w-shortblog-entry-link" href="'.get_permalink(get_the_ID()).'">
    												<h4 class="w-shortblog-entry-title">
    													<span class="w-shortblog-entry-title-h">'.get_the_title().'</span>
    												</h4>
    											</a>
    											<div class="w-shortblog-entry-meta">
    												<div class="w-shortblog-entry-meta-date">
    													<span class="w-shortblog-entry-meta-date-month">'.get_the_date('M').'</span>
    										<span class="w-shortblog-entry-meta-date-day">'.get_the_date('d').'</span>
    										<span class="w-shortblog-entry-meta-date-year">'.get_the_date('Y').'</span>
    												</div>
    											</div>
    											<div class="w-shortblog-entry-short">
    											'.$excerpt.'
    											</div>
    										</div>
    									</div>';
    		}
    		$output .=				'</div>
    							</div>
    						</div>';
    		$disable_section_shortcode = $disable_section_shortcode_tmp;
    		wp_reset_query();

    This is the code that is beeing used by vc_latest_posts.

Viewing 8 replies - 1 through 8 (of 8 total)