The custom field is displayed as local, but not in the production environment.
Custom field settings are arranged locally and in production.
Custom field Field name: temp-info Type: Select Choices yes: Yes no: No
<? php $temp_info = get_post_meta (get_the_ID (), "temp-info", true);?> <? php if ($temp_info == "yes"):?> <section> "> "> </section> <? php endif;?>
var_dump ($temp_info) the_field ('temp-info')
When you execute, the value changes locally.
string (3) "yes" yes
However, the value does not change in production.
string (0) ""
In such cases
What other methods should I use to find the cause?
Answer # 1
The problem is in the function of another partial loop
It was because ID was not correctly acquired by get_the_ID () because it was not described.
(Because I kept other ids)
I was looking for problems locally, but I learned that
wp_reset_postdata ();is very important.
- php - in wordpress article sort, sort at the end if the custom field is blank
- wordpress - wp multisite custom field naming
- wordpress - i want to specify the save destination of the custom field file
- images are not displayed well in custom html of wordpress widget
- wordpress - i want to reflect the contents of the custom field on the post list page
- php - the map input field of wordpress is not displayed
- wordpress - the list for each category is not displayed, but the list of all posts is displayed
- the wordpress installation start screen is not displayed
- i want to be able to narrow down and search the value of a wordpress custom field
- the line breaks entered in the text area of the custom field on the wordpress edit screen are automatically deleted one by one
- wordpress article text is not displayed
- php - to use custom fields in the wordpress theme "customizr"
- [wordpress] when i insert the short code of wp mw form into the idnex file, the form page is displayed for some reason
- html - although it is displayed correctly in the production environment, i want to find out the cause that the display is broken
- Python log: custom output field json format output method
- i want to fix the code in the wordpress production environment
- i want to add an item to a comment in a custom field and output all the results to singlephp
- wordpress - how to display advanced custom fields subfield images?
- wordpress - questions about wp custom fields search
- is it possible to set the number of articles displayed on the top page of the wordpress theme xeory extension to 10 articles whe
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- python - you may need to restart the kernel to use updated packages error
- python 3x - typeerror: 'method' object is not subscriptable
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- android studio - unresolved reference comes out in kotlin