Comments (24)
Hello,
So you have the "acf-website-field" folder in your theme folder?
Once you have that, you need to edit your functions.php file and add the following line to activate the field for Advanced Custom Fields.
include_once( rtrim( dirname( FILE ), '/' ) . '/acf-website-field/website_url.php' );
Are you getting any error messages?
from acf-website-field.
Yes, the folder is in my current theme folder. When I add that line, I get this:
Fatal error: Class 'acf_Field' not found in /home/content/67/9284167/html/wp-content/themes/shiny/acf-website-field/website_url.php on line 15
from acf-website-field.
Whenever I add the code, I have to re-install my functions.php file via ftp because that's all my whole website displays...
www.morrisnilsenfuneralchapel.com
from acf-website-field.
That error message suggests that you don't have Advanced Custom Fields plugin active I think but could be wrong on that.
http://wordpress.org/extend/plugins/advanced-custom-fields/
from acf-website-field.
Ok. I am able to modify the fields and it shows up in my post editor, so I
know it is activated...
I added the code to add a date & time field, and was able to get that one to
work, but it was different looking code... I found that one here:
http://soderlind.no/archives/2012/03/09/time-picker-field-for-advanced-custom-fields/
Does that help at all?
-----Original Message-----
From: Geet Jacobs
Sent: Monday, May 14, 2012 5:24 PM
To: ericaeide
Subject: Re: [ACF-URL-Field] Need help with this (#1)
That error message suggests that you don't have Advanced Custom Fields
plugin active I think but could be wrong on that.
http://wordpress.org/extend/plugins/advanced-custom-fields/
Reply to this email directly or view it on GitHub:
https://github.com/Jeradin/ACF-URL-Field/issues/1#issuecomment-5703838
from acf-website-field.
Would you be willing to install this for me if I gave you my login info? I've tried everything :(
from acf-website-field.
I apologize for this, I had the wrong includes in my functions instructions.
Can you download a fresh zip and use the following code in your functions.php file?
register_field('Website_field', dirname(File) . '/acf-website-field/website_url.php');
from acf-website-field.
Thank you for checking and fixing it! I am so new at this that I assumed I
was doing something wrong, lol. All is working now and it's exactly what I
was looking for.
-----Original Message-----
From: Geet Jacobs
Sent: Tuesday, May 15, 2012 10:43 AM
To: ericaeide
Subject: Re: [ACF-URL-Field] Need help with this (#1)
I apologize for this, I had the wrong includes in my functions instructions.
Can you download a fresh zip and use the following code in your
functions.php file?
register_field('Website_field', dirname(File) .
'/acf-website-field/website_url.php');
Reply to this email directly or view it on GitHub:
https://github.com/Jeradin/ACF-URL-Field/issues/1#issuecomment-5719173
from acf-website-field.
Oops one more thing. When I add a url and check the box "open in a new
window", it actually makes it open in the same window. If the box is
unchecked, then it opens in a new window.
-----Original Message-----
From: Geet Jacobs
Sent: Tuesday, May 15, 2012 10:43 AM
To: ericaeide
Subject: Re: [ACF-URL-Field] Need help with this (#1)
I apologize for this, I had the wrong includes in my functions instructions.
Can you download a fresh zip and use the following code in your
functions.php file?
register_field('Website_field', dirname(File) .
'/acf-website-field/website_url.php');
Reply to this email directly or view it on GitHub:
https://github.com/Jeradin/ACF-URL-Field/issues/1#issuecomment-5719173
from acf-website-field.
Hey Eric,
Good catch. You can replace line 271 in the php file to correct this.
if($value['internal'] == '1'){ $external = 'target="_blank"';};
What are your thoughts on this, either the default option for all website links is an external link (new window) and when adding the field to give the option to make it internal link?
Or is it better to have the link default as internal link with a user checking if its external?
from acf-website-field.
Thanks again, I will add that in! :)
I would say the default should be external link/new window, with a choice to
make it open in the same window... I guess just because most sites I've come
across seem to do it that way.
Will you be writing any more plugins/custom fields to add on? I wish I knew
how to make some!
Erica
-----Original Message-----
From: Geet Jacobs
Sent: Tuesday, May 15, 2012 4:38 PM
To: ericaeide
Subject: Re: [ACF-URL-Field] Need help with this (#1)
Hey Eric,
Good catch. You can replace line 271 in the php file to correct this.
if($value['internal'] == '1'){ $external = 'target="_blank"';};
What are your thoughts on this, either the default option for all website
links is an external link (new window) and when adding the field to give the
option to make it internal link?
Or is it better to have the link default as internal link with a user
checking if its external?
Reply to this email directly or view it on GitHub:
https://github.com/Jeradin/ACF-URL-Field/issues/1#issuecomment-5728197
from acf-website-field.
Erica, thanks for your thoughts, I agree and have updated the code to do the external link as default with a "Open in Same window" checkbox.
from acf-website-field.
Great. But, question: my links aren't showing up at all now on my posts - I
replaced the php file with the new release. Any ideas?
-----Original Message-----
From: Geet Jacobs
Sent: Wednesday, May 16, 2012 12:20 PM
To: ericaeide
Subject: Re: [ACF-URL-Field] Need help with this (#1)
Erica, thanks for your thoughts, I agree and have updated the code to do the
external link as default with a "Open in Same window" checkbox.
Reply to this email directly or view it on GitHub:
https://github.com/Jeradin/ACF-URL-Field/issues/1#issuecomment-5746513
from acf-website-field.
Wondering if you saw my last message... After the code update, now my links aren't showing up on post pages.
from acf-website-field.
Very sorry Erica, I didnt see your message, oops!
Fixed now, uploaded new file but you can just edit your php file.
Replace line 286 - if($value['url'] == '' ){
from acf-website-field.
No problem, I had forgotten about it too, hehe. Still not showing up for me on the front end, even though I uploaded all new files. Can't figure out what's wrong.
from acf-website-field.
Hmm, not able to duplicate the error. I am seeing any link I add in my post when I add Which I was not before hand I was not before editing the code.
from acf-website-field.
Is there any way to download the old code? I'm so bummed! I've tried with new field names and everything.
from acf-website-field.
If you can edit the php file we can get it back to before.
like 286 :
if($value['url'] == '' ){
return $value;
};
remove all of that except the return $value; part, that should work.
I can email you an older file if you like also.
from acf-website-field.
Ugh :( Now I get an error. Sorry about all this. I could PM you an admin login if you'd be willing to look at it - totally up to you, I appreciate all the help you've given me so far! Like I said I'm pretty new at this. 'memorial_link' is the url field that isn't showing up.
I don't have a single.php in my theme so all my code to display the fields is in the index.php... you'd just search for this:
from acf-website-field.
I dont mind logging in and checking it out for you.
PM away!
from acf-website-field.
Thanks! Couldn't figure out how to PM so I sent a message thru your website link.
from acf-website-field.
That should fix it up!
yay!
from acf-website-field.
Nice, thank you for your help!! What had I done wrong? lol
-----Original Message-----
From: Geet Jacobs
Sent: Tuesday, May 29, 2012 5:54 PM
To: ericaeide
Subject: Re: [ACF-URL-Field] Need help with this (#1)
That should fix it up!
yay!
Reply to this email directly or view it on GitHub:
https://github.com/Jeradin/ACF-URL-Field/issues/1#issuecomment-5998150
from acf-website-field.
Related Issues (20)
- Error message fired when field required HOT 9
- Internal Link HOT 1
- 'http://' is not attached, if an array is returned HOT 3
- Website Field Value not showing with wp_insert_post + update_post_meta HOT 1
- External link not working when placed on images HOT 2
- How has the code look like?
- Possible to add input validation HOT 4
- Any way to use relative links (by not adding http)? HOT 2
- Just a URL output... HOT 4
- HTTPS support HOT 2
- Repeater Output HOT 1
- ACF 5.0 upgrade - plugin not working HOT 3
- External Link not working HOT 1
- Tagging HOT 1
- No options in 5.1 HOT 1
- Current windows HOT 1
- URL Validation HOT 1
- Required is not working
- Screen shots HOT 1
- field is not operating as a link, it is behaving like a text field - anyone else had this issue? I'm using ACF 4. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acf-website-field.