View difference between Paste ID: 2WN4W0eU and RwLwfC24
SHOW: | | - or go back to the newest paste.
1
<?php
2-
/**
2+
3-
 * shopress functions and definitions.
3+
/*
4-
 *
4+
 Theme Name:   Shopress Child
5-
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
5+
 Description:  Shopress Child Theme
6-
 *
6+
 Author:       Linus Näslund
7-
 * @package shopress
7+
 Template:     shopress
8-
 */
8+
 Version:      1.0.0
9
 Text Domain:  shopress-child
10
*/
11-
	$shopress_theme_path = get_template_directory() . '/inc/icy/';
11+
12
function shopress_child_enqueue_styles() {
13-
	require( $shopress_theme_path . '/shopress-custom-navwalker.php' );
13+
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
14-
	require( $shopress_theme_path . '/font/font.php');
14+
15
}
16-
	/*-----------------------------------------------------------------------------------*/
16+
add_action('wp_enqueue_scripts', 'shopress_child_enqueue_styles');
17-
	/*	Enqueue scripts and styles.
17+
18-
	/*-----------------------------------------------------------------------------------*/
18+
function shopress_force_404() {
19-
	require( $shopress_theme_path .'/enqueue.php');
19+
  global $post, $wp_query;
20-
	/* ----------------------------------------------------------------------------------- */
20+
 
21-
	/* Customizer */
21+
  if(is_singular('product') || is_product_category()) {
22-
	/* ----------------------------------------------------------------------------------- */
22+
    $wp_query->set_404();
23-
	
23+
    status_header(404);
24-
	require( $shopress_theme_path . '/customize/shopress_customize_copyright.php');
24+
  }
25-
	require( $shopress_theme_path . '/customize/shopress_customize_homepage.php');
25+
26-
	require( $shopress_theme_path . '/customize/customize_control/class-shopress-customize-alpha-color-control.php');
26+
add_action('wp', 'shopress_force_404');