Tag Archive for freelance wordpress developer

Execute php codes in your WordPress Page without Plug-ins!

Below are the simple steps to create a WordPress Page with capability to execute php code without any wordpress plug-ins!

Step1 :  Goto your theme directory and create a page  template as follows in the screen shot!

Step 2:  Save this file in your current theme directory.
Read more

Customizing the Read More link with WordPress

If you have set your WordPress site to display post excerpts on the front or home page, you will want visitors to click on the title or a link to encourage them to continue reading your post or article, right? WordPress makes this technique easy, and customizable.

Here is the steps:

  • Go to wordpress admin panel –> Design tab –> Theme Editor.
  • Select Main Index template (index.php) to edit it
  • Find the line  “<?php the_content(‘Read the rest of this entry &raquo;’); ?>”
  • And replace it with the following code.

<?php

$content = get_the_content($more_link_text, $stripteaser, $more_file);
if(strlen($content)>500) // chanage 500 as per your needs
{
$part_msg=substr($content, 0, 500);// chanage 500 as per your needs
echo ‘<p>’.$part_msg.’… ‘;
?>
<br /><br />
<a href=”<? comments_link(); ?>”>Read More…</a></div>
<?php
echo ‘</p>’;
}
else
{
echo ‘<p>’.$content.’</p></div>’;
}

?>

Where “500″ represents number of characters that you want to show.

If you cannot able to make the above changes with the wordpress theme editor, use your ftp.

Here is the template directory

/public_html/blog/wp-content/themes

or

/www/blog/wp-content/themes

where blog is the directory where i installed my wordpress