Skip to content

Instantly share code, notes, and snippets.

View tajim's full-sized avatar
💭
Available for WP Jobs!!!

Mohammad Tajim tajim

💭
Available for WP Jobs!!!
  • SingleRange Technology Pvt. Ltd.
  • Kathmandu, Nepal
View GitHub Profile
@OriginalEXE
OriginalEXE / pe-customize-controls.css
Last active July 9, 2025 11:22
Extending WordPress Customizer Panels and Sections to allow nesting
.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent,
#customize-theme-controls .customize-pane-child.current-section-parent {
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
transform: translateX(-100%);
}
@rajuahmmed
rajuahmmed / wp-escaping-translated-strings.php
Last active December 5, 2016 14:41
Escaping wordpress translated strings by https://www.cantothemes.com
<?php
/**
* Example of escaping __() function
*/
// Unescaped
echo __("Example String", "textdomain");
// Escaped from HTML : XSS safe
echo esc_html__("Example String", "textdomain");
@itzikbenh
itzikbenh / home.php
Last active April 5, 2020 09:30
Very simple infinite scroll in WordPress.
//Just a random file for loading your posts to see that the infinite scroll works.
<?php get_header(); ?>
<div class="col-md-6 col-md-offset-3">
<div class="post-container">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="page-header post">
<h1><?php the_title(); ?></h1>
<p><?php the_excerpt(); ?></p>
</div>
<?php
/**
* Debugging WordPress things.
*
* All of this belongs in your wp-config.php file.
*
* This will make sure that the code you release is, at a minimum,
* relatively free of PHP notices and warnings.
*
* - WP_DEBUG: This turns on debugging mode.
@hotzeplotz
hotzeplotz / hide-editor.js
Created August 21, 2012 10:07
Hide WordPress editor box while editing a page if a specific template is selected
jQuery(document).ready(function($) {
var editorElement = '#postdivrich';
var podsPrefix = /^pods-/;
function hideElementIfUnused(element, match, val) {
if(match.test(val)) {
$(element).hide();
} else {
$(element).show();
}