{"id":7181015,"date":"2016-03-17T10:31:47","date_gmt":"2016-03-17T10:31:47","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/events-list-visualisation-problem\/"},"modified":"2016-08-31T14:47:29","modified_gmt":"2016-08-31T14:47:29","slug":"events-list-visualisation-problem","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/events-list-visualisation-problem\/","title":{"rendered":"Events List visualisation problem"},"content":{"rendered":"<p>Hi,<br \/>\nI&#8217;m sorry if I write again about a problem I wrote some week ago, but I haven&#8217;t yet resolve it \ud83d\ude41<\/p>\n<p>I explain better my problem:<\/p>\n<p><strong>I need to display events list filtered by date (Today, Tomorrow, One choosen date) in my home page, each in one distinct tab. <\/strong><\/p>\n<p>So I tried some shortcode to do it, this is my situation:<\/p>\n<p>1) for Today and Tomorrow I use this shortcode:<br \/>\n<code>[custom_events]tomorrow[\/custom_events]<\/code><br \/>\nand this the implementation:<\/p>\n<pre><code>function display_custom_events( $attr, $content = null ) {\nob_start();\necho do_shortcode(&#039;[events_list scope=&quot;&#039; . $content. &#039;&quot; limit=5 pagination=1 ][\/events_list]&#039;);\nreturn ob_get_clean();\n}\nadd_shortcode(&#039;custom_events&#039;, &#039;display_custom_events&#039;);<\/code><\/pre>\n<p>2) for single date choosen I use:<\/p>\n<p><code>[custom_search][\/custom_search]<\/code><br \/>\nand this implementation:<\/p>\n<pre><code>function display_custom_search( $attr, $content = null ) {\n\n\t$search_args = em_get_search_form_defaults();\n\tem_locate_template(&#039;templates\/events-search.php&#039;, true, array(&#039;args&#039;=&gt;$search_args));\n\n\t$args[&#039;limit&#039;] = !empty($args[&#039;limit&#039;]) ? $args[&#039;limit&#039;] : get_option(&#039;dbem_events_default_limit&#039;);\n\t\t\t\t\t\tif( !empty($args[&#039;ajax&#039;]) ){ echo &#039;&lt;div class=&quot;em-search-ajax&quot;&gt;&#039;; } \/\/AJAX wrapper open\n\t\t\t\t\t\tif( get_option(&#039;dbem_event_list_groupby&#039;) ){\n\t\t\t\t\t\t\tem_locate_template(&#039;templates\/events-list-grouped.php&#039;, true, array(&#039;args&#039;=&gt;$args));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tem_locate_template(&#039;templates\/events-list.php&#039;, true, array(&#039;args&#039;=&gt;$args));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( !empty($args[&#039;ajax&#039;]) ) echo &quot;&lt;\/div&gt;&quot;; \/\/AJAX wrapper close\n\n    \/*return &#039;&lt;a href=&quot;http:\/\/twitter.com\/filipstefansson&quot; class=&quot;twitter-button&quot;&gt;&#039; . $content . &#039;&lt;\/a&gt;&#039;;*\/\n}\nadd_shortcode(&#039;custom_search&#039;, &#039;display_custom_search&#039;);<\/code><\/pre>\n<p>For the first filter the result is:<br \/>\n<a href=\"https:\/\/www.dayroma.it\/wp-content\/uploads\/2016\/03\/filter-1.jpg\">https:\/\/www.dayroma.it\/wp-content\/uploads\/2016\/03\/filter-1.jpg<\/a><\/p>\n<p>with a lot of margin problem.<\/p>\n<p>The second filter works better:<br \/>\n<a href=\"https:\/\/www.dayroma.it\/wp-content\/uploads\/2016\/03\/filter-2.jpg\">https:\/\/www.dayroma.it\/wp-content\/uploads\/2016\/03\/filter-2.jpg<\/a><\/p>\n<p>For css table I use this css:<\/p>\n<pre><code>.myTableEvents {\n\tmargin:0px;padding:0px;\n\twidth:100%;\n\tbox-shadow: 10px 10px 5px #777777;\n\tborder:1px solid #cccccc;\n\n\t-moz-border-radius-bottomleft:0px;\n\t-webkit-border-bottom-left-radius:0px;\n\tborder-bottom-left-radius:0px;\n\n\t-moz-border-radius-bottomright:0px;\n\t-webkit-border-bottom-right-radius:0px;\n\tborder-bottom-right-radius:0px;\n\n\t-moz-border-radius-topright:0px;\n\t-webkit-border-top-right-radius:0px;\n\tborder-top-right-radius:0px;\n\n\t-moz-border-radius-topleft:0px;\n\t-webkit-border-top-left-radius:0px;\n\tborder-top-left-radius:0px;\n}.myTableEvents table{\n    border-collapse: collapse;\n        border-spacing: 0;\n\twidth:100%;\n\theight:100%;\n\tmargin:0px;padding:0px;\n}.myTableEvents tr:last-child td:last-child {\n\t-moz-border-radius-bottomright:0px;\n\t-webkit-border-bottom-right-radius:0px;\n\tborder-bottom-right-radius:0px;\n}\n.myTableEvents table tr:first-child td:first-child {\n\t-moz-border-radius-topleft:0px;\n\t-webkit-border-top-left-radius:0px;\n\tborder-top-left-radius:0px;\n}\n.myTableEvents table tr:first-child td:last-child {\n\t-moz-border-radius-topright:0px;\n\t-webkit-border-top-right-radius:0px;\n\tborder-top-right-radius:0px;\n}\n.myTableEvents tr:last-child td:first-child{\n\t-moz-border-radius-bottomleft:0px;\n\t-webkit-border-bottom-left-radius:0px;\n\tborder-bottom-left-radius:0px;\n}\n\n.myTableEvents tr:hover td{\n\n}\n.myTableEvents tr:nth-child(odd){ background-color:#f2f2f2; }\n.myTableEvents tr:nth-child(even)    { background-color:#ffffff; }\n.myTableEvents td{\n\n\tborder:1px solid #cccccc;\n\tborder-width:0px 1px 1px 0px;\n\ttext-align:left;\n\tfont-size:15px;\n\tfont-family:Arial;\n\tcolor:#666666;\n\n}\n.myTableEvents tr:last-child td{\n\tborder-width:0px 1px 0px 0px;\n}\n.myTableEvents tr td:last-child{\n\tborder-width:0px 0px 1px 0px;\n}\n.myTableEvents tr:last-child td:last-child{\n\tborder-width:0px 0px 0px 0px;\n}\n\n\/*\n.myTableEvents tr:hover td{\n\tbackground:-o-linear-gradient(bottom, #ff3333 5%, #ff3333 100%);\tbackground:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ff3333), color-stop(1, #ff3333) );\n\tbackground:-moz-linear-gradient( center top, #ff3333 5%, #ff3333 100% );\n\tfilter:progid:DXImageTransform.Microsoft.gradient(startColorstr=&quot;#ff3333&quot;, endColorstr=&quot;#ff3333&quot;);\tbackground: -o-linear-gradient(top,#ff3333,#ff3333);\n\n\tbackground-color:#ffe5e5;\n}*\/\n\n.myTableEvents tr:first-child td:first-child{\n\tborder-width:0px 0px 1px 0px;\n}\n.myTableEvents tr:first-child td:last-child{\n\tborder-width:0px 0px 1px 1px;\n}<\/code><\/pre>\n<p>and I use this code in EM backend header<\/p>\n<pre><code>&lt;table class=&quot;myTableEvents&quot; &gt;\n    &lt;thead&gt;\n        &lt;tr&gt;\n\t\t&lt;th width=&quot;20%&quot;&gt;&lt;\/th&gt;\n\t\t&lt;th width=&quot;80%&quot;&gt;&lt;\/th&gt;\n\t&lt;\/tr&gt;\n   \t&lt;\/thead&gt;\n    &lt;tbody&gt;<\/code><\/pre>\n<p>and<\/p>\n<pre><code>&lt;tr&gt;&lt;div id=&quot;event_container&quot; &gt;\n      &lt;td&gt;\n               #_EVENTIMAGE{200,200}\n      &lt;\/td&gt;\n            &lt;td&gt;\n               &lt;div id=&quot;event_title&quot;&gt;#_EVENTLINK&lt;\/div&gt;\n\n               &lt;div id=&quot;event_info&quot;&gt; #_EVENTDATES, #_EVENTTIMES, #_LOCATIONADDRESS, #_LOCATIONNAME &lt;\/div&gt;\n&lt;div id=&quot;booking_button&quot;&gt;#_BOOKINGBUTTON &lt;\/div&gt;\n &lt;div id=&quot;list_attendees&quot;&gt;#_ATTENDEESLIST&lt;\/div&gt;\n            &lt;\/td&gt;\n&lt;\/div&gt;&lt;\/tr&gt;<\/code><\/pre>\n<p>in the body.<\/p>\n<p>I really need some help to resolve this css visualisation problem.<br \/>\nI think that some problem is due to pre tag, but I don&#8217;t know where to remove it creation.<\/p>\n<p><strong>My aim is having an event list with the format of the second picture<\/p>\n<p><a href=\"https:\/\/www.dayroma.it\/wp-content\/uploads\/2016\/03\/filter-2.jpg\">https:\/\/www.dayroma.it\/wp-content\/uploads\/2016\/03\/filter-2.jpg<\/a><\/p>\n<p>with a filter by today and tomorrow date, without blank space you see in the bottom.<\/strong><\/p>\n<p>Sorry if I already asked,<br \/>\nThank you everybody.<\/p>\n","protected":false},"template":"","class_list":["post-7181015","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7181015","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7181015\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7181015"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}