Tuesday, March 8, 2011

query_posts() Pagination problem

Find this line in your page.

<?php if (have_posts()) : ?>

And place this code above this code.

<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=1&paged=$paged"); ?>

That's done...

Thursday, March 3, 2011

Get the Current Page URL

Insert this code in your php file.

<?php
$path = substr($_SERVER["SCRIPT_NAME"], strrpos($_SERVER["SCRIPT_NAME"], "/") +1);
echo $path;
?>

And now preview in your browser it'll show you which page open in your browser

Tuesday, March 1, 2011

Transfer drupal sites to other server..

1) Go to your xampp folder.
2) Apache
3) Conff
4) Open httpd.conff file
5) find this line
      #LoadModule rewrite_module modules/mod_rewrite.so
6) And replace with this
      LoadModule rewrite_module modules/mod_rewrite.so
7) And restart your server.

that's done...