Wordpress Advanced Custom Fields Google Maps field is not displayed - wordpress

Hello.
I guess it's very simple, but I cannot find the solution of my problem anywhere. I want to add the "google-maps" field with the plugin Advanced Custom Fields (and there is plenty of instructions for this action in the internet). But ACF doesn't give me such option. In the list of possible types of fields there is no "google map", see the screenshot with the available types. Should I switch it on somehow previously, and if yes, where is the setting? Thank you.
1
Wordpress 4.5.2, ACF 4.4.7

Related

Advanced custom field with short codes

Can i display the data which are in the advanced custom fields using shortcodes without editing theme codes, in my web page front end. If the answer is yes, how can i do this? If not are there any methods to do that easily without deep coding knowledge.
chatGPT says yes but I couldn’t.
Yes, you can. There is an ACF shortcode. See here: https://www.advancedcustomfields.com/resources/shortcode/
[acf field="field_name"]
You can also pass a post id to get the field of another post:
[acf field="field_name" post_id="123"]
However, this does not work for all field types. But there is a Wordpress plugin with which you can display the custom fields called ACF Views: https://wordpress.org/plugins/acf-views/

CPT instead of WooCommerce "Product"

I have a problem that hopefully you will help me solve.
I'm am pretty new with this job and don't know pretty much anything about coding yet. I built some websites using Elementor but never touched WooCommerce before and now I am working on a real estate website with lots of houses uplouded as a Custom Post Type (which I will call "ANN").
My problem is: my client wants to have a live catalogue of the selling houses for ADS and stuff.
Searching the Web I figured out that WooCommerce is the best way to do it even if I don't need the shopping cart (if you have other ideas are welcome) but as far as I understand WC have ITS OWN CPT "Product" and I wonder how canI set it to use my ANN instead of PRODUCT to the listing?
Is that possible?
The main problem is that there are lots of real estate ads already uplouded so change them is a no go.
I'm using JetEngine plugin for the CPT, Filters, etc.. if this can help somehow.
Thank you for you time!
You could achieve that with the Advanced Custom Fields plugin, but you're gonna need elementor pro.
You can create all the additional fields for the information you need to be displayed in that post type using ACF.
See this link for more information: Creating a Field Group
Make sure your custom post type supports custom fields, if you created it with the CPT UI plugin, you can check that by editing your custom post type and scrolling all the way down. You should see a section with a list of things supported by your custom post type, check custom fields and save.
Then create a template for the custom post type using Elementor's theme builder: How to Create a WordPress Single-Post Template in Elementor
Add the custom fields to the template using the ACF integration with Elementor: Elementor Integration With ACF
Lastly, create a custom loop for your custom post type archive using the Elementor custom skin plugin, so yiu can display the custom fields also in the archive if you need to:
How to display posts in Elementor Pro with your own Design (Elementor Custom Loop)

bilingual custom field labels with ACF (free version)

I am using custom fields (with the free version of ACF) to add additional, sometimes required, formatted content to the respective custom post type entries. I put together a little site-specific plugin which includes filters to add the custom fields to excerpt and content and puts them out, via a loop, as a list of:
{CUSTOM FIELD LABEL}: {CUSTOM FIELD VALUE}
The website should be available in English and German. Using the Sublanguage plugin, I could translate most of the website, but not the custom field labels.
From what I read on i18n/l10n and Wordpress, I understood that I should best use __() for the labels when creating the custom fields. Since custom field creation is realized by ACF plugin code, I assume I have to create the fields "myself" so that I can do multilingual labels using __(). I guess, I would then realize the actual translation of the fields with Loco Translate.
ACF offers a neat way to export my already existing ACF-created field groups, which provides me with the PHP code to create the fields "on my own". I put the ACF code inside a new function in my site-specific plugin and hooked it to the acf/init action. I did pretty much the same as described in this question, but nothing happens: When I trash the custom field groups within the ACF interface afterwards, no custom fields appear in the "new post" screen.
So basically, I am having one question that, depending on the answer, will spawn follow-up questions:
Is this how I should and can realize bi/multilingual custom field labels?
If no: How else would you implement bilingual custom field labels/names?
If yes: Am I hooking the function to the wrong action?
PS: I wasn't sure if this belongs here or in the WP StackExchange, since part of it is coding related and part of translation-logic-related. Please tell me if I should move it over to the other platform.
Alright,
I was able to solve most of this myself in the meantime:
I did not hook into the correct action. As it turns out, acf/init is only available in ACFv5 (pro), while the free edition is still in version 4.x. I hooked into init - et voilĂ : there are my field groups.
Using __() functions to declare my custom fields' labels, Loco Translate made it quite easy to translate the strings myself.
Conclusion
Apparently, my assumptions were correct - this is how to create internationalized custom field labels :) Nevertheless, I wasn't able to effectively translate the options of a checkbox field I am using, although Loco recognized the string and I provided a translation.
However....
The solution is far from perfect:
I am now using two plugins to translate as much as possible on the website.
Creating the ACF field groups "myself" through PHP code in my site-specific plugin, I needed to remove them from the admin UI. This means, that it's going to be difficult for any standard users to change anything about them in the future (which might of course be a feature as well :))

