• Resolved Robswaimea

    (@robswaimea)


    Because the topic on this spanned 19 posts… I figured it might be easier for others to cut it down to this “tutorial”

    This will be in a grid.

    This will be in two parts.
    Part 1 will be for you site… ie: mywebsite/events
    Part 2 will be for inserting in a generic post or page.

    Part 1 Putting the code in for “mywebsite/events” the default “events list page”.
    In Settings -> Events
    Events Manager Options
    –> Formating
    click ->Events (it expands to “Events Page”)

    There are three parts here…
    “Default event list format header”
    “Default event list format” this is like the “body”
    “Default event list format footer”
    =======================================
    “Default event list format header”

    <div class="row">
        <div class="col-3ex exmenu" >
          <ul>

    Then below that…
    “Default event list format”

    <li>
    	<div align="center" style="margin-right:5px;text-align: center;">#_EVENTIMAGE{125,69}<br />
    		<span style="font-size: 12pt;font-weight:bold;">#_EVENTNAME</span><br>
    		<span style="padding:2px;text-align: center;border:solid black 1px;border-radius:4px;background-color:#e6e6e6;font-color:#000000;font-size:16px;font-weight:bold;">#_EVENTDATES</span>
    	</div>
    		  </li>

    and Below that… the “footer”
    “Default event list format footer”

    </ul>
         </div>
    </div>

    ==============================
    The following code for all this was gleemed from
    https://www.w3schools.com/css/css_rwd_grid.asp

    The CSS to make this all work…
    Now you also need to know about CSS and where to put it for all the above to work.
    Put the CSS in your Child Theme…. or use a CSS Editor like the one in JetPack, or other type plugin.

    So for the above to work you would use CSS like this below.
    <style>

    * {
        box-sizing: border-box;
    }
    .row::after {
        content: "";
        clear: both;
        display: table;
    }
    [class*="col-"] {
           padding: 15px;
    }
    .col-3ex {width: 85%;}
    
    .exmenu ul {
        list-style-type: none;
        margin: 0;
        padding: 0;
       
    }
    .exmenu li {
        padding: 8px;
        margin-bottom: 7px;
        margin-right: 5px;
        background-color: #33b5e5;
        color: #ffffff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
        border:solid black 2px;
        border-radius:10px;
        display:inline-block;
        min-width:260px;   
        max-width:260px;   
        vertical-align:top;
      }
    .exmenu li:hover {
        background-color: #0099cc;
    }

    </style>

    ALWAYS make backups of your files and database before editing files…
    while this won’t hurt your database… it is a good practice to remember.

    ===========================================
    Part Two… Generic Post or Page
    Use the same CSS code as above…
    Then using “shortcodes” for Events List….
    Put this in… Obviously using the “text” not “vusual” editor…..

    <div class="row">
        <div class="col-3ex exmenu" >
          <ul>
    [events_list limit=3]
               <li>
    	<div align="center" style="margin-right:5px;text-align: center;">#_EVENTIMAGE{125,69}<br />
    		<span style="font-size: 12pt;font-weight:bold;">#_EVENTNAME</span><br>
    		<span style="padding:2px;text-align: center;border:solid black 1px;border-radius:4px;background-color:#e6e6e6;font-color:#000000;font-size:16px;font-weight:bold;">#_EVENTDATES</span>
    	</div>
    		  </li>
    [/events_list]
         </ul>
         </div>
    </div>

    =========================
    If you don’t know about placeholders… you need to learn and know them…
    https://wp-events-plugin.com/documentation/placeholders/

    If you haven’t already… learn about the shortcodes will help…
    https://wp-events-plugin.com/documentation/shortcodes/

    And the documentation…
    https://wp-events-plugin.com/documentation/

    =========================
    ALWAYS make backups of your files and database before editing files…
    while this won’t hurt your database… it is a good practice to remember.

    Hopefully I got the above correct from my previous lengthy thread…

    • This topic was modified 7 years, 9 months ago by Robswaimea.
    • This topic was modified 7 years, 9 months ago by Robswaimea.
    • This topic was modified 7 years, 9 months ago by bdbrown.
