WordPress Front Page Banner – Advance Tutorial [Enable PHP]

2009 December 28
by editor

In earlier part of the tutorial, I have explained  how to use Custom Style Sheet and other basic configuration tutorials. In this tutorial I will give you a basic idea on how to use PHP with WordPress Frontpage Banner Plugin.

[ Read how to show New Year Countdown on your WordPress blog's frontpage using this plugin ]

Let’s take a example: How to show Today’s date on WordPress FrontPage  using PHP, to get the date using PHP we need to use PHP date function. PHP Date Manual

Here is the code to show the date

<?php
echo 'Welcome Today is  '.date("d/m/Y");
?>

Enable PHP in ‘FPB Settings’ and paste the above PHP code in custom code. See the below screen-shot how it will be

wpfpbphpconfig WordPress Front Page Banner – Advance Tutorial [Enable PHP]

And here How it may look on your blog, remember by default it will override theme’s stylesheet settings. We can define our own style sheet using Custom Style Sheet.

wpfpbphpdemo WordPress Front Page Banner – Advance Tutorial [Enable PHP]

3 Responses leave one →
  1. February 3, 2010

    I cant get the plugin to work on our website, not sure if its because of the theme w/ the Featured Content Plugin? please let me know what i can test or do?

    • February 3, 2010

      @mike,

      The template which you are using on your site, don’t have any post on frontpage. It shows only archives and categories, this is the reason Wordpress FrontPage banner plugin is not running on you site.

      Grab a theme which has atleast one post on frontpage then it will work.

  2. March 27, 2010

    Hi,

    I am putting together a ’static’ frontpage and a separate post page. Will this plugin work on my static front page?

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS