Lyle

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • Lyle
    Participant

    many thanks. this has solved most of the problems i was having.

    I will engage with others to resolved some kinks

    Lyle
    Participant
    // Single events
    	if ( tribe_is_event() && is_single() ) {
    		$title = 'Single event page';
    	}

    when i remove the above code which is giving all my single event pages the title of “Single Event Page” , i am getting this error

    Parse error: syntax error, unexpected T_ELSEIF in _/themes/graphy/functions.php on line 241

    Now line 241 reads as such

    if ( tribe_is_event() && is_single() ) {

    i put back the above code and modify it to be as such

    // Single events
    	if ( tribe_is_event() && is_single() ) {
    		$title = ' <?php the_title(); ?>';
    	}

    this outputs it to “<?php the_title(); ?>” as the title. Removing the ‘ ‘ from $title = , gives me this

    Parse error: syntax error, unexpected '<' in _/themes/graphy/functions.php on line 242

    And that line is

    $title = <?php the_title(); ?>;

    How do i output the event title on a single event?

    Lyle
    Participant

    original function coding

    modified coding

    now giving this error

    Parse error: syntax error, unexpected $end in /_/themes/graphy/functions.php on line 297

    however when i remove this coding

    add_action( 'pre_get_posts', 'tribe_post_date_ordering', 51 );
    
    function tribe_post_date_ordering( $query ) {
    	if ( ! empty( $query->tribe_is_multi_posttype ) ) {
    		remove_filter( 'posts_fields', array( 'Tribe__Events__Query', 'multi_type_posts_fields' ) );
    		$query->set( 'order', 'DESC' );
    	}

    my page is able to load. The above coding is something that I would like to use as I am using the feed wordpress makes to do an auto tweet with IFTTT.

    Next issue I have is that when visiting the site, site title is “Malaysia Performs | Upcoming Events” ; correct in both list/month view until one clicks on “next events” or “previous events” . Both output it as “|Upcoming Events – Page 2 – Malaysia Performs ” and “|Upcoming Events – Malaysia Performs ”

    Output should be “Malaysia Performs | Upcoming Events | Page #” in both the list/month when one forwards the page in either view.

    Additionally how do i code it so that single event pages such as this displays the title as ” Name of event | Site Title” or “Name of event | start DD MM – end DD MM | Site Title ”

    Thank you very much for the help

    • This reply was modified 10 years ago by Lyle. Reason: minor edits
    Lyle
    Participant

    right now only two themes are installed. Graphy (which i want to use) and TwentySixteen.

    Graphy and 2016 are at default and no additional coding has been added. Also like what i had mentioned earlier, when i save the function.php after inputting the “site title” codes, the page stops displaying and i then have to delete the whole theme folder (overwriting just the function.php does not work)

    Lyle
    Participant

    This reply is private.

Viewing 5 posts - 1 through 5 (of 5 total)