Post curl function save twice using plugin hook function wordpress

That is normal behaviour. See this question on WordPress Stack Exchange: Plugin Development: WordPress processes twice on post update. How to skip process on the first? answered by @Hameedullah Khan. WordPress call functions hooked to save_post twice because: first time it saves the post revision. second time it saves the actual post. As Hameedulah suggests, … Read more

Show latest and related articles from 3 different blogs

@franp. is correct, but in case you want to go a code route here’s how you get an RSS Feed of a website. You can duplicate this as you see fit, or combine multiple into an array etc. Let’s get our RSS Feed from ABC.com $rss = fetch_feed(‘http://abc.com/feed’); // Or where ever that websites feeds … Read more

Allow a role to edit one specific plugin

To solve this you need to go into the main .php file for the plugin and have changed the required capability using add_menu_page. I created a custom capability, added it to Contributors, and changed the .php file to allow users with that capability to view the menu.

Custom Post Type – Permalink Problem

Thanks to Anjum for his suggestion in the comments. The problem has been solved by removing the front-slash in the rewrite slug. The error was caused by: ‘rewrite’ => array ( ‘slug’ => ‘movies/’, ‘with_front’=> false ), The error has been solved by the following modification: ‘rewrite’ => array ( ‘slug’ => ‘movies’, ‘with_front’=> false … Read more

Notify new post on page

You can use the publish_post action, which is triggered when a post is published. Knowing that, you can create a function and call that function whenever the publish_post action is triggered using the add_action function. An example from the docs: function post_published_notification( $ID, $post ) { $author = $post->post_author; /* Post author ID. */ $name … Read more