WordPress - Adding Custom Shortcodes

413 days ago

The snippet below can be added to your mu-plugins folder, custom plugin or functions.php file.

<?php

/**
* A function that handles your shortcode code
* The returned result will be outputted
*/
function hoog_shortcode() { 
    // Add your logic here
    return "this is a test";
}

add_shortcode('hoog_shortcode', 'hoog_shortcode');
Dylan Hoogeveen Dylan Hoogeveen