Viewing 7 replies - 1 through 7 (of 7 total)
  • This is great, thanks for sharing. Bookmarked and ready to share next time the question comes up. Thanks again.

    Thread Starter Robswaimea

    (@robswaimea)

    You are welcome Camin, Angelo, and Marcus and others…
    just my part of giving back.

    And thanks for the great plugin.

    Below is a slightly more complex “layout”….

    And to help others learn… use of “placeholders”

    This is for a generic post or page…
    if you would put this into the “Default Events List…”
    Remove the “shortcodes” and apply “Header” and “Footer” as described above.

    Also in place of the “placeholder” #_EVENTDATES I use the Event “date” with
    #D #d #M

    AND we are also using the Shortcode of Grouped. “weekly” .. which can also be
    daily, monthly, yearly, none.

    <div class="col-3ex menuex" >
      <ul>
     [events_list_grouped mode="weekly" limit="12" ]
    <li>
    <div style="float:left;margin-right:5px;">#_EVENTIMAGE{125,69}</div>
    <div><span style="padding:2px;text-align: center;border:solid black 1px;border-radius:4px;background-color:#e6e6e6;font-color:#000000;font-size:16px;font-weight:bold;">#D  #d  #M</span><br /><span style="background-color: #ffffff;padding-bottom:5px;"><a style="font-size: 10pt;color: red; font-weight:bold" href="#_EVENTURL">#_CATEGORYIMAGE{25,25} more info...</a></span></div>
    <div style="clear:both;"></div>
    <div>
    <span style="font-size: 12pt;font-weight:bold;">#_EVENTNAME</span><br>
    <span style="font-size: 12pt;color:#0000ff;font-weight:bold;">#_LOCATIONNAME</span><br />
    <span style="font-size: 12pt;color:#000000;font-weight:bold;">#_LOCATIONTOWN</span>
    <div style="clear:both;"></div>
    </li>
    [/events_list_grouped]
      </ul>
    </div>
    • This reply was modified 7 years, 9 months ago by Robswaimea.
    • This reply was modified 7 years, 9 months ago by Robswaimea.

    Where do you put the CSS at in your child theme? In the style.css one?

    Would love to know if you have a solution to display the events in columns, say 2×4? I can filter and limit the records returned by the shortcode but not sure how to display it in columns. Any advice would be much appreciated. Thanks.

    Hello! Thanks for the great post. I’m trying this on a new project (still in a testing area), but there’s a couple of things I don’t understand, and hoping you can help.

    My Events page is here https://www.webfactory.com.au/testsites/around/hunter-valley-events/

    It seems to be working generally as I would expect, but I don’t understand your instructions above “Part Two… Generic Post or Page“. The only way I’ve ever used Events Manager is that the word CONTENTS is inserted in the page, which then displays the listed Events. Do you put your code above instead of the word CONTENTS? Sorry if that’s a stupid question.

    My other issue is how to make the 3 columns fill the whole page. Right now I have it set to max-width:290px – if I change that to 300px, it changes to only 2 columns with a huge gap down the right hand side – am I missing something?

    Any advice you can offer would be greatly appreciated.

    Regards
    Melanie

    Lot of code! Lol.
    I solved this in another way.

    But you are using fixed widths (290px). Why not use relative widths? 30%. That will still leave 3×3% for padding etc.

    Also make the first column float:left en the 2nd and 3rd float:none.

    That will probably solve a lot. ??

    Thanks Patrick! OK, I have sort of got this solved, but now realise the columns don’t switch to one column wide on a smartphone, so it looks pretty bad on a small screen. Any ideas of how to fix that? https://pasteboard.co/GKqSj4v.png

    I’ve also got another site where I’ve implemented this code, which is having the same problem https://www.touristdrive33.com.au/events/

    Regards
    Melanie

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Tutorial: Events List Grid’ is closed to new replies.