Skip to content

Instantly share code, notes, and snippets.

Matt Knighton mrkdevelopment

View GitHub Profile
View css-notifiy-bar
<style>
#notify-bar .alert-wrapper{
padding:5px;
}
#notify-bar .icon-wrap{
height: 25px;
display: inline-flex;
width: 20px;
margin: 5px 20px 0 0;
}
@mrkdevelopment
mrkdevelopment / HTML
Created Feb 2, 2020
Browser Theme Color
View HTML
<meta name="theme-color" content="#038"/>
@mrkdevelopment
mrkdevelopment / HTMlL in Head
Last active Feb 1, 2020
Add this to your header for coloured browser in mobile
View HTMlL in Head
<!-- Blue Version -->
<meta name="theme-color" content="#038"/>
<!--Grey Version -->
<meta name="theme-color" content="#3a3a3a"/>
<!--Green version -->
<meta name="theme-color" content="#209b60"/>
@mrkdevelopment
mrkdevelopment / FAQ Items as a Grid
Created Jan 8, 2020
Displays the FAQ items as a grid
View FAQ Items as a Grid
[df_multi_col_faq_shortcode id="css-id" class="css-class" include_categories="comma-separated-faq-category-ids" expanded="0-or-1" orderby="date" order="DESC" /]
@mrkdevelopment
mrkdevelopment / FAQ List Short Code
Last active Jan 8, 2020
Short Code Attributes for FAQ List id
View FAQ List Short Code
[df_toggled_faq_shortcode id="css-id" class="css-class" include_categories="comma-separated-faq-category-ids" expanded="0-or-1" orderby="date" order="DESC" /]
View mrkwp-faq-post-type-permalink-fix.php
<?php
function mrkwp_faq_posttype_fix_register_post_type_args( $args, $post_type )
{
if ($post_type == "faq" ) {
$args['rewrite'] = array(
'slug' => false,
);
}
@mrkdevelopment
mrkdevelopment / update_diviframework_faq_post_type_args.php
Last active Apr 22, 2019
WordPress filter to change diviframework faq post type args
View update_diviframework_faq_post_type_args.php
<?php
// Add this to your child theme's function.php file.
// Make sure you flush the rewrite rules.
// On wp cli you can 'wp rewrite flush'
// Or goto WordPress Admin > Settings > Permalink and save the settings which will flush the rules.
add_filter(
'df_faq_post_type_args',
function ($args) {
$args['public'] = true;
@mrkdevelopment
mrkdevelopment / business-directory-post-type-arg-filter.php
Last active Apr 9, 2019
Business Directory Post Type Arg Filter
View business-directory-post-type-arg-filter.php
<?php
// Add this to your child theme's function.php file.
// Make sure you flush the rewrite rules.
// On wp cli you can 'wp rewrite flush'
// Or goto WordPress Admin > Settings > Permalink and save the settings which will flush the rules.
add_filter('business_directory_post_type_args', function($args){
$args['rewrite'] = [
'slug' => '/business-location',
];
return $args;
@mrkdevelopment
mrkdevelopment / functions.php
Created Aug 26, 2018
Breadcrumb Update for Yoast Breadcrumbs Path in Custom Post
View functions.php
add_filter( 'wpseo_breadcrumb_links', 'wpse_100012_override_yoast_breadcrumb_trail' );
function wpse_100012_override_yoast_breadcrumb_trail( $links ) {
global $post;
if (is_tax( 'df_product_category' )) {
$breadcrumb[] = array(
'url' => get_post_type_archive_link( 'df_wordpress_product' ),
'text' => 'Products',
@mrkdevelopment
mrkdevelopment / funtions.php
Created Aug 26, 2018
Learndash Yoast Breadcrumbs
View funtions.php
add_filter( 'wpseo_breadcrumb_links', 'wpse_100012_override_yoast_breadcrumb_trail' );
function wpse_100012_override_yoast_breadcrumb_trail( $links ) {
global $post;
if ( is_singular( 'sfwd-lessons' ) ) {
$course_id = learndash_get_course_id($id);
$course_title = get_the_title($course_id);
You can’t perform that action at this time.