Support » Plugins and Hacks » my-hacks.php file

  • I’ve created a my-hacks.php file however, only one of my hacks works. the first one. after that, if I add any, it doesn’t work.
    aren’t you supposed to put the codes between < >?
    are you supposed to creat a new < > each time you add a hack? how does it work?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Uzma,
    You need only one set of opening and closing PHP tags. Ensure that there are no returns or spaces or anything after the closing tag.

    Yeah I checked that too. Only the first set of codes work.
    Should I put a code and then no space and more code or space between the codes?

    Here’s an old ‘my-hacks.php’ that I used to use:
    <?php require_once('hacks/wp-grins.php'); ?>
    <?php require_once('hacks/days_since.php'); ?>
    <?php require_once('hacks/days_to.php'); ?>
    <?php require_once('hacks/get_comment_count.php'); ?>
    <?php require_once('hacks/get_comment_word_count.php'); ?>
    <?php require_once('hacks/get_most_commented.php'); ?>
    <?php require_once('hacks/get_post_count.php'); ?>
    <?php require_once('hacks/get_post_word_count.php'); ?>
    <?php require_once('hacks/get_recent_posts.php'); ?>
    <?php require_once('hacks/comment_plugger.php'); ?>

    Bear in mind that I had put all the hacks into a folder called ‘hacks’ which was in the wordpress directory.

    Thanks so much padz. Just one more question, in WP directory there is a folder called “plugins” is that same or should i create another thats called “hacks”?

    Strictly speaking they are not the same.
    I literaly do keep my plugins in ‘plugins’ and the 2 hacks I have in ‘hacks’ – keeps it all nice and neat 🙂

    Ok thanks a lot!!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘my-hacks.php file’ is closed to new replies.