-
AuthorPosts
-
February 2, 2015 at 10:27 pm #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,
JosueFebruary 2, 2015 at 11:39 pm #389739Thanks 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
February 6, 2015 at 11:51 am #391940Hey!
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,
IsmaelFebruary 19, 2015 at 12:08 pm #398808I 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?
February 19, 2015 at 2:22 pm #398908Hey!
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,
IsmaelFebruary 19, 2015 at 2:52 pm #398934Thanks 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/
February 19, 2015 at 3:00 pm #398938Following 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?
February 20, 2015 at 4:36 am #399437Hi!
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,
IsmaelFebruary 20, 2015 at 2:27 pm #399647Thanks 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.
February 21, 2015 at 10:55 am #400020Hi!
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!
IsmaelFebruary 23, 2015 at 12:36 pm #400588Thanks 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.
February 23, 2015 at 6:14 pm #400875Add this:
.secondary-logo a { max-height: 120px; }
Cheers!
JosueFebruary 23, 2015 at 6:20 pm #400880Thanks 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?
February 23, 2015 at 6:47 pm #400911This will do it:
.secondary-logo a{ max-height: 120px; overflow: hidden; }
-
AuthorPosts
- You must be logged in to reply to this topic.