Tagged: x
-
AuthorPosts
-
December 12, 2016 at 9:15 pm #1290775
baywestchurch1ParticipantHow do I change the link on the logo in the topbar?
December 12, 2016 at 11:46 pm #1290848
Prasant RaiModeratorHello There,
Thanks for writing in!
Please add following code in Customize -> Custom -> Javascript:
jQuery('.x-brand').attr('href', 'http://example.com/');Please don’t forget to change http://example.com/ to whatever URL you like.
Thanks.
December 13, 2016 at 9:10 am #1291372
baywestchurch1ParticipantThanks so much!
December 13, 2016 at 9:50 am #1291447
JoaoModeratorYou are welcome,
Joao
December 13, 2016 at 8:40 pm #1292204
baywestchurch1ParticipantIt didn’t work the way I wanted, and I think it’s because I didn’t explain clear enough and left out crucial info…might not be as simple as I asked.
I have a video header that plays when you hit the site, then you click and it scrolls down to the site. With the help of tech support here, I placed code in the php to allow the home button on the menu to go to “http://7ad.ac4.myftpupload.com/#home” when bypassed the video banner, so they didn’t have to load it and scroll down every time they clicked to go back to the home page. The logo link still took them back to teh video banner, so I thought I’d change the logo link to the above address with the bookmark in it, but for some reason, it doesn’t hit that bookmark.
December 14, 2016 at 1:47 am #1292374
LelyModeratorHello There,
Please move the suggested code to Appearance > Customize > Custom > Edit Global Javascript.
jQuery('.x-brand').attr('href','7ad.ac4.myftpupload.com/#home');Code added here:Appearance > Customize > Custom > Edit Global Javascript. will work on every pages on your site unless the code is filtered per page.
On the other hand, code added here Settings Tab > Custom Javascript will only work on the specific page. In your case it is working on homepage only.Hope this helps.
January 24, 2017 at 4:08 pm #1343796
baywestchurch1ParticipantHi, I hate to reactivate this thread, but I noticed a problem that I didn’t check out fully when this was put in. I’ve since changed my baywestchurch.com.
I put this in Appearance > Customize > Custom > Edit Global Javascript…but what it does now is make the logo link be this…
baywestchurch.com/baywestchurch.com/#home
The logo is in the menu bar at the top of the page on every page. On every other page it puts the address of that page in front of the link in the code snippet above. For example, on the about page (which is named “about-2”) the logo links to…
baywestchurch.com/about-2/baywestchurch.com/#home
Help? (The url and login and all that is above in the thread.)
EDIT: In addition, all the social media icons in my top bar do that to, so the facebook icon links to…
baywestchurch.com/about-2/www.facebook.com/baywestchurch
January 25, 2017 at 12:20 am #1344297
FriechModeratorHi There,
Since you have a child theme lets utilize that. First please remove the JavaScript we suggested above.
Then login to your server via FTP and navigate to your child theme’s /x-child/framework/views/global/ directory. There create a file named _brand.php and paste the code below on it.
<?php // ============================================================================= // VIEWS/GLOBAL/_BRAND.PHP // ----------------------------------------------------------------------------- // Outputs the brand. // ============================================================================= $site_name = get_bloginfo( 'name' ); $site_description = get_bloginfo( 'description' ); $logo = x_make_protocol_relative( x_get_option( 'x_logo' ) ); $site_logo = '<img src="' . $logo . '" alt="' . $site_description . '">'; ?> <?php echo '<h1 class="visually-hidden">' . $site_name . '</h1>'; ?> <a href="http://baywestchurch.com/#home" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>"> <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?> </a>See the line
http://baywestchurch.com/#home? That is where your logo will be link.Regarding your social icons, make sure there is no number sign [#] or slash [/] or any character on front of it. And make sure you use an absolute link.
e.g.
https://www.facebook.com/yourthemeco/Hope it helps, Cheers!
January 25, 2017 at 11:46 am #1345018
baywestchurch1ParticipantThat fixed the social media links…and the logo had the same problem, so before I dumped the code and created the _brand.php, I took another look at the code, and in the code I copied, there was no “http://” before the temporary url or the new url because I just replaced it as it was.
So I put “http://” before the link in the original code and it’s fixed.
Thanks for the reply and for the code you put up, and for the comment that ultimately exposed the problem and led to a really quick fix.
January 25, 2017 at 2:37 pm #1345214
JadeModeratorYou’re most welcome!
February 9, 2017 at 5:43 pm #1365005
baywestchurch1ParticipantFYI. Had one other issue on this. I put the code in, and when I mouseover, it shows the correct link to the page and bookmark, but when I click on it….it just sits there and doesn’t go to the page.
If I right click and then open it in the new tab, works fine, but won’t work on a direct click.
Any thoughts?
February 9, 2017 at 11:10 pm #1365439
FriechModeratorHi There,
I can’t replicate that issue on my end, I tried it on Chrome and Firefox. Is there a chance that you have some kind of blocker (extension) installed on your browser?
Thanks.
February 10, 2017 at 10:01 pm #1366681
baywestchurch1ParticipantMaybe, I’ll check it.
February 11, 2017 at 12:45 am #1366787
ChristopherModeratorLet us now if you have further questions.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1290775 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
