Site logo

Archived topic

Changing Header Link

13 replies · Started by David on March 9, 2017

Viewing posts 1–14 of 14

I really want to change a link within my header, I am working on a food website which wants an 'Order Now' link. And i was hoping to change the coding so it pops straight to their site, but when i go into the Editor section I can not seem to find where i can change the coding.

Can anyone help.

So sorry, i dont mean my logo but actual menu paths.

http://a20.c48.myftpupload.com/home1/

I have an order now. But i want that to be link to the order system they have set up with a company that had given me a link for a button. But its ugly and doesnt look good where i have tried placing it.

So sorry, i dont mean my logo but actual menu paths.

http://a20.c48.myftpupload.com/home1/

I have an order now. But i want that to be link to the order system they have set up with a company that had given me a link for a button. But its ugly and doesnt look good where i have tried placing it.

Hi David,

Looks like you are on the right track of using the Custom Links in the menu?
Just need to figure out where their Order Now button links to and add the same URL in your Custom Link?

Let me know if this answers your question.

HI Leo thats my problem they dont have that...just a button

<!-- If you would like to customize the button, remove or change the "class" attribute inside the <span> tag -->
<span class="glf-button" data-glf-cuid="8989e330-ed1a-40fe-a7ed-1f955c2bcdd4" data-glf-ruid="7478bc11-2495-45d8-9a86-5c92e43a21f1" data-glf-auto-open="false"> See MENU & Order</span>
<script src="https://www.foodbooking.com/widget/js/ewm2.js" defer async ></script>

Which looks ugly to be honest and im wanting to create a better look for my site.

I am wanting to add it to my title list, so where it says 'Order Now' i would love to have that as the link to where this button does take you.

The only place right now this button is being used is in the locations, with Robson.

Hmm, to add HTML with attributes like that you would have to hook it into the navigation.

Something like this:

add_action( 'generate_inside_navigation', 'tu_add_html_button_to_nav' );
function tu_add_html_button_to_nav()
{
    ?>
	<div class="custom-order-button hide-on-mobile">
            Your code in here
        </div>
    <?php
}

Then some CSS:

.custom-order-button {
    float: right;
}

I have put this coding in the hook, but the coding appears as text!

I copied and pasted what you put as well, so dont know what I have done wrong :S

Parse error: syntax error, unexpected '}' in /home/content/p3pnexwpnas07_data01/21/3597921/html/wp-content/plugins/gp-premium/hooks/functions/hooks.php(22) : eval()'d code on line 10

Thats the code i get on the site!

Its not working, Its got the text of "See Menu" but the link isnt working and the look and feel isnt going in the right direction.

Just to be 100% is there no way I can manipulate the coding so that the word "ORDER NOW" in my menu will take me to the function of the button with out having an ugly button!

BTW thank you so much for helping!

Since the HTML they're providing isn't even a link, it won't work by adding it as a menu item I'm afraid (as those are all links).

You also can't add it as a custom link, as WP custom links don't allow for all of the custom attributes that element has.

The best bet is the method I mentioned, which might need to be styled with CSS.

If the link itself wasn't even working with that method, there might be something wrong with the code itself.

This archived topic is closed to new replies.