-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
59 lines (49 loc) · 2.29 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
* UnderStrap functions and definitions
*
* @package understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
$understrap_includes = array(
'/theme-settings.php', // Initialize theme default settings.
'/setup.php', // Theme setup and custom theme supports.
'/widgets.php', // Register widget area.
'/enqueue.php', // Enqueue scripts and styles.
'/template-tags.php', // Custom template tags for this theme.
'/pagination.php', // Custom pagination for this theme.
'/hooks.php', // Custom hooks.
'/extras.php', // Custom functions that act independently of the theme templates.
'/customizer.php', // Customizer additions.
'/custom-comments.php', // Custom Comments file.
'/jetpack.php', // Load Jetpack compatibility file.
'/class-wp-bootstrap-navwalker.php', // Load custom WordPress nav walker. Trying to get deeper navigation? Check out: https://github.com/understrap/understrap/issues/567
'/woocommerce.php', // Load WooCommerce functions.
'/editor.php', // Load Editor functions.
'/acf.php', // Load acf functions.
'/deprecated.php', // Load deprecated functions.
);
foreach ( $understrap_includes as $file ) {
require_once get_template_directory() . '/inc' . $file;
}
// Define path and URL to the ACF plugin.
define( 'ART_SHOW_ACF_PATH', get_stylesheet_directory() . '/includes/acf/' );
define( 'ART_SHOW_ACF_URL', get_stylesheet_directory_uri() . '/includes/acf/' );
// Include the ACF plugin.
include_once( ART_SHOW_ACF_PATH . 'acf.php' );
// Customize the url setting to fix incorrect asset URLs.
add_filter('acf/settings/url', 'art_show_acf_settings_url');
function art_show_acf_settings_url( $url ) {
return ART_SHOW_ACF_URL;
}
// (Optional) Hide the ACF admin menu item.
add_filter('acf/settings/show_admin', 'art_show_acf_settings_show_admin');
function art_show_acf_settings_show_admin( $show_admin ) {
return false;
}
function acf_exhibit_description(){
if(class_exists('ACF')){
return the_field('exhibition_description');
}
}