Skip to content

Instantly share code, notes, and snippets.

View josecarlospsh's full-sized avatar
💻
Working from home

Jose Carlos Pajuelo josecarlospsh

💻
Working from home
View GitHub Profile
@josecarlospsh
josecarlospsh / passUTM.js
Created February 4, 2021 00:21 — forked from dillansimmons/passUTM.js
Pass current UTMS to in page links Javascript
// JS for grabbing utm params and parsing into url
var getRefQueryParam = function() {
var temp = {};
document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g, function() {
var decode = function(s) {
return decodeURIComponent(s.split("+").join(" "));
};
temp[decode(arguments[1])] = decode(arguments[2]);
});
return temp;
<?php
function my_custom_submenu() {
global $post;
$menu_items = wp_get_nav_menu_items('Menu');
$current_menu_id = 0;
// get current top level menu item id
foreach ( $menu_items as $item ) {

Finishing this guide you'll get:

  • A running WordPress installation
  • Nginx proxy with PHP and Fast CGI
  • MySQL server accessible with phpMyAdmin

Specification of latest running installation:

  • Date: 03.03.2014