Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11757

    Ok. I’m trying to add a second upload logo function onto the main dashboard/flashlight preferences so the user will be able to add their own secondary logo. I’ve created the another function in the register-admin-functions.php

    $avia_elements[] =	array(
    "name" => "Logo Footer",
    "desc" => "upload Logo for footer",
    "id" => "logofooter",
    "slug" => "contact",
    "type" => "upload",
    "label" => "Use Image as logofooter");

    This works fine. I’m able to upload in the same manner as the main logo. So far so good. Now this second logo I would like to be placed in the footer of the sidebar, underneath the social_bookmarks socket container. So I believe I need to place some code underneath the socket container in the sidebar.php to make this show up. But after a bunch of trial & error I can’t figure it out. Am I even on the right path? What code do I need? Thanks again…

    #72932

    Hello,

    You can find the avia_logo function on framework > php > function-set-avia-frontend.php.

    You might want to add another avia_logo function on the footer.

    Regards,

    Ismael

    #72933

    Big up Ismael!! Works perfectly now. For the record, (if anyone comes across this)…In function-set-avia-frontend.php, I duplicated the following:

    if(!function_exists('avia_logo'))
    {
    /**
    * return the logo of the theme. if a logo was uploaded and set at the backend options panel display it
    * otherwise display the logo file linked in the css file for the .bg-logo class
    * @return string the logo + url
    */
    function avia_logo($use_image = "")
    {
    if($logo = avia_get_option('logo'))
    {
    $logo = "<img src=".$logo." alt='' />";
    $logo = "<h1 class='logo'><a href='".home_url('/')."'>".$logo."</a></h1>";
    }
    else
    {
    $logo = get_bloginfo('name');
    if($use_image) $logo = "<img src=".$use_image." alt='' title='$logo'/>";
    $logo = "<h1 class='logo bg-logo'><a href='".home_url('/')."'>".$logo."</a></h1>";
    }

    return $logo;

    and renamed all $logo to $logo2 e.g. then i placed the

    echo avia_logo2();

    function in the place I desired in my sidebar.php

    anyways, hope that sounds right to the more experienced. it seems to work great over here. thanks again…

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Add Second Image (Logo) to Sidebar Footer/Socket’ is closed to new replies.