Skip to content

Instantly share code, notes, and snippets.

View mustafix's full-sized avatar

Mustafizur Rahman mustafix

View GitHub Profile
/*-------------------------------------------------------
Add the 'auth' class to the output of the_author_posts_link()
--------------------------------------------------------*/
add_filter( 'the_author_posts_link', function( $link )
{
return str_replace( 'rel="author"', 'rel="author" class="auth"', $link );
});
/*-------------------------------------------------------
functions.php
--------------------------------------------------------*/
function bulletin_paginate_links($mid_size=3){
global $wp_query;
$big = 999999999; // need an unlikely integer
$links = paginate_links(array(
'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))),
'format' => '?paged=%#%',
'current' => max(1, get_query_var('paged')),
/*-------------------------------------------------------
Use functions.php
--------------------------------------------------------*/
add_filter('user_contactmethods', 'theme_user_contactmethods');
function theme_user_contactmethods($cm){
$cm['facebook'] = __('Facebook', 'verum');
$cm['twitter'] = __('Twitter', 'verum');
$cm['pinterest'] = __('Pinterest', 'verum');
$cm['google-plus'] = __('Google Plus', 'verum');
return $cm;
<?php
/**
* The template for displaying comments
*
* This is the template that displays the area of the page that contains both the current comments
* and the comment form.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package theme
// Start ul
<div class="text-center">
<?php
$portfolio_cats = get_terms('portfolio_cat');
if( ! empty($portfolio_cats) && !is_wp_error($portfolio_cats) ) :
?>
<ul class="portfolio-filter">
<li class="active"><a href="#" data-filter="*"> All</a></li>
<?php