Forum Replies Created
-
AuthorPosts
-
May 4, 2016 at 8:15 pm in reply to: Adding codes to Functions.php causes website to go down. #1110813
Lyle
Participantmany thanks. this has solved most of the problems i was having.
I will engage with others to resolved some kinks
May 4, 2016 at 5:26 am in reply to: Adding codes to Functions.php causes website to go down. #1110377Lyle
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 241Now 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 242And that line is
$title = <?php the_title(); ?>;How do i output the event title on a single event?
May 3, 2016 at 6:42 am in reply to: Adding codes to Functions.php causes website to go down. #1109962Lyle
Participantnow giving this error
Parse error: syntax error, unexpected $end in /_/themes/graphy/functions.php on line 297however 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
May 3, 2016 at 4:58 am in reply to: Adding codes to Functions.php causes website to go down. #1109933Lyle
Participantright 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)
May 3, 2016 at 4:54 am in reply to: Adding codes to Functions.php causes website to go down. #1109930Lyle
ParticipantThis reply is private.
-
This reply was modified 10 years ago by
-
AuthorPosts
