{"id":1045336,"date":"2015-12-22T06:36:06","date_gmt":"2015-12-22T14:36:06","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/"},"modified":"2015-12-22T06:53:04","modified_gmt":"2015-12-22T14:53:04","slug":"title-2","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/","title":{"rendered":"[[=title]]"},"content":{"rendered":"<p>Hello,<\/p>\n<p>my title are like this :<br \/>\n&#8220;Stage photo niveau les bases du 9 janvier 2016&#8221;<\/p>\n<p>but for obvious reason I want it shorter in the calendar and in the tooltip.<\/p>\n<p>My solution in single-event.php that shorten title into calendar : <\/p>\n<p>I did replace :<\/p>\n<blockquote><p>\n<a>&#8221; rel=&#8221;bookmark&#8221;&gt;&lt;?php echo substr(the_title($before = &#8221;, $after = &#8221;, FALSE), 19) ;?&gt; <\/a>\n <\/p><\/blockquote>\n<p>by:<\/p>\n<blockquote><p>\n<a>&#8221; rel=&#8221;bookmark&#8221;&gt;&lt;?php echo substr(the_title($before = &#8221;, $after = &#8221;, FALSE), 0, calculate_how_many_letter( (the_title($before = &#8221;, $after = &#8221;, FALSE) ))) ;?&gt; <\/a>\n<\/p><\/blockquote>\n<p>where the function added to my child theme is:<\/p>\n<blockquote><p>\n\/**<br \/>\n* 12.0 &#8211; Function to calculate how many letter to delete from title<br \/>\n* to get only course name without date<br \/>\n*<br \/>\n*\/<\/p>\n<p>function calculate_how_many_letter ($which_title){<\/p>\n<p>\tif (stripos($which_title, &#8216;janvier&#8217;))<br \/>\n\t{<br \/>\n\t\treturn -18;<br \/>\n\t}<br \/>\n\telseif (stripos($which_title, &#8216;f\u00e9vrier&#8217;))<br \/>\n\t{<br \/>\n\t\treturn -18;<br \/>\n\t}<br \/>\n\t\telseif (stripos($which_title, &#8216;mars&#8217;))<br \/>\n\t{<br \/>\n\t\treturn -15;<br \/>\n\t}<br \/>\n\telseif (stripos($which_title, &#8216;avril&#8217;))<br \/>\n\t{<br \/>\n\t\treturn -16;<br \/>\n\t}<br \/>\n\telseif (stripos($which_title, &#8216;mai&#8217;))<br \/>\n\t{<br \/>\n\t\treturn -14;<br \/>\n\t}<br \/>\n\telseif (stripos($which_title, &#8216;juin&#8217;))<br \/>\n\t{<br \/>\n\t\treturn -15;<br \/>\n\t}<br \/>\n\telseif (stripos($which_title, &#8216;juillet&#8217;))<br \/>\n\t{<br \/>\n\t\treturn -18;<br \/>\n\t}<br \/>\n\telseif (stripos($which_title, &#8216;ao\u00fbt&#8217;))<br \/>\n\t{<br \/>\n\t\treturn -15;<br \/>\n\t}<br \/>\n\telseif (stripos($which_title, &#8216;septembre&#8217;))<br \/>\n\t{<br \/>\n\t\treturn -20;<br \/>\n\t}<br \/>\n\telseif (stripos($which_title, &#8216;octobre&#8217;))<br \/>\n\t{<br \/>\n\t\treturn -18;<br \/>\n\t}<br \/>\n\telseif (stripos($which_title, &#8216;novembre&#8217;))<br \/>\n\t{<br \/>\n\t\treturn -19;<br \/>\n\t}<br \/>\n\telseif (stripos($which_title, &#8216;d\u00e9cembre&#8217;))<br \/>\n\t{<br \/>\n\t\treturn -19;<br \/>\n\t}<br \/>\n\telse<br \/>\n\t{<br \/>\n\t\treturn 0;<br \/>\n\t}<\/p>\n<p>}<\/p><\/blockquote>\n<p>My question :<br \/>\nI need to do so on tooltip but I don&#8217;t know how to do so because you can&#8217;t manipulate &#8220;handelbars&#8221; with php.<\/p>\n<p>So if you can provide any idea to help to find a solution&#8230;<\/p>\n<p>Thanks for any help !<\/p>\n","protected":false},"template":"","class_list":["post-1045336","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[[=title]] -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[[=title]] -\" \/>\n<meta property=\"og:description\" content=\"Hello, my title are like this : &#8220;Stage photo niveau les bases du 9 janvier 2016&#8221; but for obvious reason I want it shorter in the calendar and in the tooltip. My solution in single-event.php that shorten title into calendar : I did replace : &#8221; rel=&#8221;bookmark&#8221;&gt;&lt;?php echo substr(the_title($before = &#8221;, $after = &#8221;, FALSE), [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-12-22T14:53:04+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/\",\"name\":\"[[=title]] -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-12-22T14:36:06+00:00\",\"dateModified\":\"2015-12-22T14:53:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"[[=title]]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[[=title]] -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/","og_locale":"en_US","og_type":"article","og_title":"[[=title]] -","og_description":"Hello, my title are like this : &#8220;Stage photo niveau les bases du 9 janvier 2016&#8221; but for obvious reason I want it shorter in the calendar and in the tooltip. My solution in single-event.php that shorten title into calendar : I did replace : &#8221; rel=&#8221;bookmark&#8221;&gt;&lt;?php echo substr(the_title($before = &#8221;, $after = &#8221;, FALSE), [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/","article_modified_time":"2015-12-22T14:53:04+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/","name":"[[=title]] -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-12-22T14:36:06+00:00","dateModified":"2015-12-22T14:53:04+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"[[=title]]"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1045336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1045336\/revisions"}],"predecessor-version":[{"id":1045346,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1045336\/revisions\/1045346"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1045336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}