Forum Replies Created
-
AuthorPosts
-
Marius Doko
ParticipantHello Long,
Thank you, actually, i achieved this with metabox, you can mark this topic as resolved
Marius Doko
ParticipantHello Long,
Okay thank you for your answer ๐
Marius Doko
ParticipantHello, any answer?
Marius Doko
ParticipantHello,
I am also having issues on View, but not with google maps but with OSM. Since the last update, i can't see the map in the frontend. In backend works well
Marius Doko
ParticipantHello,
I have enqueued the Jquery library + Jquery Ui and stylesheet, and it is displaying 2 calendars in this case, one that is working and another one that is not working. It is working only if i have Inline activated in datepicker.
Please see this short video: https://www.awesomescreenshot.com/video/9967488?key=95fb3b6fbc9876b6d6b5ea296832b0eaI have also changed the theme to twentytwentytwo. The same problem is there.
Marius Doko
ParticipantI am using the custom fields in MB View through Frontend Submission Shortcode, I tried many ways and couldn't make it work. I followed also this guide from this link https://codehasbug.com/javascript/disable-specific-date-in-jquery-datepicker/
Marius Doko
ParticipantHello Long, for the 1st question, i am using this code to disable weekends as per their instructions, I added it in the View Javascript area, also i tested it from the file folders by creating a js file, but didn't work either. Do you have any solution for how you would achieve this?
<script type="text/javascript"> $(function () { $("#exampleDatepicker4").datepicker({ defaultDate: "+1w", changeMonth: true, numberOfMonths: 1, beforeShowDay: $.datepicker.noWeekends }); }); </script>I saw the documentation which you sent me by links, and there was only how to display the field date which i have it already.
For the 2nd question, I tried it but it didn't work, probably because i am using it on local website, but the link redirection worked.
Marius Doko
ParticipantHello,
Yes, that way I tried and it works, but what I was trying to make was:
Once you click the specific location taxonomy, it will show only the related Profiles to that taxonomy for choosing. In case you have 4 location terms and you define all ids of locations, will not display the related profiles but will display all these profiles in 4 location terms instead.But I found a solution for it, I created this form using select advanced + conditional logic. So no need to use the logic from taxonomies.
I have a couple of more questions if that's fine.
- I am trying to disable Saturdays and Sundays for Datepicker, but it doesn't work the way that I am adding it. I tried also doing it as [0,6]. https://tinyurl.com/23xosb8k
- Is it possible to set up an email for the form submission? Like when someone fills the form, goes email from our site to that person
Marius Doko
ParticipantI tried that but it's taking all the terms, THanks a lot Long!
Marius Doko
ParticipantHello,
Thank you, that worked. But it's working for a single location. If I have multiple locations, what can be the best practice?
Marius Doko
ParticipantHey Long,
Here is my code, I did some tests and this is how it is atm. I tried to create a connection through these query args between Location CPT and Profile taxonomy, but so far I couldn't achieve it
<?php add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' ); function your_prefix_function_name( $meta_boxes ) { $prefix = ''; $meta_boxes[] = [ 'title' => __( 'Appointment Fields', 'your-text-domain' ), 'id' => 'appointment-fields', 'post_types' => ['appointments'], 'fields' => [ [ 'name' => __( 'Email', 'your-text-domain' ), 'id' => $prefix . 'appointment_email', 'type' => 'email', 'required' => true, ], [ 'name' => __( 'Location', 'your-text-domain' ), 'id' => $prefix . 'appointment_location', 'type' => 'post', 'post_type' => ['location'], 'field_type' => 'select_advanced', ], [ 'name' => __( 'Appointment Profile', 'your-text-domain' ), 'id' => $prefix . 'appointment_profile', 'type' => 'taxonomy', 'taxonomy' => ['profile'], 'field_type' => 'select_advanced', 'query_args' => [ 'hide_empty' => false, 'object_ids' => 'post.ID', ], ], [ 'name' => __( 'Date', 'your-text-domain' ), 'id' => $prefix . 'date_c2mghcmnqoq', 'type' => 'date', ], ], ]; return $meta_boxes; }Marius Doko
ParticipantHello Long,
For Taxonomies - Agents, i set the query_args to taxonomy: profile hide_empty: false, objet_ids: post.ID
But i couldn't get the related Agents from that Field location that i select. Am i missing any step or is it wrong?The second question(more like informative): Is it possible to create a custom form in View, using the fields from Custom Fields? Or is it a must to have the frontend shortcode from the custom field? I could give that way also a try and see how it goes
Marius Doko
ParticipantThanks a lot Long, was a great help! consider this ticket to be completed ๐
Marius Doko
ParticipantHello Long,
Thank you for your suggestion, I was looking for a solution for this case but i dont know if i am doing any mistake in Twig syntax or i have any mistake in the CPT - Taxonomy configuration. If you could help me with this case i would be really happy since i am new to using twig.
I have a CPT "Review" - Contains 2 Taxonomies, Profile ( which is used for Agent CPT) and Location (which is used for Location CPT). Also other way, these 2 taxonomies have that CPT on their configuration.
What i am trying to do is:
I have created a test review and i have checked for which Profile taxonomy is that review.At Agent CPT (i have displayed all the fields from Profile taxonomy) since 1 agent have 1 taxonomy on its own. Now i would like to add a section where i can display all the related Reviews for that agent.
The code is as below{% set args = { post_type: 'review', tax_query: [{ taxonomy: 'profile', field: 'slug'}] } %} {% set reviews = mb.get_posts( args ) %} {% for review in reviews %} {{ review.post.title }} {{ review.post.content }} {{ review.post.content }} {{ review.post.rating }} {% endfor %}I have tried also another way:
{% set reviews = mb.wp_get_post_terms { post_type: 'review', 'profile' } %} {% for review in reviews %} {% set args = { post_type: 'review', tax_query: [{ taxonomy: 'profile', field: 'id', terms: review.term.id }] } %} {{ review.post.title }} {{ review.post.content }} {{ review.post.content }} {{ review.post.rating }} {% endfor %}Please could you help me with a solution for this case ?
Thank you ๐Marius Doko
ParticipantHey Long,
Thank you for your reply.It worked. One additional question-
I have created the association between News(Article) and Agent(Profile). The agent is being displayed for one Article. But now in Agent CPT where this Agent has the name associated with her profile, I would like to display all Articles that are written by her. Should I do again the association between Single post Agent and Single Article? I thought that this is going to be automatically added for that agent since i have created the association between That article with an agent in News CPT. Or I am doing anything wrong that isn't working that wayThank you
-
AuthorPosts