Problem: I am using the cred_save_data Forms API with new and edit post Forms that create or edit child posts in a O2M post relationship. The Form contains a post relationship field where I have defined the parent using a URL parameter. I get a 500 error when submitting the Form with AJAX.
Solution: Do not rely on the $_GET superglobal to access values in URL parameters. AJAX submissions do not have access to the parent page's URL params in $_GET. Instead, it is better to use a hidden field in the Form using the URL parameter option to store the parent page's URL parameter value in the Form. Then you can access that value in a cred_save_data hook in the $_POST superglobal instead. This approach will work well in either AJAX or standard Form submissions.
It is also important to note that the post relationship managed in the Form will not be available to the Post Relationships API during a cred_save_data hook. Relationships are not established by the time the hook fires, so you would have to get the relationship field value directly from $_POST in a cred_save_data hook. Or, use a cred_submit_complete hook. Post relationshps are available in the Post Relationships API at the time of cred_submit_complete.
Problem: On my Map View, I would like to display different marker icons depending on whether or not the post has a specific term from a custom taxonomy.
Solution: Use map marker shortcodes and conditional shortcodes with the has_term function to display different markers based on the has_term function.
Problem:
The user would like to disable the title that appears when we hover on a map marker.
Solution:
If we don't set a title for the marker, it will take the post's title by default. There is no way from the user interface to disable this feature. But we can remove the title using custom Javascript code, such as:
Problem: When I display a post with my Content Template applied, the post contents are not displayed. The page appears empty except for the main site header and footer and an "edit post link" I added to the Content Template.
Solution: Anything you want to display in the main post area should be added to the Content Template, since the post contents and other fields are not automatically displayed here. You can use a Single Field block to display the post contents with the dynamic sources feature.