Pramod T P

Search
Skip to content
  • Home
  • PHP
  • WordPress
  • Linux
  • Magento
  • My SQL
  • Profile
  • comments

Daily Archives: April 11, 2011

PHP

How to disable error reporting in php?

April 11, 2011 Pramod T P Leave a comment
<?php
 error_reporting(0);// Will not report any error
 error_reporting(-1);// Shows all errors
?>
PHPUbuntu
PHP

Limits the maximum execution time – PHP

April 11, 2011 Pramod T P Leave a comment
<?php
 set_time_limit(2); // 
 // If the value is  "0" , it will rum for unknown time
?>
PHPTime
Wordpress

How to filter the page title – WordPress

April 11, 2011 Pramod T P Leave a comment
<?php
 add_filter( 'wp_title', 'filter_wp_title', 10, 2 );
 function filter_wp_title( $title, $separator ){
	$title ="New Title";
 } 
?>
PHPWordpress
Wordpress

Template Redirection – WordPress

April 11, 2011 Pramod T P Leave a comment
add_action('template_redirect','theme_function'); function theme_function(){
if(isset($_GET['sports']) {
 include(TEMPLATEPATH."/sports.php");
exit();
}}
PHPWordpress
Wordpress

Category url from its ID – WordPress

April 11, 2011 Pramod T P Leave a comment
<?php
 echo get_category_link(categoryID);
 //Category URL
?>
CategoryPHPWordpress
Wordpress

Permalink from post id – Wordpres

April 11, 2011 Pramod T P Leave a comment
<?php
 echo get_permalink(postId) ;
 // will return the permalink
?>
PHPPostsWordpress
Wordpress

Plugin that allows php codes in post/page – WordPress

April 11, 2011 Pramod T P Leave a comment

“Exec-PHP” plugin allows us to add php codes in posts/pages

PHPPluginPostsWordpress
Wordpress

How to check home page or not + wordpress

April 11, 2011 Pramod T P Leave a comment
 if (is_page('home')
  echo "Home page";
else
 echo "No";
PHPWordpress
Wordpress

How to Create Sitemap – WordPress

April 11, 2011 Pramod T P Leave a comment

Use the plugin Google XML Sitemaps for  XML sitemap .

Use the plugin HTML Page Sitemap for  HTML sitemap .

PHPSitemapWordpress
Wordpress

How to display specific posts – WordPress

April 11, 2011 Pramod T P Leave a comment
<?php
$thePostIdArray = array("28","74", "82", "92");  // Post IDS
$limit = 4  if (have_posts()) :
while (have_posts()) :
 the_post();
 $counter++;
 if ( $counter < $limit + 1 ):
  $post_id = $thePostIdArray[$counter-1];  $queried_post = get_post($post_id);
  echo $queried_post->post_title;
 endif;
endwhile;
endif;
?>
PHPWordpress

Posts navigation

1 2 Next →

Zend | Magento Certified PHP | eCommerce Architect

For Latest Updates
Visit phpcodez.com

Categories

Recent Posts

  • Regular expression
  • preg_match
  • Redirect root domain to a subdomain .htaccess
  • Redirect root domain to a subfolder .htaccess
  • Force SSL htaccess
April 2011
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  
« Mar   May »

Recent Comments

togel online's avatartogel online on How to terminate the current s…
business funding's avatarbusiness funding on compare two strings – ja…
unsecured loans uk's avatarunsecured loans uk on Function to add an element int…
treating back pain's avatartreating back pain on Submit HTML form to pop up pag…
Pura Cleanse's avatarPura Cleanse on Add the block "Based on y…
  • RSS - Posts
Create a free website or blog at WordPress.com.
Pramod T P
Create a free website or blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • Pramod T P
    • Already have a WordPress.com account? Log in now.
    • Pramod T P
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...