Posts under Open Source

WordPress Custom Taxonomy Pagination show 404 page not found error

advertisement

Recently i’ve a custom WordPress development, it involve quite a number of custom taxonomy and custom post types. If you are familiar with custom taxonomy and post types, most probably you might write your own WPQuery to do custom search and filter and i’m also one of them. Everything is good until i test the custom taxonomy pagination. First listing page for the custom taxonomy is still fine, but when i try to click on page 2, then it show 404 page not found error. Spent hours of time in google and stack overflow, finally i manage to solve the issue.

Continue reading WordPress Custom Taxonomy Pagination show 404 page not found error »

WordPress: How to upload image using script?

advertisement

wordpressJust migrated an old site to WordPress. This old website contain more than 1200 images and if i migrate manually it will take a long time. So i wrote two script, first to extract all the images and it’s description from the old website to a file. And second script is a WordPress plugin script to upload the image to it’s page and set the image caption (useful for gallery and lightbox description) according to the old website description automatically.

wordpress-upload-image-script

How to upload image using script in WordPress

Continue reading WordPress: How to upload image using script? »

Composer: PHP Fatal error: Allowed memory size of … exhausted…

advertisement

phpIf you are using composer in your php project, you might encounter the the same error as mine.

PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 71 bytes) in phar:///sf2projects/myproject/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 47

To solve this PHP fatal error allowed memory size exhausted problem, refer to the solution below:-

Continue reading Composer: PHP Fatal error: Allowed memory size of … exhausted… »