Reply To: Logo missing since update

Home Forums Support Logo missing since update Reply To: Logo missing since update

Home Forums Support Logo missing since update Reply To: Logo missing since update

#194408
Florencio

Here’s the functions.php in the child theme:

<?php
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/wp-content/themes/generatepress/style.css’ );
wp_enqueue_style( ‘child-style’,
get_stylesheet_directory_uri() . ‘/wp-content/themes/generatepress-child/style.css’,
array(‘parent-style’)
);
}

//Remove Media Library Tab
function remove_medialibrary_tab($tabs) {
if ( !current_user_can( ‘administrator’ ) ) {
unset($tabs[‘library’]);
return $tabs;
}
else
{
return $tabs;
}
}
add_filter(‘media_upload_tabs’,’remove_medialibrary_tab’);

//Add login-logout to nav
if( ! function_exists( ‘add_loginout_to_menu’ ) ) {
function add_loginout_to_menu( $items, $args ){
//Nav location in your theme. In this case, primary nav. Adjust accordingly.
if( is_admin() || $args->theme_location != ‘primary’ )
return $items;
if( is_user_logged_in( ) ) {
$link = ‘‘ . __( ‘Logout’ ) . ‘‘;
}
else $link = ‘‘ . __( ‘Login’ ) . ‘‘;
return $items.= ‘<li id=”loginout-link” class=”menu-item menu-type-link”>’. $link . ‘‘;
}
}
add_filter( ‘wp_nav_menu_items’, ‘add_loginout_to_menu’, 10, 2 );
?>
<?php

/*
* Creating a function to create our CPT
*/

function custom_post_type() {
// Set UI labels for Custom Post Type
$labels = array(
‘name’ => _x( ‘Campaigns’, ‘Post Type General Name’, ‘generate’ ),
‘singular_name’ => _x( ‘Campaign’, ‘Post Type Singular Name’, ‘generate’ ),
‘menu_name’ => __( ‘Campaigns’, ‘generate’ ),
‘parent_item_colon’ => __( ‘Parent Campaign’, ‘generate’ ),
‘all_items’ => __( ‘All Campaigns’, ‘generate’ ),
‘view_item’ => __( ‘View Campaign’, ‘generate’ ),
‘add_new_item’ => __( ‘Add New Campaign’, ‘generate’ ),
‘add_new’ => __( ‘Add New’, ‘generate’ ),
‘edit_item’ => __( ‘Edit Campaign’, ‘generate’ ),
‘update_item’ => __( ‘Update Campaign’, ‘generate’ ),
‘search_items’ => __( ‘Search Campaign’, ‘generate’ ),
‘not_found’ => __( ‘Not Found’, ‘generate’ ),
‘not_found_in_trash’ => __( ‘Not found in Trash’, ‘generate’ ),
);

// Set other options for Custom Post Type

$args = array(

‘label’ => __( ‘campaigns’, ‘generate’ ),
‘description’ => __( ‘Campaigns’, ‘generate’ ),
‘labels’ => $labels,

// Features this CPT supports in Post Editor
‘supports’ => array( ‘title’, ‘editor’, ‘excerpt’, ‘author’, ‘thumbnail’, ‘comments’, ‘revisions’, ‘custom-fields’, ),

// You can associate this CPT with a taxonomy or custom taxonomy.
//’taxonomies’ => array( ‘genres’ ),
/* A hierarchical CPT is like Pages and can have
* Parent and child items. A non-hierarchical CPT
* is like Posts.
*/
‘hierarchical’ => false,
‘public’ => true,
‘show_ui’ => true,
‘show_in_menu’ => true,
‘show_in_nav_menus’ => true,
‘show_in_admin_bar’ => true,
‘menu_position’ => 5,
‘can_export’ => true,
‘has_archive’ => true,
‘exclude_from_search’ => false,
‘publicly_queryable’ => true,
‘capability_type’ => ‘page’,
);

// Registering your Custom Post Type
register_post_type( ‘campaigns’, $args );

}

/* Hook into the ‘init’ action so that the function
* Containing our post type registration is not
* unnecessarily executed.
*/

add_action( ‘init’, ‘custom_post_type’, 0 );
?>
<?php /* — set featured image in ACF — */

function acf_set_featured_image( $value, $post_id, $field ){

if($value != ”){
//Add the value which is the image ID to the _thumbnail_id meta data for the current post
add_post_meta($post_id, ‘_thumbnail_id’, $value);
}

return $value;
}

// acf/update_value/name={$field_name} – filter for a specific field based on it’s name
add_filter(‘acf/update_value/name=campaign_image’, ‘acf_set_featured_image’, 10, 3);

// Adds classes for custom post types to body_class() and post_class() 4/4/16
function fb_add_body_class( $class ) {
$post_type = ‘campaigns’; // the Post Type

if ( get_query_var(‘post_type’) === $post_type ) { // only, if post type is active
$class[] = $post_type;
$class[] = ‘type-‘ . $post_type;
}

return $class;
}
add_filter( ‘body_class’, ‘fb_add_body_class’ );
// End – adds classes..

/* 20160514 Fix header logo */
if ( ! function_exists( ‘generate_header_items’ ) ) :
/**
* Build the header
*
* Wrapping this into a function allows us to customize the order
*
* @since 1.2.9.7
*/
function generate_header_items()
{

// Site logo
generate_construct_logo();
// Header widget
generate_construct_header_widget();

// Site title and tagline
generate_construct_site_title();

}
endif;
/* 20160514 End fix header logo */

?>