{"id":926206,"date":"2014-12-29T04:42:55","date_gmt":"2014-12-29T12:42:55","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/"},"modified":"2015-01-02T15:48:15","modified_gmt":"2015-01-02T23:48:15","slug":"how-to-add-a-class-to-links-generated-by-the-prev-next-event-link","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/","title":{"rendered":"How to add a class to links generated by the prev &amp; next event link?"},"content":{"rendered":"<p>Hi,<\/p>\n<p>How do I add a class to the links generated by tribe_the_prev_event_link and tribe_the_next_event_link?<\/p>\n<p>I tried the adding following code to the functions file, but it didn&#8217;t work. Not sure what I&#8217;m missing.<\/p>\n<p>add_filter(&#8216;tribe_the_prev_event_link_attributes&#8217;, &#8216;posts_link_attributes_1&#8217;);<br \/>\nadd_filter(&#8216;tribe_the_next_event_link_attributes&#8217;, &#8216;posts_link_attributes_2&#8217;);<\/p>\n<p>function posts_link_attributes_1() {<br \/>\n    return &#8216;class=&#8221;prev-post&#8221;&#8216;;<br \/>\n}<br \/>\nfunction posts_link_attributes_2() {<br \/>\n    return &#8216;class=&#8221;next-post&#8221;&#8216;;<br \/>\n}<\/p>\n","protected":false},"template":"","class_list":["post-926206","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>How to add a class to links generated by the prev &amp; next event link? -<\/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\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to add a class to links generated by the prev &amp; next event link? -\" \/>\n<meta property=\"og:description\" content=\"Hi, How do I add a class to the links generated by tribe_the_prev_event_link and tribe_the_next_event_link? I tried the adding following code to the functions file, but it didn&#8217;t work. Not sure what I&#8217;m missing. add_filter(&#8216;tribe_the_prev_event_link_attributes&#8217;, &#8216;posts_link_attributes_1&#8217;); add_filter(&#8216;tribe_the_next_event_link_attributes&#8217;, &#8216;posts_link_attributes_2&#8217;); function posts_link_attributes_1() { return &#8216;class=&#8221;prev-post&#8221;&#8216;; } function posts_link_attributes_2() { return &#8216;class=&#8221;next-post&#8221;&#8216;; }\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-01-02T23:48:15+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/\",\"name\":\"How to add a class to links generated by the prev &amp; next event link? -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2014-12-29T12:42:55+00:00\",\"dateModified\":\"2015-01-02T23:48:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/#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\":\"How to add a class to links generated by the prev &amp; next event link?\"}]},{\"@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":"How to add a class to links generated by the prev &amp; next event link? -","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\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/","og_locale":"en_US","og_type":"article","og_title":"How to add a class to links generated by the prev &amp; next event link? -","og_description":"Hi, How do I add a class to the links generated by tribe_the_prev_event_link and tribe_the_next_event_link? I tried the adding following code to the functions file, but it didn&#8217;t work. Not sure what I&#8217;m missing. add_filter(&#8216;tribe_the_prev_event_link_attributes&#8217;, &#8216;posts_link_attributes_1&#8217;); add_filter(&#8216;tribe_the_next_event_link_attributes&#8217;, &#8216;posts_link_attributes_2&#8217;); function posts_link_attributes_1() { return &#8216;class=&#8221;prev-post&#8221;&#8216;; } function posts_link_attributes_2() { return &#8216;class=&#8221;next-post&#8221;&#8216;; }","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/","article_modified_time":"2015-01-02T23:48:15+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/","name":"How to add a class to links generated by the prev &amp; next event link? -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2014-12-29T12:42:55+00:00","dateModified":"2015-01-02T23:48:15+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-add-a-class-to-links-generated-by-the-prev-next-event-link\/#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":"How to add a class to links generated by the prev &amp; next event link?"}]},{"@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\/926206","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\/926206\/revisions"}],"predecessor-version":[{"id":926309,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/926206\/revisions\/926309"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=926206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}