« Posts tagged wordpress

Disable update on wordpress plugin

If you have a plugin you wan't update, and you wan't see anymore newer version the only way to disable autoupdate for this plugin if to modify the code.

Go in plugin section, then press "edit" on plugin you want disable update and go down at the end of the code (before the "?>") and paste this:

  1. add_filter('site_transient_update_plugins', 'dd_remove_update_nag');
  2. function dd_remove_update_nag($value) {
  3. unset($value->response[ plugin_basename(__FILE__) ]);
  4. return $value;
  5. }
  6.  

Save and you are done.

Thanks DD32 for the code. (http://dd32.id.au)

WordPress redirect

My friend Francesco (www.flussiliberi.it) was hosted on a free service without having a domain ,so, after buying a domain name and space, ask me a way to redirect all vistors that point direct to a post or page in the old WordPress blog to the corresponding page on new site.

I don't know if exist a plugin, but with a few php lines it's possible:

  1.  
  2. <?php
  3. $url="http://www.hacksandmore.com";
  4. if (($_GET["p"] === null) and ($_GET["page_id"] === null) and ($_GET["feed"]=== null) and ($_GET["cat"]=== null)) {
  5. $url=$url;
  6. }
  7. else
  8. {
  9. if(isset($_GET["cat"])) $url=$url."/?cat=".$_GET["cat"];
  10. if(isset($_GET["feed"])) $url=$url."/?feed=".$_GET["feed"];
  11. if(isset($_GET["p"])) $url=$url."/?p=".$_GET["p"];
  12. if(isset($_GET["page_id"])) $url=$url."/?page_id=".$_GET["page_id"];
  13. }
  14. <fieldset>
  15. <h1>Site transferred,
  16. redirect in a few seconds...</h1>
  17. <h3>WP redirect by: Umberto Bernardi
  18. <a href="http://www.hacksandmore.com">www.hacksandmore.com</a></h3>
  19. </fieldset>
  20. <script type="text/javascript"><!--mce:0--></script>
  21. ";
  22. ?>
  23.  

You can download the script in the right panel in Downloads section