Skip to content

Instantly share code, notes, and snippets.

View thanh4890's full-sized avatar
🏠
Working from home

Thanh Nguyen Dac thanh4890

🏠
Working from home
View GitHub Profile
<?php
add_action( 'wp_enqueue_scripts', 'kopa_nictitate_child_theme_customize_extra_style' );
function kopa_nictitate_child_theme_customize_extra_style() {
wp_enqueue_style('kopa-child-theme-extra-style', get_stylesheet_directory_uri() . '/css/extra.css', array('kopa-extra-style'), null );
}
<?php
$kopa_setting = kopa_get_template_setting();
$sidebars = $kopa_setting['sidebars'];
get_header(); ?>
<div id="main-content">
<div class="widget">
<?php if ( is_active_sidebar( $sidebars[0] ) )
dynamic_sidebar( $sidebars[0] );
/**
* cbpAnimatedHeader.min.js v1.0.0
* http://www.codrops.com
*
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* Copyright 2013, Codrops
* http://www.codrops.com
*/
In your theme directory, open this file: library/includes/widgets.php
Find the block, it's located in widget method of Kopa_Widget_Socials class
<?php if ( ! empty( $vimeo ) ) : ?>
<li><a href="<?php echo esc_url( $vimeo ); ?>" data-icon="&#xe174;"></a></li>
<?php endif; ?>
In your theme directory, open this file: library/includes/widgets.php
Find the blog in widget method of Kopa_Widget_Services_Intro class:
<h2 class="entry-title clearfix"><span class="<?php echo $icon_class; ?>"></span><a href="<?php echo $service_url; ?>"><?php the_title(); ?></a></h2>
Replace it by:
<h2 class="entry-title clearfix"><span class="<?php echo $icon_class; ?>"></span><?php the_title(); ?></h2>
/**
* Display testimonials widget
* @since Nictitate 1.0
*/
class Kopa_Widget_Staffs extends WP_Widget {
function __construct() {
$widget_ops = array('classname' => 'kopa-our-team-widget', 'description' => __('Display a staffs widget', kopa_get_domain()));
$control_ops = array('width' => 'auto', 'height' => 'auto');
parent::__construct('kopa_widget_staffs', __('Kopa Staffs Widget', kopa_get_domain()), $widget_ops, $control_ops);
In your theme directory, open this file: header.php
Replace line 114
<div id="header-bottom" class="<?php if ( 'enable' === get_option('kopa_theme_options_sticky_menu_status', 'enable') ) { echo 'cbp-af-header'; } ?>">
By the line:
<div id="header-bottom" class="<?php if ( 'enable' === get_option('kopa_theme_options_sticky_menu_status', 'enable') || ! is_front_page() ) { echo 'cbp-af-header'; } ?>">
@thanh4890
thanh4890 / breadcrumb
Created March 26, 2014 03:15
Support: Eliana
/**
* Template tag: print breadcrumb
*/
function kopa_breadcrumb() {
// get show/hide option
$kopa_breadcrumb_status = get_option('kopa_theme_options_breadcrumb_status', 'show');
if ( $kopa_breadcrumb_status != 'show' ) {
return;
}
<?php
define('KOPA_THEME_NAME', 'Nictitate');
define('KOPA_DOMAIN', 'nictitate');
define('KOPA_CPANEL_IMAGE_DIR', get_template_directory_uri() . '/library/images/layout/');
define('KOPA_UPDATE_TIMEOUT', 21600);
define('KOPA_UPDATE_URL', 'http://kopatheme.com/notifier/nictitate.xml');
require (get_template_directory()) . '/library/kopa.php';
require (get_template_directory()) . '/library/ini.php';
a:2:{s:6:"params";a:70:{s:5:"title";s:10:"Revolution";s:5:"alias";s:10:"Revolution";s:9:"shortcode";s:23:"[rev_slider Revolution]";s:11:"slider_type";s:9:"fullwidth";s:27:"fullscreen_offset_container";s:0:"";s:5:"width";s:4:"1086";s:6:"height";s:3:"435";s:15:"responsitive_w1";s:3:"940";s:16:"responsitive_sw1";s:3:"770";s:15:"responsitive_w2";s:3:"780";s:16:"responsitive_sw2";s:3:"500";s:15:"responsitive_w3";s:3:"510";s:16:"responsitive_sw3";s:3:"310";s:15:"responsitive_w4";s:0:"";s:16:"responsitive_sw4";s:0:"";s:15:"responsitive_w5";s:0:"";s:16:"responsitive_sw5";s:0:"";s:15:"responsitive_w6";s:0:"";s:16:"responsitive_sw6";s:0:"";s:5:"delay";s:4:"9000";s:7:"shuffle";s:3:"off";s:9:"lazy_load";s:3:"off";s:15:"load_googlefont";s:5:"false";s:11:"google_font";s:22:"PT+Sans+Narrow:400,700";s:11:"stop_slider";s:3:"off";s:16:"stop_after_loops";s:1:"0";s:13:"stop_at_slide";s:1:"2";s:8:"position";s:6:"center";s:10:"margin_top";s:1:"0";s:13:"margin_bottom";s:1:"0";s:11:"margin_left";s:1:"0";s:12:"margin_right";s:1:"0";s