Skip to content

Instantly share code, notes, and snippets.

<?php
$onepress_pricing_id = get_theme_mod( 'onepress_pricing_id', esc_html__('pricing', 'onepress-plus') );
$onepress_pricing_title = get_theme_mod( 'onepress_pricing_title', esc_html__('Pricing Table', 'onepress-plus' ));
$onepress_pricing_subtitle = get_theme_mod( 'onepress_pricing_subtitle', esc_html__('Responsive pricing section', 'onepress-plus' ));
$desc = get_theme_mod( 'onepress_pricing_desc' )
?>
<?php if ( ! onepress_is_selective_refresh() ){ ?>
<section <?php if ( $onepress_pricing_id ) { ?>id="<?php echo esc_attr( $onepress_pricing_id ); ?>" <?php } ?> class="<?php echo esc_attr( apply_filters( 'onepress_section_class', 'section-pricing section-padding onepage-section', 'pricing' ) ); ?>">
<?php } ?>
<?php do_action( 'onepress_section_before_inner', 'pricing' ); ?>
function woocommerce_page_title( $echo = true ) {
if ( is_search() ) {
$page_title = sprintf( __( 'Search Results: &ldquo;%s&rdquo;', 'woocommerce' ), get_search_query() );
if ( get_query_var( 'paged' ) )
$page_title .= sprintf( __( '&nbsp;&ndash; Page %s', 'woocommerce' ), get_query_var( 'paged' ) );
} elseif ( is_tax() ) {
<ul class="header-contact-wrapper">
<li>
<div class="contact-box">
<div class="box-icon left">
<i class="fa fa-map-marker"></i>
</div>
<div class="box-text left">
<div class="contact-phone">2590 Pearl Street</div>
<div class="contact-text">Mountain View, CA 94043</div>
<?php
$id = get_theme_mod( 'onepress_features_id', esc_html__('features', 'onepress') );
$disable = get_theme_mod( 'onepress_features_disable' ) == 1 ? true : false;
$title = get_theme_mod( 'onepress_features_title', esc_html__('Features', 'onepress' ));
$subtitle = get_theme_mod( 'onepress_features_subtitle', esc_html__('Why choose Us', 'onepress' ));
if ( onepress_is_selective_refresh() ) {
$disable = false;
}
$data = onepress_get_features_data();
if ( !$disable && !empty( $data ) ) {
@congthien
congthien / form.html
Created February 23, 2017 15:22
screen contact form
<div class="row">
<div class="col-md-6">
<p><span class="large-label">Your Name (*)</span><br />
[text* your-name] </p>
</div>
<div class="col-md-6">
<p><span class="large-label">Your Email (*)</span><br />
[email* your-email] </p>
</div>
</div>
@congthien
congthien / action.php
Last active February 24, 2017 03:28
add custom menu before header
function custom_on_header(){
?>
<div class="container">
<!-- enter your code below -->
</div>
<?php
}
add_action( 'onepress_before_site_star', 'custom_on_header' );
@congthien
congthien / template-tags.php
Created February 24, 2017 16:14
onepress_gallery_html - add image alt
function onepress_gallery_html( $data, $inner = true, $size = 'thumbnail' ) {
$max_item = get_theme_mod( 'onepress_g_number', 10 );
$html = '';
if ( ! is_array( $data ) ) {
return $html;
}
$n = count( $data );
if ( $max_item > $n ) {
$max_item = $n;
}
@congthien
congthien / section-projects.php
Created March 2, 2017 07:00
change project section to 2 columns layout
<?php
$onepress_projects_id = get_theme_mod( 'onepress_projects_id', 'projects' );
$onepress_projects_title = get_theme_mod( 'onepress_projects_title', __('Highlight Projects', 'onepress-plus' ));
$onepress_projects_subtitle = get_theme_mod( 'onepress_projects_subtitle', __('Some of our works', 'onepress-plus' ));
$is_ajax = get_theme_mod( 'onepress_project_ajax', 1 );
$desc = get_theme_mod( 'onepress_projects_desc' );
?>
<?php if ( ! onepress_is_selective_refresh() ){ ?>
<section <?php if ( $onepress_projects_id ) { ?>id="<?php echo esc_attr( $onepress_projects_id ); ?>" <?php } ?> class="<?php echo esc_attr( apply_filters( 'onepress_section_class', 'section-padding section-projects onepage-section', 'projects' ) ); ?>">
<?php
$onepress_team_id = get_theme_mod( 'onepress_team_id', esc_html__('team', 'onepress') );
$onepress_team_disable = get_theme_mod( 'onepress_team_disable' ) == 1 ? true : false;
$onepress_team_title = get_theme_mod( 'onepress_team_title', esc_html__('Our Team', 'onepress' ));
$onepress_team_subtitle = get_theme_mod( 'onepress_team_subtitle', esc_html__('Section subtitle', 'onepress' ));
$layout = intval( get_theme_mod( 'onepress_team_layout', 3 ) );
if ( $layout <= 0 ){
$layout = 3;
}
$user_ids = onepress_get_section_team_data();
@congthien
congthien / invite.js
Created March 8, 2017 16:20
js invite facebook
javascript:var inputs = document.querySelectorAll('a._42ft._4jy0._4jy3._517h'); for(var i=1; i<inputs.length;i++) {
inputs[i].click();
}