Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Different Logo For Each Page Reply To: [Solved] Different Logo For Each Page

#189640
crawling
Participant

In the backend of the theme you have the option to upload a logo , now this logo that you upload will be displayed on all pages automatically .

now if you put a logo in css for a page or category , you will then have the logo that you uploaded in the backend plus the logo that you placed in css.
the logo you place in css will not replace the logo that you uploaded in the backend.

so what i want is to upload the logo in css only and not in the theme options, but noting shows up when i do that , the logo only shows up when i upload it in the theme options .

There is a php file called logo.php and this is the code in it .

if ( ! function_exists( 'wpex_logo_img_src' ) ) {
    function wpex_logo_img_src() {
        $src = get_theme_mod( 'wpex_logo', get_template_directory_uri(). '/images/logo.png' );
        if ( isset( $_GET['wpex_white_logo'] ) && 'true' == $_GET['wpex_white_logo'] ) {
            return get_template_directory_uri(). '/images/logo-white.png';
        }
        $src = apply_filters( 'wpex_logo_img', $src );
        if ( $src ) {
            return $src;
        } else {
            return false;
        }
    }
}

if ( ! function_exists( 'wpex_logo' ) ) {
    function wpex_logo() {

        // Vars
        $logo_img = wpex_logo_img_src();
        $blog_name = get_bloginfo( 'name' );
        $blog_description = get_bloginfo( 'description' );
        $home_url = home_url(); ?>

        <div id="logo" class="clr">
            <?php if ( $logo_img ) { ?>
                <a href="<?php echo $home_url; ?>" title="<?php echo $blog_name; ?>" rel="home"><img src="<?php echo $logo_img; ?>" alt="<?php echo $blog_name; ?>" /></a>
                <?php if ( $blog_description && get_theme_mod( 'wpex_logo_subheading', '1' ) ) { ?>
                    <div class="blog-description"><?php echo $blog_description; ?></div>
                <?php } ?>
            <?php } else { ?>
                <div class="site-text-logo clr">
                    <a href="<?php echo $home_url; ?>" title="<?php echo $blog_name; ?>" rel="home"><?php echo $blog_name; ?></a>
                    <?php if ( $blog_description && get_theme_mod( 'wpex_logo_subheading', '1' ) ) { ?>
                        <div class="blog-description"><?php echo $blog_description; ?></div>
                    <?php } ?>
                </div>
            <?php } ?>
        </div><!-- #logo -->

        <?php
    }
}

how can i style a logo without uploading it in the theme options ?