Is there a way to fire other functions from wp_insert_post
Use this code snippet to use another function, function my_function( $post_id ) { //Some code } add_action( ‘save_post’, ‘my_function’ ); This fires when a post is inserted.
Use this code snippet to use another function, function my_function( $post_id ) { //Some code } add_action( ‘save_post’, ‘my_function’ ); This fires when a post is inserted.
This is a common issue and is documented on their official website for trouble shooting. The error may have been sent to you via an email with the subject line “Your Site is Experiencing a Technical Issue”, or it may have displayed in the Plugins page when you tried to update Jetpack. This happened because … Read more
Basically it line 480 in sharing-service.php where it says: return $text.$sharing_content; and it should be return $sharing_content.$text; now changing that file won’t keep your changes on updates so you can copy that function (sharing_display) to your functions.php and rename it to something different say my_sharing_display and make the change there. Next you need to remove … Read more
There is a Jetpack widget called Top Posts and Pages (Jetpack) If you check out the [source code][2] for this widget, you can see that it’s using the function stats_get_csv() to retrieve the stats: $post_view_posts = stats_get_csv( ‘postviews’, array( ‘days’ => 2, ‘limit’ => 10 ) ); If you want to generate your custom most … Read more
ShareDaddy uses two filter hooks either the_content or the_excerpt this means that your custom post type theme template file has to use one of these two functions the_content(); or the_excerpt();. Update Ok I guess i didn’t get the question. So to add the metabox to your custom post type add this: // Hook things in, … Read more
I used ‘init’ in the add_action in my own implementation of infinite scroll, try that. add_action( ‘init’, ‘vg_infinite_scroll_init’ ); As to your question about rendering a custom query you would do the following. -Set the render to your function name ‘render’ => ‘your_render_function, -Add your function to call a specified loop template function your_render_function(){ get_template_part( … Read more
I’ve checked the source code for Slim Jetpack and this task can not be accomplished without rewriting that plugin. Here are some hints: You’ll have to duplicate line 539 of ‘/modules/infinity-scroll/infinity.php’ stating: jQuery.extend( infiniteScroll.settings.scripts, <?php echo json_encode( $scripts ); ?> ); You’ll have to duplicate line 475 of ‘/modules/infinity-scroll/infinity.js’ as this initializes infinite scroll. (Do … Read more
From the documentation: According to the JetPack JSON API docs: By default, all metadata keys are allowed in the API, as long as they are not protected keys. Any metadata key that starts with _ is by default protected. Protected metadata keys can, however, be accessed and edited by users with the edit_post_meta (used for … Read more
You may not have enough processes running. To test, try creating a file sleeper.php: <?php sleep(5); echo “Working fine\n”; And then run this from the cli: curl -m 6 http://example.com/sleeper.php & curl -m 6 http://example.com/sleeper.php & wait If there is only one process it will print out something like this: Working fine curl: (28) Operation … Read more
The featured content is part of the TwentyFourteen theme, and is not implemented as a plugin, but rather as an Appearance > Customize setting (via get_theme_mod()), which allows the use of a Grid or Slider layout, choosing posts base on the tag provided. BTW, I figured this out only after reading your post! So thanks … Read more