Shaun

Forum Replies Created

Viewing 12 posts - 16 through 27 (of 27 total)
  • Author
    Posts
  • in reply to: Help Adding Category To Tooltip But With… #1081902
    Shaun
    Participant

    Wow. 7 days later – after you made me say the same thing five times – you tell me that it’s not actually possible?

    Thanks for that.

    in reply to: Help Adding Category To Tooltip But With… #1081399
    Shaun
    Participant

    ITT Workshop (Birmingham)
    February 25, 2016
    More Info
    Book Now

    With ‘More Info’ still linked to category and ‘Book Now’ still linked to single event page.

    in reply to: Help Adding Category To Tooltip But With… #1081297
    Shaun
    Participant

    Hi Cliff,

    Ideally just the words ‘More Info’, doesn’t really need to category at all because the event title will always be the same or very similar.

    But if what you suggests is the closest we can get I’d happily take it.

    Thanks

    in reply to: Help Adding Category To Tooltip But With… #1080579
    Shaun
    Participant

    Thanks for the reply Cliff.

    I have read the links but haven’t come across anything relating to what I’m trying to achieve.

    My main issue isn’t removing the colon but changing the anchor text of the category link.

    Can you tell me if it’s possible to have the category link with custom anchor text of ‘More Info’ rather than automatically the category name?

    Thanks again.

    in reply to: Help Adding Category To Tooltip But With… #1079625
    Shaun
    Participant

    Sure.

    So this is the contents of tooltip.php from the /month folder:

    <script type="text/html" id="tribe_tmpl_tooltip">
    	<div id="tribe-events-tooltip-[[=eventId]]" class="tribe-events-tooltip">
    		<h4 class="entry-title summary">[[=title]]</h4>
    
    		<div class="tribe-events-event-body">
    			<div class="tribe-event-duration">
    				<abbr class="tribe-events-abbr tribe-event-date-start">[[=dateDisplay]] </abbr>
    			</div>
    			[[ if(imageTooltipSrc.length) { ]]
    			<div class="tribe-events-event-thumb">
    				<img src="[[=imageTooltipSrc]]" alt="[[=title]]" />
    			</div>
    			[[ } ]]
    			[[ if(excerpt.length) { ]]
    			<p class="tribe-event-description">[[=raw excerpt]]</p>
    			[[ } ]]
    			[[ if(categories.length) { ]]
    			<p class="tribe-event-categories">[[=raw categories]]</p>
    			[[ } ]]
    			<span class="tribe-events-arrow"></span>
    			<p><a href="[[=permalink]]" class="url">Book Now</a></p>
    		</div>
    	</div>
    </script>

    As you can see it’s the [[=raw categories]] code that is pulling in the event name/link.

    That is defined in single-event.php, also in the /month folder where I have the following:

    $day             = tribe_events_get_current_month_day();
    $event_id        = "{$post->ID}-{$day['daynum']}";
    $link            = tribe_get_event_link( $post );
    $title           = get_the_title( $post );
    $additional_data = array();
    $categories      = tribe_get_event_categories( $event_id, array(
    		'before'       => '',
    		'sep'          => ', ',
    		'after'        => '',
    		'label'        => '', // An appropriate plural/singular label will be provided
    		'label_before' => '',
    		'label_after'  => '',
    		'wrap_before'  => '',
    		'wrap_after'   => '',
    	) );;
    $additional_data['categories'] = $categories

    I have removed the ‘#’ from ‘label’ since my last post so that has been removed from the tooltip. But there is still a colon ‘:’ showing. And I don’t see anyway to control the anchor text of the link.

    Hope you can help, thank you for trying!

    in reply to: Major issue with breadcrumbs #1077922
    Shaun
    Participant

    Hi Nico,

    I’ve not had much luck figuring out what it is from the sidebar code making the breadcrumbs work.

    But since the breadcrumbs are now working then sure, feel free to close the thread.

    Thanks for your help with this.

    in reply to: Help Adding Category To Tooltip But With… #1077920
    Shaun
    Participant

    Hey Cliff,

    Thanks for your reply.

    That is correct. Well, also without the #: ideally. That is also added by the ‘[[=raw categories]]’ I’m using at the moment.

    Appreciate your help!

    in reply to: Major issue with breadcrumbs #1074471
    Shaun
    Participant

    Hi Nico,

    I don’t think that is the problem as I’ve spent a long time on this today.

    After some painstaking trial & error I have figured out what is causing this but I have no idea why and hope that you can find a better solution than I have.

    So for some bizarre reason the breadcrumbs only work on the venue and single category view if get_sidebar(); is present ABOVE the tribe_breadcrumbs(); function in the template!

    They don’t work without get_sidebar(); and they don’t even work if get_sidebar(); is below the tribe_breadcrumbs(); call.

    I have no idea why this would be. At the moment I’ve left get_sidebar(); in the code but hidden with CSS so the breadcrumbs display correctly but obviously it means I have lots of unnecessary HTML code being generated that really shouldn’t be there.

    Do you have any idea why this may be?

    in reply to: Major issue with breadcrumbs #1073856
    Shaun
    Participant

    I tested the current theme with all other plugins removed but the problem remained.

    I then tested in TwentyFifteen as you suggested and the breadcrumbs do indeed work as expected. With all current plugins still enabled too.

    So there is clearly something within the theme causing the issue.

    I’ve tried removing everything else from functions.php (there was some other stuff I’ve picked up from your forum to do various bits to the calendar like change the slugs etc.. that I thought may be conflicting) but no joy.

    I can’t think of anything else theme based that could be causing the problem so hopefully you have more of an idea?

    Thanks

    in reply to: Major issue with breadcrumbs #1071871
    Shaun
    Participant

    Hi Nico.

    Thanks again for your support. We’re almost there now but there’s still something not quite right.

    The root link is working properly on all pages (i.e linking to the Bid/Tender Training page) and the next part of the breadcrumb is correct for the root page, calendar and category lists.

    But the venue list pages – http://thorntonandlowe.com/venue/manchester/ – and single event page – http://thorntonandlowe.com/course/nhs-specific-manchester/ – only show the root link and nothing else.

    Sorry to be a pain, but I’d really appreciate your help to get these last 2 bits sorted now that we’re so close.

    Thanks again.

    in reply to: Major issue with breadcrumbs #1070922
    Shaun
    Participant

    Hi Nico,

    Firstly, thank you so much for your ongoing help with this, I really do appreciate it.

    However, unfortunately, the code still doesn’t seem to work.

    Initially, there were a couple of syntax errors thrown out. I’m no PHP expert but I think I sorted them out.

    It was lines 41 & 67 from your code above.

    Here’s the code with the changes I made:

    // Check if page is direct child
    function is_child( $page_id ) {
            global $post;
            if( is_page() && ($post->post_parent != '') ) {
                    return true;
            } else {
                    return false;
            }
    }
    
    // Breadcrumb Logic
    function tribe_breadcrumbs() {
            global $post;
    
            $separator = " » ";
    
            echo '<div class="tribe-breadcrumbs">';
            echo 'Bid/Tender Training';
    
            if( (tribe_is_list_view() || tribe_is_month()) && !is_tax() ) { // The Main Calendar Page
                    echo $separator;
                    echo 'Calendar';
            } elseif( (tribe_is_list_view() || tribe_is_month()) && is_tax() ) { // Calendar Category Pages
    
                    global $wp_;
                    $term_slug = $wp_->_vars['tribe_events_cat'];
                    $term = get_term_by('slug', $term_slug, 'tribe_events_cat');
                    get_term( $term_id, 'tribe_events_cat' );
                    $name = $term->name;
    
                    echo $separator;
                    echo $name;
            } elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List
                    echo $separator;
                    echo 'Events List';
            } elseif( tribe_is_event() && is_single() ) { // Single Events
    
                    if ( $terms = get_the_terms( $post->ID, 'tribe_events_cat' ) ) {
                            $term = array_pop($terms);
                            echo $separator;
                            echo 'slug', 'tribe_events_cat'.'">'.$term->name.'';
                    }
    
                    echo $separator;
                    the_title();
            } elseif( tribe_is_day() ) { // Single Event Days
                    global $wp_;
    
                    echo $separator;
                    echo 'Events';
                    echo $separator;
                    echo 'Events on: ' . date('F j, Y', strtotime( $wp_->_vars['eventDate']) );
            } elseif( tribe_is_venue() ) { // Single Venues
                    echo $separator;
                    the_title();
            } elseif ( is_category() || is_single() ) {
                    echo $separator;
                    the_category(' • ');
    
                    if ( is_single() ) {
                            echo ' '.$separator.' ';
                            the_title();
                    }
            } elseif ( is_page() ) {
                    if( is_child(get_the_ID()) ) {
                            echo $separator;
                            echo 'post_parent' . '">' . get_the_title( $post->post_parent ) . '';
                            echo $separator;
                            echo the_title();
                    } else {
                            echo $separator;
                            echo the_title();
                    }
            } elseif (is_search()) {
                    echo $separator.'Search Results for... ';
                    echo '"';
                    echo the_search_();
                    echo '"';
            }
            echo '</div>';
    }

    The calendar page is almost right – http://thorntonandlowe.com/training/month/ -. It shows the right text (Bid & Tender Training > Calendar) but the first item isn’t a link.

    But the other pages, whether is’s a category view – http://thorntonandlowe.com/training/category/bid-writing-course/ – or Venue view – http://thorntonandlowe.com/venue/manchester/ – just show ‘Bid/Tender Training’ but again not linked.

    That page itself (Bid & Tender Training) is the most interesting, it shows: Bid/Tender Training » post_parent”>Services » Bid & Tender Training – but again no links. http://thorntonandlowe.com/services/bid-tender-training/

    Hopefully it’s just a minor tweak to the code required, or perhaps it is due to those syntax errors and I didn’t actually fix them properly?

    Thanks again,

    Shaun

    in reply to: Major issue with breadcrumbs #1068002
    Shaun
    Participant

    Hi Nico,

    Thanks for offering to help, it’s very much appreciated.

    I don’t tink Site name is required on any view really. But, if it’s possible to have a page that isn’t actually part of the Calendar plugin as the first breadcrumb that would be great. As this page – http://thorntonandlowe.com/services/bid-tender-training/ – is essentially the starting point, rather than the plugin main view (I did this because I needed custom content on the page). It uses the same page template as the plugin.

    So all pages would start with ‘Bid/Tender Training’ (linked) and the different views would look like this:

    Main calendar: ‘Bid/Tender Training’ (linked) > Calendar (not linked) (if possible)
    Single Event: ‘Bid/Tender Training’ (linked) > Event Category (linked) > Event Name (not linked)
    Event Category: ‘Bid/Tender Training’ (linked) > Event Category (not linked)
    Venue View: ‘Bid/Tender Training’ (linked) > Venue name (not linked)

    I’m not sure if all of the above it definitely possible. If not, I’m happy to compromise and just get as close as it can be. Just some form of working breadcrumbs would be great.

    Thanks again for your help.

Viewing 12 posts - 16 through 27 (of 27 total)