Skip to content

Instantly share code, notes, and snippets.

export default {
/*
** Nuxt rendering mode
** See https://nuxtjs.org/api/configuration-mode
*/
/*
** Nuxt target
** See https://nuxtjs.org/api/configuration-target
*/
@somaria
somaria / index.html
Created August 25, 2018 14:33
List of Numbers With Index
<div id="root">
<!-- This element's contents will be replaced with your component. -->
</div>
@somaria
somaria / gist:e8a01b064a4fd27152d4
Created November 23, 2015 14:15
Prompt a message when image size is too small
var d = new Date();
var mth = d.getMonth() + 1;
var str1;
if (mth == 11) {
str1 = '//localhost/wordpress/wp-content/uploads/2015/11/';
}
else if (mth == 12) {
str1 = '//localhost/wordpress/wp-content/uploads/2015/12/';
}
@somaria
somaria / gist:2deaef0ad3048d4cbcea
Last active November 23, 2015 11:16
Display Youtube Link in WP Post
/*Display Youtube Link*/
add_filter('the_content', 'add_my_content');
function add_my_content($content) {
$my_custom_text = get_post_meta(get_the_ID(), 'youtube_link', $single = true);
$embed_code = wp_oembed_get($my_custom_text, array('width'=>720, 'height'=>420));
if ($my_custom_text) {
$content .= $embed_code;
$content .= '<p></p>';