Skip to content

Instantly share code, notes, and snippets.

@pradeepdotco
pradeepdotco / featured-image-link.php
Created May 6, 2020
Adding Link to the featured Image - Genesis
View featured-image-link.php
View edit-post-link.php
<?php edit_post_link( $link, $before, $after, $id, $class ); ?>
@pradeepdotco
pradeepdotco / social-media-widget-jetpack.css
Created Nov 7, 2017
Social media icons Jetpack widget
View social-media-widget-jetpack.css
.widget_wpcom_social_media_icons_widget .genericon {
font-size: 16px;
}
@pradeepdotco
pradeepdotco / Nginx config
Created Aug 25, 2017
Nginx config for HTTP to HTTPS
View Nginx config
server {
listen 80;
server_name domain.com www.domain.com;
return 301 https://domain.com$request_uri;
}
@pradeepdotco
pradeepdotco / .htacess file
Created Jul 16, 2017
Redirection code from HTTP to HTTPS
View .htacess file
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
@pradeepdotco
pradeepdotco / 404.php
Created Jun 29, 2017
2017 WordPress Theme 404 Page
View 404.php
<?php
/**
* The template for displaying 404 pages (not found)
*
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
View WP-memory-limit.php
define( 'WP_MEMORY_LIMIT', '96M' );
@pradeepdotco
pradeepdotco / fatal-error-memory-wp.php
Created Oct 5, 2016
WordPress Memory Fatal Error
View fatal-error-memory-wp.php
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 913085 bytes) in /home/content/xx/91/2867391/html/wp-includes/wp-db.php on line 3023
@pradeepdotco
pradeepdotco / output_category_info-genesis.php
Created Aug 27, 2016
Add Title and Description for WordPress category page
View output_category_info-genesis.php
// Add Title and Description for WordPress category page
add_action( 'genesis_before_loop', 'wpism_output_category_info' );
function wpism_output_category_info() {
if ( is_category() || is_tag() || is_tax() ) {
echo single_term_title();
echo term_description();
}
}
@pradeepdotco
pradeepdotco / Facebook SDK for JavaScript WordPress.js
Created Jun 28, 2016
Facebook SDK for JavaScript WordPress Header
View Facebook SDK for JavaScript WordPress.js
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.6";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>