Forum Replies Created
-
AuthorPosts
-
[email protected]
ParticipantHi, thank you. So do I understand correctly this is only possible with code?
June 22, 2023 at 1:15 AM in reply to: ✅Can't use checkbox and switch field on local installations #42317[email protected]
ParticipantHello, I exported the field groups and cloned the installation freshly and then reimported the fields and for now it works fine again. I don't know the reason, because the other installation was also pretty fresh. ...Since working locally I experience more problems in general with local wp..
Thanks for your help anyway.[email protected]
Participantok, thank you. I'll try that (..although I think I tried this already, via Bricks Builder Templates)
[email protected]
ParticipantHi,
I'll send you the export of the field group by email.
This group contained only html fields.Shorty I had the same issue on a fresh wp install where I created a field group for a setting page with around 15 fields. Then all of a sudden they where gone. Can't remember if I was changing the name of the group but it's likely I did. All of the fields had NO ENTRIES, and slowly slowy I think this problem occurs more likely when there is no data or just html fields..
I'll let you know if the problem occurs again in future.
François
January 6, 2023 at 2:26 AM in reply to: ✅Predefined Values for Textareas / HTML-Code for Textfield #40137[email protected]
ParticipantHello
Thanks for your reply
1. no, I mean predefined values for textarea field (same as for text field). Is this somehow possible?
2. oh wow that's great, it works. finally I can use HTML for predefined values
3. great
[email protected]
ParticipantIt works and fixed also another bug.
Thanks a lot.
François[email protected]
Participantthank's a lot. I'll try this.
July 24, 2022 at 2:01 PM in reply to: ✅Update Post Meta after inline editing with admin columns pro #37158[email protected]
ParticipantHi
I checked the support forum of ACP and found this post
https://www.admincolumns.com/forums/topic/update-term-during-acp-editing-saved-action/...which finally endet to the same post I already found on github
https://github.com/codepress/admin-columns-hooks/blob/master/acp-editing-saved.phpSo at least it makes me more confident this solution will work. Takes a bit time for me to test/implement, ..still at beginner level 🙂
Have a nice day
François[email protected]
ParticipantHi Long
Thanks for your reply.
I found the reason: I needed to add ->ID at the end, so
'$go_price = rwmb_meta( 'fg_sale_price', '', $object>ID );'
But I don't know why it was working with normal text fields.
However, now it's working fine 🙂Thanks and regards
François[email protected]
ParticipantHi
Thanks for the snippet. It works now.
But I do not understand why for this custom query in one case I need to use the wp function and in other cases not (eg. post.post_title)? Is there a simple answer?Thanks
December 6, 2021 at 8:04 PM in reply to: ✅Creating a custom field with value from other custom fields #32455[email protected]
ParticipantHi and thank you.
Unfortunately the code is not working. I see I need to leverage my php knowledge urgently to get things like this work.
Hava a nice day.
December 5, 2021 at 2:24 AM in reply to: ✅Creating a custom field with value from other custom fields #32426[email protected]
ParticipantHi,
Thanks for your hint. Unfortunately this to high for me. I can't see where to change to code to get the term id on backend.
This is my code. I don't know if you can provide the correct snippet.
If not, thanks anyway. I understand.<?php add_action( 'rwmb_after_save_post', function( $post_id ) { $terms = get_the_terms( get_queried_object_id(), 'artists' ); foreach ( $terms as $term ) { $term_name = rwmb_meta( 'fg_meta_artist_name', ['object_type' => 'term'], $term->term_id ); $term_name_first = rwmb_meta( 'fg_meta_artist_name_first', ['object_type' => 'term'], $term->term_id ); $value = $term_name_first; } update_post_meta( $post_id, 'fg_taxo_object_artist_names', $value ); } ); ?>December 2, 2021 at 4:22 AM in reply to: ✅Creating a custom field with value from other custom fields #32340[email protected]
ParticipantHello
Yes the 1st code is implemented on the single post template (cpt) (php code block in oxygen builder).
The 2nd Code is in a code snippet and should update the field 'fg_taxo_object_artist_names' after saving a post in the editor (no frontend submission).
But the field is not updatet. I guess the field values of the taxonomies are not fetched?
(why is it working on frontend but not on backend?)Hope I was able to explain more clear.
November 29, 2021 at 7:56 PM in reply to: ✅Creating a custom field with value from other custom fields #32260[email protected]
ParticipantHello
I was basicly succesfull with your help. One thing is not working though:
When using this code on frontend of the post, it is working fine and showing the first name of the artist (fetched from custom taxonomy field):
<?php
$terms = get_the_terms( get_queried_object_id(), 'artists' );foreach ( $terms as $term ) {
$term_name = rwmb_meta( 'fg_meta_artist_name', ['object_type' => 'term'], $term->term_id );
$term_name_first = rwmb_meta( 'fg_meta_artist_name_first', ['object_type' => 'term'], $term->term_id );$value $term_name_first;
echo $value;
}?>
When trying to fill an empty custom field (text) with the same value, the field it not filled up:
<?php
add_action( 'rwmb_after_save_post', function( $post_id ) {< code from above (without echo) >
update_post_meta( $post_id, 'fg_taxo_object_artist_names', $value );
} );?>
Both fields are text fields.
Do you see any reason why this is not working?Thanks a lot in advance.
Regards, FrançoisNovember 24, 2021 at 2:53 PM in reply to: ✅Showing Custom Fields of related Terms in Single Post #32134[email protected]
Participantthanks a lot. that was very helpful.
-
AuthorPosts