Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Page & Category Menu Bars »

How do I make one custom link in the Pages Menu?


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Oct 27, 2009, 09:27 AM
kippiper
 
135 posts · Jun 2009
How do I make one custom link in the Pages Menu?

Hi guys!

I searched previous threads and found an answer to this question (with the same title) from Flynn. However, I am getting an error message.

Flynn said: Add this to the bottom of Atahualpa's functions.php

<?php function replace_menu_link($string) {
return str_replace('http://www.yoursite.com/link/to/dummypage/',
'http://www.othersite.com/link.html', $string);
}
add_filter('wp_list_pages', 'replace_menu_link');
?>

Now, to be clear on what I did, I literally did what he said and added this as an additional <? ?> section after the last ?> of the original function.php code. My specific code is:

<?php function replace_menu_link($string) {
return str_replace('http://bestbiztips.com/quickmedquote/web-conference/',
'http://wc.iboomerang.com/skin-iboomerang/join.jsp?p=7711106', $string);
}
add_filter('wp_list_pages', 'replace_menu_link');
?>

Doing this, I get the following error:

Parse error: syntax error, unexpected T_STRING in /home/content/a/b/x/abxnetwork/html/quickmedquote/wp-content/themes/atahualpa/functions.php on line 1059

The website I am working on is for a client: http://www.bestbiztips.com/quickmedquote. I want the Web Conference page to go to an outside URL.

I am not conversant in PHP, so this is pretty Greek to me.

What am I missing?

Thanks so much!

KIP
  #2  
Old Oct 27, 2009, 10:45 AM
juggledad's Avatar
juggledad
 
22,782 posts · Mar 2009
OSX 10.10.1 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
What version of Atahualpa and WP?

check your code and make sure there are no invisible characters in it. When I copied the code from the other post, it shows several non-printable characteres which will cause errors when being parsed by php.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Oct 27, 2009 at 11:42 AM.
  #3  
Old Oct 27, 2009, 10:49 AM
kippiper
 
135 posts · Jun 2009
LOL! That would help!

The latest of both: WP 2.8.5 and Atahualpa 3.4.1

Thanks!
  #4  
Old Oct 27, 2009, 10:54 AM
juggledad's Avatar
juggledad
 
22,782 posts · Mar 2009
OSX 10.10.1 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Atahualpa is at 3.4.4 - see http://wordpress.bytesforall.com/?p=81
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Oct 27, 2009, 11:37 AM
kippiper
 
135 posts · Jun 2009
Hi Juggledad -

Okay, I upgraded and inserted the suggested code as I previously described.

Now I am getting this error:

Parse error: syntax error, unexpected T_STRING in /home/content/a/b/x/abxnetwork/html/quickmedquote/wp-content/themes/atahualpa344/functions.php on line 657

I have left the site with the error showing.

So I am still doing something wrong!

Thanks!
  #6  
Old Oct 27, 2009, 11:50 AM
juggledad's Avatar
juggledad
 
22,782 posts · Mar 2009
OSX 10.10.1 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
please send me a copy of your functions.php I can't reproduce this adding your code in. Must be something else.

If you can't figure out how to send a copy, you can create me an id (send it in a PM) so I can look at your backend (Dashboard->Apearances->Editor) to look at the code.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't make a link work on a page. Imawebgirl Forum How-To 8 Oct 24, 2009 08:12 PM
[SOLVED] How do I make one custom link in the Pages Menu? iPuppet Page & Category Menu Bars 7 Sep 24, 2009 12:22 PM
Single Post Pages--How to make post title a link? chainpin Atahualpa 3 Wordpress theme 4 Aug 20, 2009 01:02 PM
How to make the Pages display in sidebar, show only the Parent Main Pages Leoni Sidebars & Widgets 2 May 27, 2009 12:13 AM
Adding custom pages to menu FH4U Page & Category Menu Bars 2 Feb 9, 2009 02:31 PM


All times are GMT -6. The time now is 06:24 PM.


Powered by vBulletin® Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.