Forum Replies Created
-
AuthorPosts
-
Dan Smith
ParticipantI can confirm this as well. I've tried this on several of my sites. If you select Location → Post Type → Page ( page ). Then under Advanced location rules → +add rule, the select box is blank and if you click into that box it doesn't bring up any of the available pages on the website. If you try to help it along and type the first letter of a page, as stated above, the form auto reloads to a blank page.
November 9, 2022 at 10:48 AM in reply to: ✅Using a Open Street Map with an address text field inside a group #39021Dan Smith
ParticipantThanks for the reply, once I changed my code to what you suggested everything worked as expected.
Dan Smith
ParticipantI'm having a problem as well using the above code. In my case the maps display briefly then bring up a google error:
Oops! Something went wrong.
This page didn't load Google Maps correctly. See the JavaScript console for technical details.Google shouldn’t have any concern with this, that’s why I was using Open Streets Map.
Hopefully when you assist Shemzone it will also give me a bump in the right direction.
Dan Smith
Participantthanks, got me close enough that I now have an idea about what I'm doing.
Dan Smith
ParticipantThat worked, thanks!
Dan Smith
ParticipantI appreciate the answer though if I replace the code you and your documentation have provided I get an error for line 3
<?php $group = rwmb_meta( 'car' ); $image_ids = $group['image_key'] ?? : []; foreach ( $image_ids as $image_id ) { $image = RWMB_Image_Field::file_info( $image_id, ['size' => 'thumbnail'] ); echo '<img src="' . $image['url'] . '">'; } ?>Even though it says image_key and not image_id I tried it as above, then replaced the 'image_key' with the id for my image, same result for both attempts, error line 3
Dan Smith
ParticipantBeen kind of distracted lately, just noticed that the other meta box fields were blank within the editor. I'm guessing the data isn't there until the repeater content is display on the frontend.
I added
<?php if (rwmb_meta( 'music', '', $postal )) : ; $postal = get_the_id(); $values = rwmb_meta( 'music', '', $postal ) ; echo 'Music: '; foreach ( $values as $value ) { echo $value; echo '<br />'; } endif; ?>Error is gone and everything works ok on the frontend.
Dan Smith
ParticipantIt's easy enough to get the post ID in a repeater. I have code in another plugin which causes the display of the id as a column when I display all the posts.
Placing this code:
<?php $postal = get_the_id(); echo $postal; $values = rwmb_meta( 'music', $postal ) ; foreach ( $values as $value ) { echo $value; echo '<br />'; } ?>I get the display
598I Don't Need the Booze by Alan Jackson
Redneck Love Gone Bad by Diamond Rio
You Turn Me On by Tim McGraw
That Don’t Impress Me Much by Shania Twain598 Is the ID for that particular Post and each subsequent post has the correct ID as well yet I am still getting the error.
Dan Smith
ParticipantThe code block is on a page. The problem, maybe that it is within an Oxygen Repeater. Tried adding the $post_id, checked online, some suggested a '&' in front of the $value, tried that.
Same error, still working on frontend.
-
AuthorPosts