Skip to content

Instantly share code, notes, and snippets.

@milanaryal
milanaryal / schema-org-structured-data-markup-using-microdata.html
Last active March 23, 2025 04:33
An example of how to mark up a HTML5 webpage using the schema.org schemas and microdata.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Site Title</title>
<link rel="stylesheet" href="/assets/css/style.min.css">
<?php
/**
* FILTER WIDGETS IN WP ADMIN
* assuming you already enqueued some of your js / css in WP admin ( customAdminCode() ) :
* include (or separately enqueue) this jQuery plugin - https://github.com/cheeaun/jquery.livefilter
* all code (php,js,css) is here, but you should separate it, off course ... ;)
*/
function customAdminCode() {
wp_register_script('my-admin-js', get_template_directory_uri(). '/js/admin/admin.js');
@cdsaenz
cdsaenz / bs5-navwalker.php
Last active April 22, 2025 18:17
Wordpress Bootstrap 5 Nav Walker With Multiple Levels
<?php
/**
* CSDev - Bootstrap 5 wp_nav_menu walker
* Supports WP MultiLevel menus
* Based on https://github.com/AlexWebLab/bootstrap-5-wordpress-navbar-walker
* Requires additional CSS fixes
* CSS at https://gist.github.com/cdsaenz/d401330ba9705cfe7c18b19634c83004
* CHANGE: removed custom display_element. Just call the menu with a $depth of 3 or more.
*/
class bs5_Walker extends Walker_Nav_menu