Skip to content

Instantly share code, notes, and snippets.

jQuery( function(){
jQuery('#your-section-ID a[href*="#"]:not([href="#"])').on('click', function(event){
event.preventDefault();
smoothScroll(jQuery(this.hash));
});
})
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package WPCharming
<?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' ); ?>
<?php
$onepress_news_id = get_theme_mod( 'onepress_news_id', esc_html__('news', 'onepress') );
$onepress_news_disable = get_theme_mod( 'onepress_news_disable' ) == 1 ? true : false;
$onepress_news_title = get_theme_mod( 'onepress_news_title', esc_html__('Latest News', 'onepress' ));
$onepress_news_subtitle = get_theme_mod( 'onepress_news_subtitle', esc_html__('Section subtitle', 'onepress' ));
$onepress_news_number = get_theme_mod( 'onepress_news_number', '3' );
$onepress_news_more_link = get_theme_mod( 'onepress_news_more_link', '#' );
$onepress_news_more_text = get_theme_mod( 'onepress_news_more_text', esc_html__('Read Our Blog', 'onepress' ));
if ( onepress_is_selective_refresh() ) {
$onepress_news_disable = false;
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
<?php
/**
* The front page template file.
*
* The front-page.php template file is used to render your site’s front page,
* whether the front page displays the blog posts index (mentioned above) or a static page.
* The front page template takes precedence over the blog posts index (home.php) template.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#front-page-display
*
<?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();
<?php
/**
* Template part for displaying single posts.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Codilight_Lite
*/
?>
<?php
/**
* Custom Woocommerce shop page.
*
* @package WPCharming
*/
global $woocommerce;
$page_layout = get_post_meta( woocommerce_get_page_id('shop'), '_wpc_page_layout', true );
$hide_page_title = get_post_meta( woocommerce_get_page_id('shop'), '_wpc_hide_page_title', true );