Archive / Programming

RSS feed for this section

Change slug for an already registered post type

function wpti_custom_post_type_args( $args, $post_type ) { if ( $post_type === ‘my-registered-custom-post-type’ ) { $args[‘rewrite’] = array( ‘slug’ => ‘my-new-slug’ ); } return $args; } Unfortuantely it doesn’t work with the default post types like post/page

Cakephp installl plugin as submodule

In order to install Search plugin for instance: git submodule add https://github.com/CakeDC/search.git app/Plugin/Search git submodule update –init –recursive

Optimize MySQL all tables

I was contacted by a friend which has the website hosted on my server. His website was pretty slow despite the fact the server is very powerful. After some debugging I optimized his tables and the website is instant fast … Continue reading

Cakephp 1.3 and php 5.4

A quick notice how to disable the errors that appear after upgrading the php to 5.4 which is by the way a lot faster than ever before. cake/bootstrap.php replace: error_reporting(E_ALL & ~E_DEPRECATED); with error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); cake/libs/debugger.php after: … Continue reading

cakephp page title in view cake1.3

In order to change page title in cakephp inside a view just use the code bellow $this->set(‘title_for_layout’, ‘my cakephp page title’);

remove comparison links from magento

Copy app/code/core/Mage/Catalog/Helper/Product/Compare.php to app/code/local/Mage/Catalog/Helper/Product/ (create missing directories) Edit app/code/local/Mage/Catalog/Helper/Product/Compare.php after: public function getAddUrl($product) { add: return false;

SVN set up for multiple projects

just a quick tutorial how to set up subversion, aka SVN to be used with multiple projects. Setting up only one repository has the downside of incrementing revision number for all the projects no matter what project is modified. The … Continue reading