Accounting - Business, Consulting and Finance WordPress theme

Accounting - Business, Consulting and Finance WordPress theme v3.8.1 Reupload

No permission to download

ocuonline

New member
Oct 20, 2018
27
17
3
Hello

When I don't put a logo, it should show the site title as a logo. but it calls logo from a different place. i found the code but i couldn't put the correct code can you help me please?

function anps_get_logo()
{
global $anps_media_data, $anps_options_data;
$first_page_logo = get_option('anps_front_logo', '');
$menu_type = get_option('anps_menu_type');
$page_heading_full = get_post_meta(get_queried_object_id(), $key = 'anps_page_heading_full', $single = true);
$full_screen_logo = get_post_meta(get_queried_object_id(), $key = 'anps_full_screen_logo', $single = true);
$text_logo = get_option('anps_text_logo', '');
$size_sticky = array(120, 120);
if (!$size_sticky) {
$size_sticky = array(120, 120);
}
$logo_width = 158;
$logo_height = 33;
if (isset($anps_media_data['logo_width'])) {
$logo_width = $anps_media_data['logo_width'];
}
if (get_option('anps_logo_width', $logo_width)) {
$logo_width = get_option('anps_logo_width', $logo_width);
}

if (isset($anps_media_data['logo_height'])) {
$logo_height = $anps_media_data['logo_height'];
}
if (get_option('anps_logo_height', $logo_height)) {
$logo_height = get_option('anps_logo_height', $logo_height);
}
$anps_auto_adjust_logo = get_option('auto_adjust_logo');
if (isset($anps_auto_adjust_logo) && $anps_auto_adjust_logo == 'on') {
$logo_height = 'auto';
$logo_width = 'auto';
} else {
$logo_width .= 'px';
}

echo '<a href="' . esc_url(home_url("/")) . '">';
if (anps_get_option($anps_options_data, 'vertical_menu') != '1') {
anps_get_sticky_logo();
anps_get_mobile_logo();
}

if (isset($page_heading_full) && $page_heading_full == "on" && isset($full_screen_logo) && $full_screen_logo != "0") : ?>
<img class="logo-default" style="width: <?php echo esc_attr($logo_width); ?>; height: <?php echo esc_attr($logo_height); ?>px" alt="Site logo" src="<?php echo esc_url($full_screen_logo); ?>">
<?php else :
$anps_logo = anps_get_option($anps_media_data, 'logo');
if (($menu_type == 1 || $menu_type == 3) && $first_page_logo && (is_front_page())) : ?>
<img class="logo-default" style="width: <?php echo esc_attr($logo_width); ?>; height: <?php echo esc_attr($logo_height); ?>px" alt="Site logo" src="<?php echo esc_url($first_page_logo); ?>">
<?php
elseif (isset($anps_logo) && $anps_logo != "") : ?>
<?php if (function_exists('pll_register_string')) : ?>
<img class="logo-default" style="width: <?php echo esc_attr($logo_width); ?>; height: <?php echo esc_attr($logo_height); ?>px" alt="Site logo" src="<?php pll_e(get_option('anps_logo', '')); ?>">
<?php else : ?>
<img class="logo-default" style="width: <?php echo esc_attr($logo_width); ?>; height: <?php echo esc_attr($logo_height); ?>px" alt="Site logo" src="<?php echo esc_url(anps_get_option($anps_media_data, 'logo')); ?>">
<?php endif; ?>
<?php elseif (isset($text_logo) && $text_logo != '') : ?>
<?php echo str_replace('\\"', '"', $text_logo); ?>
<?php else : ?>
<img class="logo-default" style="width: <?php echo esc_attr($logo_width); ?>; height: <?php echo esc_attr($logo_height); ?>px" alt="Site logo" src="<?php echo get_template_directory_uri(); ?>/images/logo-accounting.png">
<?php endif;
endif;
echo '</a>';
}
function anps_get_sticky_logo()
{
global $anps_media_data;
$anps_sticky_logo = anps_get_option($anps_media_data, 'sticky_logo');
if (isset($anps_sticky_logo) && $anps_sticky_logo != "") : ?>
<?php if (function_exists('pll_register_string')) : ?>
<img class="logo-sticky" alt="Site logo" src="<?php pll_e($anps_sticky_logo, ''); ?>">
<?php else : ?>
<img class="logo-sticky" alt="Site logo" src="<?php echo esc_url($anps_sticky_logo); ?>">
<?php endif; ?>
<?php endif;
}
function anps_get_mobile_logo()
{
global $anps_media_data;
$mobile_logo = anps_get_option($anps_media_data, 'mobile_logo');
$menu_type = get_option('anps_menu_type');

$first_page_logo = get_option('anps_front_logo', '');
$front_mobile_logo = get_option('anps_front_mobile_logo');

if (($menu_type == 1 || $menu_type == 3) && $front_mobile_logo && (is_front_page())) {
$mobile_logo = $front_mobile_logo;
} elseif (isset($mobile_logo) && $mobile_logo != "") {
$mobile_logo = $mobile_logo;
} elseif (($menu_type == 1 || $menu_type == 3) && $front_mobile_logo = '' && $first_page_logo != '' && (is_front_page())) {
$mobile_logo = $first_page_logo;
} elseif (anps_get_option($anps_media_data, 'logo')) {
$mobile_logo = anps_get_option($anps_media_data, 'logo');
} else {
$mobile_logo = 'https://astudio.si/accounting/wp-content/uploads/2015/04/logo-primary.png';
}

if (function_exists('pll_register_string')) : ?>
<img class="logo-mobile" alt="<?php echo get_bloginfo('name'); ?>" src="<?php pll_e($mobile_logo); ?>">
<?php else : ?>
<img class="logo-mobile" alt="<?php echo get_bloginfo('name'); ?>" src="<?php echo esc_url($mobile_logo); ?>">
<?php endif;
}
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu