Skip to content

Instantly share code, notes, and snippets.

View edwinmasripan's full-sized avatar
💭
Feeling confused

edwinmasripan edwinmasripan

💭
Feeling confused
View GitHub Profile
@edwinmasripan
edwinmasripan / adaptive-fonts.css
Created November 23, 2021 09:31
Adaptive Font Settings for Oxygen Builder
/*
Zero-rize all the fonts on Oxygen Builder.
*/
h1 {font-size:4em}
h2 {font-size:3em}
h3 {font-size:2em}
h4 {font-size:1.5em}
h1,h2,h3,h4 {letter-spacing:-.01em; line-height:0.95em;}
p {font-size:.83em; margin: 0 0 1.5em}
@media (max-width:1200px){
@edwinmasripan
edwinmasripan / owl-spacing.css
Created November 23, 2021 09:28
Owl Spacing
/* Owl Spacing */
.ct-section.owl-spacing--s .ct-section-inner-wrap > * + *,
.owl-spacing--s:not(.ct-section) > * + * {
margin-top: .5vmax;
}
.ct-section.owl-spacing--m .ct-section-inner-wrap > * + *,
.owl-spacing--m:not(.ct-section) > * + * {
margin-top: 1vmax;
@edwinmasripan
edwinmasripan / wp-config.php
Last active June 5, 2020 04:21
Change the Site URL wp-config.php
// Refer to WP codes https://wordpress.org/support/article/changing-the-site-url/
define( 'WP_HOME', 'http://demo7.cc' );
define( 'WP_SITEURL', 'http://demo7.cc' );
@edwinmasripan
edwinmasripan / functions.php
Created April 20, 2020 06:52
Change WP Password using Functions.php
<?php
$user_id = 1;
$password = 'XXXXXX';
wp_set_password( $password, $user_id );
?>
@edwinmasripan
edwinmasripan / htaccess.txt
Last active June 10, 2020 02:39
htaccess for RunCloud WordPress Redirect HTTP to HTTPS
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R,L]
# Add this in your cache settings or add to .htaccess on top of Swift
@edwinmasripan
edwinmasripan / functions.php
Created April 9, 2020 03:53
Remove WP Emoji
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
@edwinmasripan
edwinmasripan / functions.php
Created April 9, 2020 03:10
Custom Name on "View Source Code" in WP
// You can get yours at http://patorjk.com/software/taag/#p=display&f=3D-ASCII&t=laman7
// Paste this code in child-theme/functions.php
function add_head_html() {
echo '<!--
___ ________ _____ ______ ________ ________ ________
|\ \ |\ __ \|\ _ \ _ \|\ __ \|\ ___ \ |\_____ \
\ \ \ \ \ \|\ \ \ \\\__\ \ \ \ \|\ \ \ \\ \ \ \|___/ /|
\ \ \ \ \ __ \ \ \\|__| \ \ \ __ \ \ \\ \ \ / / /
\ \ \____\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \\ \ \ / / /
@edwinmasripan
edwinmasripan / functions.php
Last active June 4, 2020 07:56
GTM Codes for WordPress using Functions.php for OceanWP
//Add GTM to Site Header by Edwin Laman7.com
function l7_gtm_head() { echo "
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-YOUR-ID');</script>
<!-- End Google Tag Manager -->";
}