Add meta field after post has been published

You can hook into post_updated action, if you want to access the post’s data after it’s been published. This hook passes the post’s ID, inundated post object, and updated post object. add_action( ‘post_updated’, ‘update_event_date’, 10, 3 ); function update_event_date( $post_id, $post_after, $post_before ){ $post_type = get_post_type( $post_id ); $event_datee = get_post_meta( $post_id, ‘_EventStartDate’, true ); … Read more

Disable The Events Calendar plugin from loading its scripts

I was successfully able to disabled The Events Calendar plugin for users that are not logged in by using only filters (see below). The dequeue_tec_scripts function dequeues scripts loaded by the plugin. The restricted_access_template function, redirects the user to a custom template named ‘restricted_access.php’ or ‘404.php’ if the template file is not found. I haven’t … Read more

Date in the URL with The Events Calendar

You could just try to change the slug to the value you need for each event. The problem arises if you have the same event twice (or more) in the same month though. You will need to create a new title for the event. you can try this plug-in: http://wordpress.org/extend/plugins/custom-post-type-permalinks It might help you with … Read more

I use the events Calendar Plugin and I want to change some words

The “Now onwards” string is translated with _x() which is different than __() because it allows context to be added to the string being translated. Because there is context, you need to use gettext_with_context instead of gettext. Here’s a simple example based on the one in the WP.org Code Reference: function example_gettext_with_context( $translated, $text ) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)