Skip to content

epfllibrary/wp-plugin-epfl-library

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EPFL Library Plugins

WordPress plugin developed for the EPFL Library to automatically integrate dedicated search bars on specific Library website pages.

Features

  • Automatically adds a BEAST search bar on Library pages.
  • Automatically adds an Infoscience search bar on dedicated pages.
  • Multilingual support (FR / EN).
  • Option to hide the search bar via post meta:
    • hide_searchbar (recommended name)
    • hide_beastbox (legacy compatibility).
  • Final placement of the search bar is handled on the frontend via JavaScript (jQuery).

Technical Overview

PHP (plugin)

  • Generates the HTML for the search bars.
  • Determines when the bars should be displayed.
  • Loads the required CSS/JS assets.

JavaScript (assets/searchbars.js)

  • Dynamically positions the search bar in the DOM depending on the active WordPress theme structure.
  • Handles form behavior when needed.

CSS (assets/searchbars.css)

  • Provides shared styling for both search bars.

Development and Testing

To facilitate development and testing, a dedicated WordPress development environment has been created by the EPFL Library.

👉 https://github.com/epfllibrary/epfl-library-wp-devkit

This environment allows you to:

  • Quickly install WordPress with the required dependencies.
  • Test Library plugins in conditions close to production.
  • Simplify development and debugging.

Author

Sylvain Vuilleumier
EPFL Library, École polytechnique fédérale de Lausanne

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • PHP 51.0%
  • CSS 33.5%
  • JavaScript 15.5%