gonzalosanza

Forum Replies Created

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • in reply to: Override saved_venues_dropdown() #960556
    gonzalosanza
    Participant

    Many thanks barry, but still not working, now im getting this error:

    Fatal error: Using $this when not in object context in /home/segoviaencendida/public_html/wp-content/themes/eventica-wp-child/functions.php on line 461

    line 461 contains:
    <td style=”width:170px”><?php printf( __(‘Use Saved %s:’, ‘tribe-events-calendar’), $this->singular_venue_label ); ?></td>

    and 462 contains:
    <td><?php $this->saved_venues_dropdown_custom( $VenueID ); ?></td>

    in reply to: Override saved_venues_dropdown() #960479
    gonzalosanza
    Participant

    Hi Barry, and thanks!
    I have tried with this code

    add_action( ‘wp_loaded’, ‘replace_displayEventVenueDropdown’ );

    function replace_displayEventVenueDropdown() {
    if ( is_admin() ) return;
    $events = TribeEvents::instance();
    remove_action( ‘tribe_venue_table_top’, array( $events, ‘displayEventVenueDropdown’ ) );
    add_action( ‘tribe_venue_table_top’, array( $events,’displayEventVenueDropdown_custom’) );
    }

    function displayEventVenueDropdown_custom( $postId ) { …my custom code… }

    But Im getting this error:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘TribeEvents’ does not have a method ‘displayEventVenueDropdown_custom’ in /home/mydomain/public_html/wp-includes/plugin.php on line 496

    I tried smalls modifications on this, but nothing…

    Any help? Thanks anyway!

    gonzalosanza
    Participant

    Hi Pylon!
    I’m looking for exactly the same, if I get it, I’ll let you know.
    Good luck!

    in reply to: Display events in x AND y categories, instead of x OR y #941571
    gonzalosanza
    Participant

    Thanks, I will try with this, (Until now I was trying to modify some ajax code).
    But I’m still a bit lost, this is a direction about how to make the queries, right? but could you point me on the direction to the files where the queries are made? I mean, where is made the query which says ‘display the category x OR the category y’ I would like check it to get an idea about how to customize my own code later, and be able to implement what you said above in a proper way.
    Thank you.

    gonzalosanza
    Participant

    Thanks for responding so quickly. the problem is solved, a friend gave me the solution. If this helps someone:

    
    	foreach ( $term_items as $term ) {
    
    			if ( (! empty( $term->children ))&& ( $term->name == 'Music' )) {
    				$child_items = $this->flattened_term_list( $term->children, $existing_list );
    				$flat_list = array_merge( $flat_list, $child_items );
    			
    			}else if((empty( $term->children ))){
    				$flat_list[] = array(
    				'name'  => str_repeat( '&nbsp;', $term->depth * 2 ) . $term->name,
    				'value' => $term->term_id,
    				'data'  => array( 'slug' => $term->slug ),
    				'class' => 'tribe-events-category-' . $term->slug
    			);
    			}
    		
    	}
    	return $flat_list;
    
    gonzalosanza
    Participant

    Sorry:
    – Music
    ––Rock
    –– Pop
    –– Disco
    – Sport
    –– Basket
    –– Futboll
    –– Skate

Viewing 6 posts - 16 through 21 (of 21 total)