Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7034271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:09:56+00:00 2026-05-28T01:09:56+00:00

I have this code in my header.php : <div id=logo> <?php if( get_option(‘of_logo’) !=

  • 0

I have this code in my header.php :

    <div id="logo">
    <?php if( get_option('of_logo') != '') { ?>
    <a class="image" href="<?php echo get_option('home'); ?>/" title="Home">
        <img src="<?php echo get_option('of_logo'); ?>"  />
    </a>
    <?php } else { ?>
        <h1 class="front-page-logo"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo('name'); ?></a></h1> 
        <h2><?php bloginfo('description'); ?></h2>
    <?php } ?>
    </div>

All works great! basically it says if the user uploads a logo image in the theme options panel, then show that image, else, show some text.

Now I need to replace this:

    <?php } else { ?>
        <h1 class="front-page-logo"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo('name'); ?></a></h1> 
        <h2><?php bloginfo('description'); ?></h2>
    <?php } ?>

with display a image based on the style.css the user choose. And my problem here is if I go to each css file and declare a diferent image, then if the user uploads a image also, both images show on page.

So how can I do that?
thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:09:56+00:00Added an answer on May 28, 2026 at 1:09 am

    Use a an id or class on your default logo and declare the image urls in the various css files using background-image:

    <?php } else { ?>
        <div id="default-logo"></div>
    <?php } ?>
    

    In the css files:

    #default-logo {
        background-image: url(".../1.jpg");
        width: 80px;
        height: 80px; /* the dimensions of your logo */
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

its a little bit hard to understand. in the header.php i have this code:
i have this code on the server side: <?php header('Content-Type: text/html; charset=utf-8'); require ../general.variables.php;
I have the following code in header.php to echo the body's id: <body id=<?php
I have been seeing code like this usually in the start of header files:
I have this code while($row = mysql_fetch_row($result)) { echo '<tr>'; $pk = $row[0]['ARTICLE_NO']; foreach($row
I have this code <?php session_start(); if (isset($_GET[cmd])) $cmd = $_GET[cmd]; else die(You should
I have this code on my print.css: #header, #tae, #nav, .noprint {display: none;} width:
index.php has this jquery code which loads notifications.inc.php into a div on the page
I have made a code -- <?php header(Content-type: text/javascript); require_once('../php/config.php'); $domail_theme = $_GET['theme']; ?>
I am usually using this code div#wrapper{width:900px; margin: 0 auto;} div#header{float:left; width: 900px;} div#sidebar{float:left;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.