WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] How to use a placeholder within a custom placeholder (3 posts)

  1. Chantal Coolsma
    Member
    Posted 2 years ago #

    I am trying to make a custom placeholder for an excerpt without having to use the more-tag. It just counts 23 words. That's all. However how can I use for example #_EVENTNOTES in my custom placeholder. I have this code, which replaces '#_EVENTXCRPT' by a value:

    function my_em_placeholder_mod($replace, $EM_Location, $result){
    	global $wp_query, $wp_rewrite;
    	switch( $result ){
    		case '#_EVENTXCRPT':
    			$replace = excerpt('23');
    			break;
    	}
    	return $replace;
    }
    add_filter('em_location_output_placeholder','my_em_placeholder_mod',1,3);

    http://wordpress.org/extend/plugins/events-manager/

  2. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    $EM_Location->output('#_EVENTNOTES')

    or

    $EM_Location->post_content

  3. Chantal Coolsma
    Member
    Posted 2 years ago #

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic