Archie Makuwa

Category: Php (page 2 of 5)

Cannot redeclare class error when calling class

Bham!!!

Simply call you class within this code:

 

Brand WordPress RSS Feed – All your logo

This is how you can go about

 

branding your WordPress RSS feed:

Login to WordPress for longer

WordPress by default only logs you in for a maximum period of two weeks. You can override that feature by placing the following snippet into your functions.php:

 

How To Disable WordPress Login Hints

When you type a non-existent username or an incorrect password while logging into WordPress, it will provide a very detailed error message telling you exactly whether your username is wrong or the password doesn’t match. That could offer an hint to people who are trying to break into your WordPress blog / site. You can disable that b placing the following script in your functions.php file:

 

How to get absolute path in Joomla! without FTP access

The 19th December 2014, we were faced with a little predicament where the client left the office to go on holiday without granting us access to their servers. We wanted to link attachments to pages using ChronoForms version 5 which required absolute path.

The interesting thing is they setup a Php server on a Windows 2008 server and everything in terms of directory structure threw me off completely. All my directory guess work failed.

The only easy option was to wait until the client returns from their holiday in 2015 or “kind of hack” my way on their server. I did attempted the hacking part and this is what I did:

  1. Installed DirectPhp plugin: Allowed me to execute Php directly from within articles.
  2. Executed the following Php script from within one of the articles (any):

Finally we got somewhere – the path was something like this:

Uhm… I wouldn’t have guessed that 🙂

Query Multiple post type with multiple taxonomies

What I’m trying to do is to query post type A with category B, and post type C with category D and show the results on one page.

Source: WordPress Forums

 

Show Static Block Only on Homepage in Magento

Aweh good people. If you are in header.phtml file then you can call $this->getIsHomepage();

But if you are not there then you must have to create instance of Mage_Page_Block_Html_Header(); then write the following code to check homepage

 

 

Magento Remove Dashboard Links

Step 1

Go To ( YourTemplate/customer/account/navigation.phtml )

 

Step 2

Replace This Line: <?php $_count = count($_links); ?>

With:

 

4 Ways to Get Magento Homepage URL

These are the four ways to get Magento homepage url. I do not take credit for this list of urls, the source: Expert Developer

Option 1

 

Option 2

 

Option 3

 

Option 4 (used to get the home page URL in static blocks)

 

List posts per Custom Taxonomy / Category

This script will come in handy if you want to list a bunch of posts under a Custom taxonomy, i.e.

Taxonomy 1
– bunch of post 1
– bunch of post 2
– bunch of post 2

Taxonomy 2
– another post 1
– another post 2

 

 

 

Olderposts Newerposts

Copyright © 2019 Archie Makuwa

Theme by Anders NorenUp ↑