Viewing 14 posts - 31 through 44 (of 44 total)
  • Author
    Posts
  • #389701

    Hey!

    I’m supposing enfold-child-dentists is the theme the Dentists website is using then its functions.php should have:

    add_action('ava_after_main_menu','custom_things');
    function custom_things() {
    	echo '<div class="secondary-logo">
           <a href=" http://www.theimplantexperts.com/">
           <img src="http://dentists.theimplantexperts.com/wp-content/uploads/sites/2/2015/01/TIE_WebHeader_Patientslink1.png" />
           </a>
           </div>';
    }

    And if the Patients site is using enfold-child then its functions.php file should contain:

    add_action('ava_after_main_menu','custom_things');
    function custom_things() {
    	echo '<div class="secondary-logo">
           <a href=" http://dentists.theimplantexperts.com/">
           <img src="http://theimplantexperts.com/wp-content/uploads/2015/01/TIE_WebHeader_Patientslink.png" />
           </a>
           </div>';
    }

    Best regards,
    Josue

    #389739

    Thanks for trying to help Josue. Yes I believe you are correct the enfold-child relates to the patient site and the enfold-child-dentists relates to the dentist site. I’ve added the new code you’ve just provided to the appropriate functions.php file in the enfold-child & enfold-child-dentists folders.

    There is another folder under themes on the server; ‘enfold’ which I believe holds the files for both sites. There was some code in the enfold functions.php which I believe was placing the image on both sites. I removed this code from the functions.php file in the enfold folder, but there are now no images on either site. The new code I’ve placed in the two child functions.php files clearly isn’t being picked up.

    I believe I should remove the code from both the functions.php files in the child folders and insert two sets of code in the functions.php file in the enfold folder on the server as this seems to be influencing both sites.

    One set of code telling…
    the secondary-logo on http://theimplantexperts.com (OBVIOUSLY NOT RIGHT!)



    </div>’;
    }

    and the second set of code telling…
    the secondary-logo on http://dentists.theimplantexperts.com (OBVIOUSLY NOT RIGHT!)



    </div>’;
    }

    Does this make any sense at all or am I talking rubbish??

    Rupert

    #391940

    Hey!

    I’m sorry but I think you’re confused. If you have 2 wp installation, you should put the code separately in these two directories:

    patient > wp-content > themes > enfold or enfold-child > functions.php

    and

    dentist > wp-content > themes > enfold or enfold-child > functions.php

    Please review the code we provided here: https://kriesi.at/support/topic/linking-two-sites/#post-389171

    Regards,
    Ismael

    #398808

    I have to say I’m very confused. This is what my server chap has said:

    The TIE site is actually running wordpress in the multisite config. Which means the sites share things like control panel and themes.

    If you’re changing the functions.php in the these you’ll probably have to create a child theme otherwise the change will arrive in both. Or possible use an IF statement in the so that it changes the output based on site called.

    By the sounds of it you may have already created the child theme as you say there are two functions.php. Are you sure the theme is activated on the site?

    functions.php should load from the child theme as well as it’s parent. http://codex.wordpress.org/Child_Themes#Using_functions.php

    Does this make any sense to you?

    #398908

    Hey!

    Alright. That clear things up a bit. Replace the code on functions.php with this:

    add_action('ava_after_main_menu','custom_things');
    function custom_things() {
    	global $blog_id;
    
    	if ($blog_id == 1) {
    		echo '<div class="secondary-logo">
    		<a href=" http://www.theimplantexperts.com/">
    		<img src="http://dentists.theimplantexperts.com/wp-content/uploads/sites/2/2015/01/TIE_WebHeader_Patientslink1.png" />
    		</a>
    		</div>';
    	} elseif ($blog_id == 2) {
    		echo '<div class="secondary-logo">
    		<a href=" http://dentists.theimplantexperts.com/">
    		<img src="http://theimplantexperts.com/wp-content/uploads/2015/01/TIE_WebHeader_Patientslink.png" />
    		</a>
    		</div>';	
    	}
    }

    Regards,
    Ismael

    #398934

    Thanks Ismael

    I have loaded the code into the ‘enfold’ folder on the server and removed the old code from the functions.php files in the two child folders see this image http://theimplantexperts.com/wp-content/uploads/2015/02/Screen-Shot-2015-02-19-at-12.43.45.png

    An image has appeared on the patient site http://theimplantexperts.com/ but it’s the wrong one, it should be the blue ‘Dentist site’ button, plus it also doesn’t link through to the dentist site.

    No image has appeared on the dentist site http://dentists.theimplantexperts.com/

    #398938

    Following my last message I’ve tweaked the code and I’ve now got the correct image appearing on http://theimplantexperts.com/ and it links through to the dentist site. BUT, there’s still nothing appearing on the dentist site?

    #399437

    Hi!

    Did you add the css code?

    .secondary-logo {
    position: absolute;
    display: block;
    overflow: visible;
    top: 0px;
    right: 0;
    z-index: 10000!important;
    width: 550px !important;
    height: 82px !important;
    }

    Best regards,
    Ismael

    #399647

    Thanks Ismael, it’s now displaying and clicking through ok. Is there anyway of improving the way it looks on a mobile device? …if not, I’d prefer it to disappear when it gets down to mobile size.

    #400020

    Hi!

    Add this to the Quick CSS field to hide it on smaller screens:

    @media only screen and (max-width: 767px) {
    .secondary-logo { display: none !important; }}

    Cheers!
    Ismael

    #400588

    Thanks Ismael. I have an issue that the menu on http://dentists.theimplantexperts.com/, since adding the graphic it’s not working. Everything I click links bank to the patient site so the graphic has clearly overlaid the menu. Please can you look into this asap.

    #400875

    Add this:

    .secondary-logo a {
        max-height: 120px;
    }

    Cheers!
    Josue

    #400880

    Thanks Josue

    The menu now work if I hover over the line below wording but NOT when I hove over the word in the menu. I’ve tried reducing the max-height down to 100 & 80 px but it doesn’t make a different. Any ideas?

    #400911

    This will do it:

    .secondary-logo a{
        max-height: 120px;
        overflow: hidden;
    }
Viewing 14 posts - 31 through 44 (of 44 total)
  • You must be logged in to reply to this topic.