- This topic has 13 replies, 3 voices, and was last updated 5 years, 2 months ago by
Tom.
-
AuthorPosts
-
March 9, 2017 at 11:02 pm #289574
David
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.
GeneratePress 1.3.44March 9, 2017 at 11:31 pm #289582Tom
Lead DeveloperLead DeveloperHi there,
So you’re wanting to change the URL your logo points to?
If so, this filter should help: https://docs.generatepress.com/article/generate_logo_href/
An example can be found here: https://generatepress.com/forums/topic/change-default-url-logo/#post-287472
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMarch 10, 2017 at 12:19 am #289592David
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.
March 10, 2017 at 1:29 am #289624David
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.
March 10, 2017 at 6:18 am #289721Leo
StaffCustomer SupportHi 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.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 11, 2017 at 2:58 pm #290225David
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.
March 11, 2017 at 3:04 pm #290226Leo
StaffCustomer SupportSorry where are you adding this code right now?
I don’t see it on this page: http://a20.c48.myftpupload.com/
Am I missing something?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 11, 2017 at 3:05 pm #290227David
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.
March 11, 2017 at 3:55 pm #290230Tom
Lead DeveloperLead DeveloperHmm, 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; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMarch 11, 2017 at 4:39 pm #290233David
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
March 11, 2017 at 4:39 pm #290234David
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!
March 11, 2017 at 4:43 pm #290235Leo
StaffCustomer SupportHi David,
Just want to make sure the the code Tom provided is added in the right place.
The first part of code should be added in code snippet: https://docs.generatepress.com/article/adding-php/
The second part is CSS: https://docs.generatepress.com/article/adding-css/
Let us know.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 11, 2017 at 4:54 pm #290237David
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!
March 11, 2017 at 8:48 pm #290254Tom
Lead DeveloperLead DeveloperSince 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.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.