Skip to content

Instantly share code, notes, and snippets.

View version-control's full-sized avatar

version-control version-control

View GitHub Profile
@version-control
version-control / WP_Dev_Plugins.html
Created December 17, 2017 14:34
WP Plugins Developer List
Advanced Code Editor
Deactivate
Enables syntax highlighting in the integrated themes and plugins source code editors with line numbers, AutoComplete and much more. Supports PHP, HTML, CSS and JS.
Version 2.2.7 | By BaInternet | View details | Other Plugins by this author | Plugin Support | Donate
Select Advanced Random Posts Widget
Advanced Random Posts Widget
Deactivate
Easily to display advanced random posts via shortcode or widget.
@version-control
version-control / WP_Excerpt_Length.php
Created December 17, 2017 07:28
WP Theme Function For Excerpt Word Length
/**
* Filter the except length to 10 words.
*
* @param int $length Excerpt length.
* @return int (Maybe) modified excerpt length.
*/
function wpdocs_custom_excerpt_length( $length ) {
return 10;
}
add_filter( 'excerpt_length', 'wpdocs_custom_excerpt_length', 999 );
@version-control
version-control / WP_Replace_Excerpt_Function.php
Last active December 17, 2017 07:24
WP Theme Function For Excerpt Replace "Read More"
/**
* Filter the "read more" excerpt string link to the post.
*
* @param string $more "Read more" excerpt string.
* @return string (Maybe) modified "read more" excerpt string.
*/
function wpdocs_excerpt_more( $more ) {
return sprintf( '<a class="read-more" href="%1$s">%2$s</a>',
get_permalink( get_the_ID() ),
__( 'Read More', 'textdomain' )
@version-control
version-control / WP_Flexbox.html
Last active December 17, 2017 07:35
WP Loop With Flexbox (Mobile) / Category Type
<div class="container-fluid">
<?php get_header(); ?>
<div class="row">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="col-xs-6 col-sm-6 col-md-2 col-lg-2 justify-content: center">