• Resolved Beee

    (@beee)


    Now that I’m able to show upcoming events on another site I’ld like to be able to create a custom feed so I can tailor a feed to a specific site.

    I thought about using categories or tags, but I don’t want this to show up on the website, because it’s only a marker for RSS. Since the category/tag listing (#_EVENTCATEGORIES/#_EVENTTAGS) both are shown in li’s without unique classes/id’s (which afaik can’t be changed through the admin) I can’t hide them through CSS.

    Any other solutions/tips ? Would custom fields maybe be an option ?

    https://www.ads-software.com/extend/plugins/events-manager/

Viewing 8 replies - 1 through 8 (of 8 total)
  • There is a way to remove the li tags from the #_EVENTCATEGORIES and #_EVENTTAGS placeholdes.

    You’d need to move the files categories.php and / eventtags.php from the /events-manager/templates/placeholders folder and put them in /wp-content/themes/yourtheme/plugins/events-manager/placeholders/ and edit them as needed.

    Thread Starter Beee

    (@beee)

    Thanks I didn’t know that yet. Will look into it and see if it fits me.

    Thread Starter Beee

    (@beee)

    I managed to add classes to the categories and tags, so thanks for that.

    I’ld prefer to use tags to categories, but I’ld like to exclude one tag from being listed. Since they’re listed as a flat list, seperated by comments, I need to exclude it in the query.

    This is the original file eventtags.php

    $tags = get_the_terms($EM_Event->post_id, EM_TAXONOMY_TAG);
    if ( is_array($tags) && count($tags) > 0 ) {
    	$tags_list = array();
    	foreach($tags as $tag) {
    		$link = get_term_link($tag->slug, EM_TAXONOMY_TAG);
    		if ( is_wp_error($link) ) $link = '';
    		$tags_list[] = '<a href="'. $link .'" class="'. $tag->name .'">'. $tag->name .'</a>';
    	}
    	echo implode(', ', $tags_list);
    }

    I think I should build an exclude to exclude tag_id 19.

    I tried

    $tags_list = array('exclude' => array('19'));

    and

    $tag_args = array('exclude' => array(19));
    $tags = get_the_terms($EM_Event->post_id, $tag_args);

    but I haven’t been able to achieve it. Any suggestions ?

    Thread Starter Beee

    (@beee)

    I managed to make a temporary solution.
    Since I never display more than 1 tag, I removed the comma and space in the implode and since I now tagged the links I can hide them by CSS.

    like this on line 12

    $tags_list[] = '<a href="'. $link .'" class="'. $tag->name .'">'. $tag->name .'</a>';

    and on line 14

    echo implode('', $tags_list);

    It’s not the best solution so I still prefer to just exclude this term id from the listing.

    thanks for updating us and sharing the solution. however, maybe this can help you also – https://pastebin.com/rBLpD74a (just add the exclude attribute)

    Thread Starter Beee

    (@beee)

    I think that was what I was looking for initially.
    But don’t understand the add_filter.

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    that part is similar to what’s described here – https://wp-events-plugin.com/tutorials/modifying-placeholder-default-information/

    Thread Starter Beee

    (@beee)

    ah ok, so 2 methods… I thought they belonged together to achieve 1 thing.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Create custom feed’ is closed to new replies.