GithubHelp home page GithubHelp logo

otomaties-events's Introduction

Otomaties Events

Add event functionality to your wordpress website

Prerequisites

  • PHP 8.x
  • ACF PRO

Installation

composer require tombroucke/otomaties-events

The plugin could be installed by cloning this repo and performing calling composer install from the root directory, but there will be no updates.

Layout

Templates

This plugin doesn't provide any templates. You should add archive-events.php and content-event.php yourself.

Bootstrap

The registration form uses default bootstrap classes. Following classes should be whitelisted from purgecss

  • alert
  • alert-danger
  • alert-success
  • btn
  • btn-primary
  • col-md-6
  • form-control
  • g-3
  • input-group
  • input-group-text
  • mb-3
  • mb-5
  • row

Layout filters

Some filters are provided to swap bootstrap for another css framework

  • otomaties_events_section_class
  • otomaties_events_input_container_class
  • otomaties_events_input_class
  • otomaties_events_submit_class

Archive

You can display an archive using a custom template or whatever. To be able to query events in the past, use 'event_scope' => 'past'. Example implementation (sage):

Event query

$args = [
	'post_type' => 'event',
	'posts_per_page' => get_option('posts_per_page'),
	'paged' => (get_query_var('paged')) ? get_query_var('paged') : 1,
	'event_scope' => 'past',
];
$eventQuery = new \WP_Query($args);
@while($eventQuery->have_posts()) @php($eventQuery->the_post())
	@include('partials.content-event')
@endwhile
@include('partials.pagination', ['wpQuery' => $eventQuery]) // Pagination: https://github.com/tombroucke/otomaties-sage-helper/blob/master/publishes/app/View/Composers/Pagination.php, https://github.com/tombroucke/otomaties-sage-helper/blob/master/publishes/resources/views/partials/pagination.blade.php

Customization

Render registration form in content

The registration form will be appended to the page content by default.

  1. add_filter('otomaties_events_show_registration_form', '__return_false');
  2. Use shortcode [otomaties-events-registration-form] to display form in different section

Todo

WPML support

otomaties-events's People

Contributors

tombroucke avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.