Wordpress - form to capture the values for the custom post type

I want to add a new entity named "ideas" having different fields. I want to add this to the admin side, where a logged in user can add/edit new "idea", which can be published/unpublished to the site.
I don't want to edit via php and make things complicated, instead do it from the wp-admin log in front-end. Is there a plugin for this? I need 3-4 such entities to be created, and define fields for each such entity.
New edit:
Custom Post Type is the best option I feel. Can anyone suggest, a free plugin for form to capture the values for the custom post type?
According to this WCK - Custom Fields and Custom Post Types Creator plugin you can achieve this.
WordPress Creation Kit consists of three tools that can help you
create and maintain custom post types, custom taxonomies and most
importantly, custom fields and metaboxes for your posts, pages or
CPT's.
WCK Custom Fields Creator offers an UI for setting up custom meta
boxes with custom fields for your posts, pages or custom post types.
Uses standard custom fields to store data.
WCK Custom Post Type Creator facilitates creating custom post types by
providing an UI for most of the arguments of register_post_type()
function.
WCK Taxonomy Creator allows you to easily create and edit custom
taxonomies for WordPress without any programming knowledge. It
provides an UI for most of the arguments of register_taxonomy()
function.
Hope it helps you.
You can use a combination of two plugins to fit your needs:
The Custom Post Type UI (https://wordpress.org/plugins/custom-post-type-ui/) makes it possible to generate Custom Post Types (like "Posts" or "Pages") and Custom Taxonomies. This is how you can create your entity "ideas" which will show up in the admin menu.
With Advanced Custom Fields (https://wordpress.org/plugins/advanced-custom-fields/) you can define additional content fields for your "ideas"-posttype and others. It also can handle relations between your added custom-post-types
Using the SWIFT Templates as proposed in Touqueer Shafis answer will be sufficient when you only have smaller bits of information to display on the page or if you just want to display archives of your custom-post-types. But you will quickly reach the borders of these templates when it comes to single-pages.
I recommend altering the PHP of your template files manually: you will have more control where and when to display the contents of the custom-post-types and custom-fields you added on your page.
Well, I'm not really gonna give you the answer you want to hear but I want to give you an advice from my own experience.
Using a plugin will make things usually much more complicated than doing it manually. Consider some things:
1) The plugin may not be supported for ever (or long), so if the author decides that he or she wants to be a gardener instead of a developer you're screwed. Unless you want to wrap your head around the plugin code and proceed developing it on your own. This is especially true for "underground"-plugins which are not so popular and/or maintained by a single person. Although I think you CAN rely on the "big" players like "Advanced custom fields"
2) At some point you may find that the plugin you are using doesn't support some sort of customization that you really need and quite a few plugins are built in a way that makes it hard to extend them or break out from the way they work.
So I recommend you to wrap your head around custom taxonomies and post types and just add them with PHP in your functions.php or a custom plugin. It's very very easy (it's really just arrays with arguments). You could use this visual code generator as a starting point:
http://generatewp.com/post-type/
And for adding custom fields I recommend using Advanced custom fields. You won't need any other plugin for backend management customization and it's built in a way that you can even export your custom fields as php so if they ever drop support you still have a good starting point.

Advanced custom fields for wordpress

Advanced custom fields for wordpress... Plugin
source: http://support.advancedcustomfields.com/discussion/2784/image-fields-on-custom-post-type-values-have-all-gone
I updated my advanced custom fields and all image field values have disapeared.
I checked in the database and i still see the information but they're not linking up correct.
God.. any ideas? :(
You'd better check out the depreciated bits of code. I found this same issue with the_repeater_field (http://www.advancedcustomfields.com/docs/functions/the_repeater_field/) it got depreciated and I had to update my code to the right functions.
Check this page out to see if any of these relate to your problem: http://www.advancedcustomfields.com/docs/functions/
Checkout Bonzer Custom Fields Creator:
https://wordpress.org/plugins/bonzer-custom-fields/
It creates wide array of input fields at various places inside the wordpress admin panel.
Places in the wordpress admin panel where custom fields are applicable includes:
All Post Types
All Taxonomies
Pages:
Dashboard (Home)
Users (Your Profile)
Settings (All Pages)
Give it a try, I am sure you will love it.

Resources