dominikborde

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 40 total)
  • Author
    Posts
  • in reply to: Template issue after updating from 3.6.1 to 3.9.1 #939917
    dominikborde
    Participant

    Barry,

    Managed to get it all working, had to use the following and adjust the breadcrumb code in places (replacing Stitle):

    if ( tribe_is_event_query() && is_singular() ) {
    echo $wp_query->posts[0]->post_title;

    }

    echo tribe_get_events_title(); does work for the Upcoming/Past events titles when in Photo View – speaking of which, any idea how i would get the titles to change when clicking ‘past events’? – it appears that as you are reloading via ajax I would need to modify the title somehow so it reloads also?

    Thanks for all your help here, much appreciated!!!

    in reply to: Template issue after updating from 3.6.1 to 3.9.1 #939751
    dominikborde
    Participant

    Ok, I had already done something like this for all views other than the event view itself; that only works with the function – the code in my template is as follows, you will see I have successfully added the breadcrumbs also. Unfortunately http://docs.tri.be/ is timing out so not sure if there is an equivalent to the_title() such as tribe_get_events_title(); – i tried this but it doesn’t work:

    ——————————–>

    <?php if ($show_page_title) { ?>
    <div class=”row”>
    <div class=”page-heading span12 clearfix alt-bg <?php echo $page_title_bg; ?>”>
    <?php if ($page_title_one) { ?>
    <h1><?php echo $page_title_one; ?></h1>
    <?php } else { ?>
    <h1><?php // ADDS SUPPORT FOR THE EVENTS CALENDAR 3 VIEWS, FIXES MISSING TITLES ON MAP/LIST/DAY/WEEK VIEWS
    if(tribe_is_day()) {
    echo _e(“Events for”, “swiftframework”); echo ‘ ‘, tribe_event_format_date( $dateFormat = ‘F j, Y’, $displayTime = false );
    } else if(tribe_is_week()) {
    echo _e(“Events for the week of”, “swiftframework”); echo ‘ ‘ , $first_day_of_week = date(‘F j, Y’, strtotime(‘Last Monday’, time()));
    } else if(tribe_is_map()) {
    echo _e(“Event Locations”, “swiftframework”);

    // ENSURES THAT THE LIST VIEW TITLE DOES NOT REPLACE THE UPCOMING/PAST EVENT TITLES IN PHOTO VIEW
    } else if(tribe_is_photo()) {
    the_title();
    } else if(tribe_is_list_view()) {
    echo _e(“Events List”, “swiftframework”);

    // RETURNS DEFAULT TITLE IF NOT AN EVENTS VIEW (TEMPLATE STANDARD BEHAVIOUR)

    } else {
    the_title();
    } ?></h1>
    <?php } ?>
    <?php if ($page_title_one) { ?>
    <h3><?php echo $page_title_two; ?></h3>
    <?php } ?>
    </div>
    </div>
    <?php } // TRIBE BREADCRUMBS
    ?> <div class=”breadcrumbs-wrap row”>
    <div id=”breadcrumbs” class=”span12 alt-bg”><?php echo tribe_breadcrumbs();
    ?></div></div>

    —–>

    I have changed the_title() to: echo $wp_query->posts[0]->post_title; – and the breadcrumbs to:
    <?php echo tribe_breadcrumbs(); echo $wp_query->posts[0]->post_title;?>

    Seems to work though not sure if it is the best way! what do you think???

    in reply to: Template issue after updating from 3.6.1 to 3.9.1 #939686
    dominikborde
    Participant

    This reply is private.

    in reply to: Page / Event Titles #184113
    dominikborde
    Participant

    OK, ignore my last post – your original code is putting the ‘past events’ title in, so to clarify: You code fixes ‘Past Events’ – Calender View titles and the event Titles themselves – all other views have no titles and the only thing I have managed is to make the event title show ‘upcoming events’ by changing the code to:
    if ( is_page() ) return $wp_query->posts[0]->post_title;

    I guess php is not my strong point! lol

    in reply to: Page / Event Titles #184031
    dominikborde
    Participant

    Just had a go at that code – i have some movement but not sure how or why! lol – i can now get ‘Past Events’ to show when in photo view – but nothing on the first page (upcoming events – I only have one past event in the system) – the day/week/map views still nothing :0( …perhaps you can see why – my modified code below:

    —>

    /* The Events Calender – Use Template Title Area
    ================================================== */

    add_filter( ‘the_title’, ‘tribe_restore_title’ );

    function tribe_restore_title($title) {
    global $wp_query;
    global $post;

    if ( 0 !== $post->ID ) return $title;
    if ( ! isset( $wp_query->tribe_is_event ) || ! $wp_query->tribe_is_event ) return $title;
    if ( ! is_a( $wp_query->posts[0], ‘WP_Post’ ) || $wp_query->posts[0]->ID == $post->ID ) return $title;

    if ( is_singular(”) ) return $wp_query->posts[0]->post_title;

    if ( is_singular(‘tribe-events-photo’) ) return $wp_query->posts[0]->post_title;

    if ( is_singular(‘tribe-events-map’) ) return $wp_query->posts[0]->post_title;

    if ( is_singular(‘tribe-events-day’) ) return $wp_query->posts[0]->post_title;

    if ( is_singular(‘tribe-events-week’) ) return $wp_query->posts[0]->post_title;

    else return tribe_get_events_title();
    }

    in reply to: Page / Event Titles #183915
    dominikborde
    Participant

    sure, I understand. I’ll look into this further and see what I find.
    Any thought’s on the title issue? – the ‘upcoming events’ is the title that should show on photo view so clearly it is possible to resolve – i tried to poke the code but my php is v basic…

    in reply to: Page / Event Titles #183624
    dominikborde
    Participant

    Hey Barry, I have spotted something which may be important…
    If I change your code to:
    if ( is_page() ) return $wp_query->posts[0]->post_title;
    I find that the event shows ‘Upcoming Events’ instead of the event title (I think this is the title for list view?) – the calendar view still works showing ‘Events For May 2014’ and the other views still without titles – the interesting thing is my menu and css setup indicates something else is happening here.

    My main menu highlights the current page by underlining the menu item – my css then changes this to a small red dot when you are on a subpage i.e, an event page – when I am viewing ‘Photo’ or ‘Map’ view I have no line or dot showing! not sure where I am when viewing these pages – thought perhaps an archive view???

    And the 404 seems to be either calendar or list view, calender 404’s when default view is list and list 404’s when default view is calendar. I had narrowed this down to WPML’s string translation plugin but have since updated to the latest WPML and the problem only goes away with WPML turned off.

    I hope this extra info is helpful!

    Thanks for your help here.

    in reply to: Page / Event Titles #182010
    dominikborde
    Participant

    ahh, now – what a difference;
    if (-9999 !== $post->ID) return $title;
    vs
    if ( 0 !== $post->ID ) return $title;
    makes! :0)
    I have ‘Events for May 2014’ in calendar view and the events themselves have their titles!!! – nothing for map, list, photo views though :0(
    and the breadcrumb (navxt) works a little better on single event view – i get home > event name …but no events crumb.
    I’m also finding that switching views gives a 404 – if you change the default view then it will load and instead 2 of the other options decide to 404 instead – varies depending on default view…
    I’m running WPML – if I turn it off all is well…
    I have also been using some code to prevent the 404’s – not sure if I still need this but if I remove it I get 404 messages in the title’s and breadcrumbs! …code below (and I also have the child theme/tribe-events/month/single-day.php fix still in place:
    –>

    /**
    * Let’s set up a filter than transforms the status of month views from 404 (if a given
    * month happens to be devoid of events) to 200.
    */
    add_filter(‘status_header’, ‘avoid_tribe_month_view_404s’);

    function avoid_tribe_month_view_404s($status) {
    global $wp_query;

    if ( ! isset($wp_query->query_vars[‘eventDisplay’])
    || ‘month’ !== $wp_query->query_vars[‘eventDisplay’]
    || false === strpos($status, ‘404 Not Found’) )
    return $status;

    $wp_query->is_404 = false;
    return str_replace(‘404 Not Found’, ‘200 OK’, $status);
    }

    /**
    * Sets is_404 to false on pages without any events like when the Upcoming Events page is empty.
    * @return void
    */
    function avoid_404_event_titles( $template ) {
    global $wp_query;

    if ( property_exists( $wp_query, ‘tribe_is_event’ ) && $wp_query->tribe_is_event && $wp_query->is_404 )
    $wp_query->is_404 = false;

    return $template;

    }
    // Fix 404 on events page
    add_action( ‘template_include’, ‘avoid_404_event_titles’, 1 );

    in reply to: Page / Event Titles #181752
    dominikborde
    Participant

    Unfortunately not – I did come across this solution but it doesn’t work for me – and yes i put it before; /* That’s all, stop editing! Happy blogging. */
    and removed the custom function in functions.php but noy joy i’m afraid :0(

    in reply to: Calendar Widget #57289
    dominikborde
    Participant

    The calendar is now showing! – seems to be intermittent when switching views.

    Other than that though all looks good so far!!! – thank you very much for all of your help Barry, you’re a star!

    in reply to: Calendar Widget #57277
    dominikborde
    Participant

    This reply is private.

    in reply to: Calendar Widget #57276
    dominikborde
    Participant

    This reply is private.

    in reply to: Calendar Widget #57029
    dominikborde
    Participant

    This reply is private.

    in reply to: Calendar Widget #56572
    dominikborde
    Participant

    This reply is private.

    in reply to: Calendar Widget #56465
    dominikborde
    Participant

    Barry,

    Just to let you know the license stuff is ok now!

    Regarding the template – could i possibly email you the zip so you can see the code? – I would also appreciate if you can take a look at the Permalink Editor plugin – having hunted for an alternative it seems this plugin is my only option – having designed the site around woocommerce and your product I had everything working perfectly with version 2.0 and all of this has really delayed the project.

    I will likely not have the events operational when we migrate (nothing scheduled currently) which means I have some time to deal with this later on. So just to clarify where I am:

    1. Need to customise template so the Events behave like v.2.0 did
    2. Need to have it working along-side the Permalink Editor plugin (or prevent the conflict somehow)

    Perhaps you could provide me with an email address to send the plugins to and we can close this thread and converse via email instead?

    Regards

Viewing 15 posts - 1 through 15 (of 40 total)