Disable clickable events - wordpress

I am a programming neophyte; please be kind. I'm using the WP FullCalendar plugin (wordpress.org/plugins/wp-fullcalendar) to create a scheduling calendar for a volunteer ambulance. The calendar is working fine. However, I don't want any of the calendar events to be clickable. I have searched the plugin settings and haven't found anything to disable. Please let me know which file needs to be changed and what to change it to. Many, many thanks. I should add this is being used in a WordPress cms.

After discussing with #clpix, there is not a setting to disable clickable events using the wordpress plugin.
This is a workaround, I would suggest contacting the author and suggesting this as a feature.
Add this to the fullcalendar wp-content/plugins/wp-fullcalendar/wp-fullcalendar.php to the fullcalendar_args. In the latest release I added to line 324 after the comma. The comma is important so please include.
eventClick: function(event) {
return false;
},

Related

Can't access to product's reviews in WooCommerce when using Gutenberg as editor

I know that Gutenberg isn't supported on Woocommerce, but I'm trying it anyway and so far is quite good. Im doing it by:
function wplook_activate_gutenberg_products($can_edit, $post_type){
if($post_type == 'product'){
$can_edit = true;
}
return $can_edit;
}
add_filter('use_block_editor_for_post_type', 'wplook_activate_gutenberg_products', 10, 2);
What I notice that there is error when trying add some of the Woo blocks in products, so I decide to disable Woo blocks on products to avoid it. Works ok now.
But in backend and can't access to reviews. I see only comments section but this not working at all. Does anybody dealing with that somehow?
I found this thread trying to find a solution to your last part too.
When I have Gutenberg active on products, even with reviews enabled in WooCommerce settings, when I go to:
Product Data
Advanced
and try and toggle the "Enable Reviews" option
When I save and then refresh the change doesn't seem to take so I am unable to turn reviews on if they are currently off or turn them off if they are currently on.
I have tried to test all of the other options and checkboxes like virtual and downloadable and they all seem to save fine it just seems to be this one setting that doesn't get saved.
I am keeping note of everything I find on the matter and if I manage to find a solution I will come back to share. I'm not sure if it will help with your other issue though which I haven't faced.

Wordpress - Disable "Are you sure you want to navigate away from this page?" when saving custom post

I have a Wordpress site very customized where there are a lot of contributors and lots of posts are published. When you try to publish/update a custom post it displays a popup saying "The changes you made will be lost if you navigate away from this page. Are you sure you want to leave this page?".
This only happens when the modified/new content of the post is in custom fields corresponding to "Advanced Custom Fields" plugin. This popup is very annoying for the contributors. So I would like to know if is possible to disable this popup or any way to fix that.
Thanks.
Ok, so I was able to track down the cause. It is a JS function in ACF called unload.
All you have to do is add some JS:
jQuery( document ).ready( function() {
// disable the ACF js navigate away pop up
acf.unload.active = false;
} );
Reference:
http://support.advancedcustomfields.com/forums/topic/how-to-disable-js-alert-in-acf_form/
A more general answer in regards to WP's confirmation dialog:
Within wp-admin/js/post.js of WordPress-4.8 on line 481 you can find the mechanism behind the "navigate away" confirmation dialog.
The event: beforeunload.edit-post is initiated via jQuery's .on() function. jQuery gives you the ability to unbind event handlers via the .off() function.
By adding the following to your Javascript, you can disable this confirmation dialog when needed. WordPress itself also uses it when you hit the submit (Publish) button on a post for example.
// Prevent WP from asking confirmation to navigate away from the current post.
jQuery(window).off( 'beforeunload.edit-post' );
P.S. WordPress specific questions should be asked at: https://wordpress.stackexchange.com/
jQuery(document).ready(function()
{
jQuery(window).off("beforeunload", null);
});
Still valid on wordpress 5.9
So, I was trying to track down how WordPress itself handled this.
Here is what I found out:
There is an eventListener on publish or edit button of WordPress.
That actually runs the below code:
jQuery(window).off("beforeunload.edit-post")
So, Using the same way you also can disable that.

Roots Theme: How to Remove Sidebar on Tribes Calendar?

I am using the Tribes calendar Tribest Events Calendar and I want the sidebar from my site to be removed. I have gone through this post, but it doesnt work: http://discourse.roots.io/t/roots-and-modern-tribes-events-calendar/603
I have created the duplicate default-template.php but nothing happens.
I was having the same issue with woocommerce until I added "'is_woocommerce'," to the lib/config.php file and it removed it for woocommerce. Is there the same hack that I can use for the Tribes calendar. I just dont know what to script in: "'is_tribes' (???)," I hope someone can help smile
Thanks for any feedback that you can give me.
The plugin provides conditional template tags (a.k.a. functions) in the format tribe_is_*().
E.g. conditionals for calendar pages: tribe_is_upcoming(), tribe_is_month(), and tribe_is_day() (I believe there are other views in the Pro version of The Events Calendar plugin.)
To remove the sidebar from calendar pages in the Roots-based theme, you would pass "tribe_is_upcoming", "tribe_is_month", and "tribe_is_day" to the instantiation of the the Roots_Sidebar class in lib/config.php. To also remove it from single event pages, pass "tribe_is_event".

Wordpress: Calendar Widget displaying posts by custom field (date)

I created a website build around a custom post type events. These events have custom fields, one of them is the event-date (the date the event is happening, NOT post publish date). I'd like a calendar widget that simply highlights the days an event is happening (maybe with a link to it). This means i need to plug my custom fields into a calendar widget plugin.
I found this post from 2 years ago, http://wordpress.org/support/topic/display-posts-in-a-calendar-using-custom-field-as-date?replies=8 - it seems they wanted exactly what i'm asking for. Unfortunately i couldn't figure out how to do it with the plugin mentioned by them (FT calendar).
Most calendar widget plugins simply use the pust-publish date. I need them to take their date-data from a custom field.
Do you guys have an idea which calendar-widget-plugin/way would be best for me?
After I've made a search and test of some of the event calendar plugins, calendar that would be closest to your need is All-in-One Event Calendar. After installing it is necessary to upgrade to the Standard version. The plugin has far too many options than it is needed, but is highly configurable so it can be configured to work roughly what you need.
Here is also the link with the analysis of different Wordpress event calendar plugins.

Wordpress Plugin Development Question!

I am currently writing a plugin for my client in wordpress. The issue I am having is when a user clicks on edit to change a record I am not sure how to create the admin link to do this.
i.e.
Edit
function wpsc_product_seo_details()
{
echo "<h2>Hello</h2>";
}
I know my markup for the tag is probably wrong but I was just testing. Do I need to register a hook to do this.
The hook you are looking for is to add actions to the sidebar; there are various ways - add_options_page will add to the options menu, for example. add_menu_page will create a new group for you to add your links.
Check the documentation on adding admin menus for more information.

Resources