Skip to content

Instantly share code, notes, and snippets.

View maheshwaghmare's full-sized avatar
🎯
Focusing

Mahesh Waghmare maheshwaghmare

🎯
Focusing
View GitHub Profile
@maheshwaghmare
maheshwaghmare / figlet-fonts.txt
Created February 24, 2021 15:47
Figlet Fonts (ASCII Fonts) examples - See https://maheshwaghmare.com/?p=37127
__ ____
/ / ____ ________ ____ ___ / _/___ _______ ______ ___
/ / / __ \/ ___/ _ \/ __ `__ \ / // __ \/ ___/ / / / __ `__ \
/ /___/ /_/ / / / __/ / / / / / _/ // /_/ (__ ) /_/ / / / / / /
/_____/\____/_/ \___/_/ /_/ /_/ /___/ .___/____/\__,_/_/ /_/ /_/
/_/
Font Info: Slant by Glenn Chappell 3/93 -- based on Standard
@maheshwaghmare
maheshwaghmare / show-post-navigation.php
Last active September 18, 2020 20:48
WordPress - Show the (next and previous) navigation for post, page and custom post types (CPT). Use `[show_post_navigation]`
<?php
/**
* Show the (next and previous) navigation for post, page and custom post types (CPT).
*
* @example [show_post_navigation]
*
* @todo Change the `prefix_` and with your own unique prefix.
*
* @since 1.0.0
*/
@maheshwaghmare
maheshwaghmare / rss-feed-shortcode.php
Created September 4, 2020 06:29
Show WordPress RSS Feed with Shortcode. E.g. [show_rss_feed url="https://maheshwaghmare.com/feed/"]
<?php
/**
* Show RSS feed with Shortcode.
*
* @example [show_rss_feed url="https://maheshwaghmare.com/feed/"]
*
* @todo Change the `prefix_` and with your own unique prefix.
*
* @since 1.0.0
*/
@maheshwaghmare
maheshwaghmare / add-post-type-to-feed.php
Created September 4, 2020 06:13
WordPress: Add custom post types into the feed.
<?php
/**
* Add Custom Post Types (CPT) to feeds
*
* @todo Change the `prefix_` and with your own unique prefix.
*
* @since 1.0.0
*
* @return object
*/
@maheshwaghmare
maheshwaghmare / child-pages-list.php
Created September 3, 2020 06:59
List all the pages in list with `[child_pages_list]` shortcode in WordPress.
<?php
add_shortcode( 'child_pages_list', function() {
$args = array(
'post_parent' => get_the_ID(),
'post_type' => get_post_type(),
);
$posts = get_children( $args );
ob_start();
@maheshwaghmare
maheshwaghmare / pluign-get-deactivate-link.php
Created August 16, 2020 09:17
WordPress get plugin deactivate link.
@maheshwaghmare
maheshwaghmare / copy-as-html.php
Created August 2, 2020 07:00
Copy anything to Clipboard: Allow to copy as HTML. See https://maheshwaghmare.com/?p=8138
<?php
/**
* Allow to copy as HTML.
*
* @todo Change the `prefix_` and with your own unique prefix.
*
* @since 1.0.0
*
* @return mixed
*/
@maheshwaghmare
maheshwaghmare / sample-plugin.php
Created July 18, 2020 10:57
Sample Plugin - Create new user role and new post type and allow to create the custom post type with those users who have that specific user role.
<?php
<?php
/**
* Plugin name: Sample Plugin
*/
/**
* User Role Specific Post Type
*
* @package User Role Specific Post Type
@maheshwaghmare
maheshwaghmare / add-tag-in-rest-field.php
Created July 16, 2020 10:49
WP Portfolio - Add tags in UI grid
<?php
add_action( 'rest_api_init', 'wp_portfolio_add_rest_field' );
/**
* Add Rest Field
*
* @since 1.0.0
* @return void
*/
function wp_portfolio_add_rest_field() {
@maheshwaghmare
maheshwaghmare / .htaccess
Created July 14, 2020 14:59 — forked from Zodiac1978/.htaccess
Make your Website faster - a safe htaccess way
#
# Sources:
# http://stackoverflow.com/questions/7704624/how-can-i-use-gzip-compression-for-css-and-js-files-on-my-websites
# http://codex.wordpress.org/Output_Compression
# http://www.perun.net/2009/06/06/wordpress-websites-beschleuinigen-4-ein-zwischenergebnis/#comment-61086
# http://www.smashingmagazine.com/smashing-book-1/performance-optimization-for-websites-part-2-of-2/
# http://gtmetrix.com/configure-entity-tags-etags.html
# http://de.slideshare.net/walterebert/die-htaccessrichtignutzenwchh2014
# http://de.slideshare.net/walterebert/mehr-performance-fr-wordpress
# https://andreashecht-blog.de/4183/