This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Ref: http://qnimate.com/creating-a-one-page-wordpress-theme/ | |
#Create a Template file for Home Page | |
<?php /* Template Name: Single Page Theme Page */ ?> | |
#Programmatically Creating and Setting Home Page | |
<?php | |
if(get_page_by_title("Home") == null) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var defaults = { | |
number: 1, | |
bool: true, | |
magic: 'real', | |
animal: 'whale', | |
croutons: 'delicious' | |
}; | |
var options = { | |
number: 2, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: WPTutsPlus Post-listing shortcode | |
Plugin URI: http://rachelmccollin.co.uk | |
Description: This plugin provides a shortcode to list posts, with parameters. It also registers a couple of post types and tacxonomies to work with. | |
Version: 1.0 | |
Author: Rachel McCollin | |
Author URI: http://rachelmccollin.co.uk | |
License: GPLv2 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('admin_init', function () { | |
// register a new setting for "wporg" page | |
register_setting('wporg', 'wporg_options'); | |
// register a new section in the "wporg" page | |
add_settings_section( | |
'wporg_section_developers', | |
__('The Matrix has you.', 'wporg'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// 1. Habilitar clic derecho | |
(function (d) { | |
d.oncontextmenu = function () { | |
return true; | |
}; | |
d.addEventListener("click", function () { | |
console.log("El clic derecho regresó..."); | |
}); | |
})(document); |
OlderNewer