WordPress site is coming blank ?

||||| 0 I Like It! |||||
Share it now!

If you wordpress website is coming blank… and you have no idea why this is happening… you can debug it by enabling wordpress debug mode.

You need to find the wp-config.php file(on the root). Open it with any text editor and find the following code

1
define('WP_DEBUG',false);

change it to:

1
define('WP_DEBUG',true);

WordPress: Open RSS widget links in a new tab

||||| 3 I Like It! |||||
Share it now!

Follow below steps to open RSS feed URLs in a new tab/window:

  • Open default-widget.php(Look into wp-include folder)
  • Find class=”rsswidget”
  • Look around line 901, a line contain
1
echo "<li><a class='rsswidget'  target='_blank' href='$link' title='$desc'>$title</a>{$date}{$summary}{$author}</li>";
  • add target=’_blank’ in it.

Change Magento admin url

||||| 2 I Like It! |||||
Share it now!

First open local.xml, located in the app/etc folder.
find the following code segment.

1
2
3
4
5
6
7
8
9
<admin>
        <routers>
            <adminhtml>
                <args>
                    <frontName><![CDATA[admin]]></frontName>
                </args>
            </adminhtml>
        </routers>
    </admin>

Now replace “admin” with your path name. let say i want to change it to “administrator” than my code would be

1
2
3
4
5
6
7
8
9
<admin>
        <routers>
            <adminhtml>
                <args>
                    <frontName><![CDATA[administrator]]></frontName>
                </args>
            </adminhtml>
        </routers>
    </admin>

Don’t use special character in the name use character and numbers only.

Now clear the cache, use FTP client to clear cache(var/cache directory).

Add Pagination on category page WordPress

||||| 1 I Like It! |||||
Share it now!

The default WordPress pagination only comes with the “Older posts” and “Newer posts” links at the bottom of the page when you want to navigate to the older entries. This works fine for sites with few entries, but isn’t very user-friendly for blogs and sites with dozens or even hundreds of pages worth of entries. To enable your visitors to quickly navigate your site and browse through your content from page to page, a list of numbered pages would be more useful, like Google’s search results.

Thankfully, there are many available WordPress pagination plugins that do just that. Among these, Lester Chan’s WP-PageNavi is possibly the most popular one.

I am working on function that let you add the pagination without plugin.

Fix WordPress Malware Script Attack.

||||| 3 I Like It! |||||
Share it now!

Recently we found some unwanted code on our WordPress site it was something like

1
2
3
...
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQ..." ));
...

We fixed and re-upload again the same. After that we figured out that all the .php files are affected. Some files are more than once being injected the same code. We are writing this script for those who encounter the same type of vulnerability. Continue reading

jQuery: $ is not a function – Fix for common jQuery error

||||| 2 I Like It! |||||
Share it now!

“Error: $ is not a function”, this is the error that was being thrown back at me while working on a WordPress site the other day. However for the life of me I couldn’t see why my, usual fine JavaScript code, was failing. Was it a problem with my jQuery code, my WordPress installation or both?
I reduced my code down to producing an alert when the DOM was ready, but still it threw the error:

Error: $ is not a function

Continue reading