Pagelines welcome billboard

[edit] Please Note

These docs are now deprecated, we have a new Support area located here

(Difference between revisions)
(Examples)
(Examples)
 
(One intermediate revision by one user not shown)
Line 21: Line 21:
 
This would then transform the top of the theme Welcome page into something like this:
 
This would then transform the top of the theme Welcome page into something like this:
 
[[File:PageLines-Welcome-Billboard-blank.png|center]]
 
[[File:PageLines-Welcome-Billboard-blank.png|center]]
 +
Well, that's rather boring ... but we can fix that rolling our own Welcome Billboard code ...
 +
 +
<syntaxhighlight><?php
 +
function my_pagelines_welcome_billboard(){
 +
  /** Let's borrow some code and make a few minor adjustments, just for show ... */
 +
 +
  $my_billboard = '<div class="admin_billboard fix"><div class="admin_billboard_pad fix">';
 +
  $my_billboard .= '<div class="admin_theme_screenshot"><img class="" src="'.CHILD_URL.'/screenshot.png" alt="Screenshot" /></div>';
 +
  $my_billboard .= sprintf( '<div class="admin_billboard_content"><div class="admin_header"><h3 class="admin_header_main">%s</h3></div>' , __( 'Congratulations!', 'my-textdomain' ) );
 +
  $my_billboard .= sprintf( "<div class='admin_billboard_text'>%s<br/>%s<br/><small>(%s)</small></div>",
 +
      __( 'Welcome to your <strong><em>AWESOME</em> professional</strong> website.', 'my-textdomain' ),
 +
      __( 'Here are a few <strong>GREAT</strong> tips to get you started with your PageLines Theme by <em>me!</em>', 'my-textdomain' ),
 +
      __( 'Note: This intro can be removed below.', 'my-textdomain' )
 +
    );
 +
  $my_billboard .= '<div class="clear"></div></div></div></div>';
 +
   
 +
  return $my_billboard;
 +
 +
}
 +
?></syntaxhighlight>
 +
 +
This is not a significant change but gives you an idea of what even a small tweak can do:
 +
[[File:My-billboard-example.png|center]]
  
 
== Source File ==
 
== Source File ==

Latest revision as of 16:28, 8 April 2012

Filter

pagelines_welcome_billboard can be used to modify the content at the top of the theme Welcome page produced by the get_welcome_billboard function.

Usage

NB: my_pagelines_welcome_billboard is used only as an example, a more appropriate function name should be used in production code.

Examples

The default look of the theme Welcome page is very similar to the following:

PageLines-Welcome-Billboard-default.png

If you wanted to remove that altogether then you could simply add the following to your (Child-Theme's) functions.php file:

This would then transform the top of the theme Welcome page into something like this:

PageLines-Welcome-Billboard-blank.png

Well, that's rather boring ... but we can fix that rolling our own Welcome Billboard code ...

'; $my_billboard .= '
Screenshot
'; $my_billboard .= sprintf( '

%s

' , __( 'Congratulations!', 'my-textdomain' ) ); $my_billboard .= sprintf( "
%s
%s
(%s)
",
     __( 'Welcome to your AWESOME professional website.', 'my-textdomain' ),
     __( 'Here are a few GREAT tips to get you started with your PageLines Theme by me!', 'my-textdomain' ),
     __( 'Note: This intro can be removed below.', 'my-textdomain' )
   );
$my_billboard .= '
';
 return $my_billboard;

}

?>

This is not a significant change but gives you an idea of what even a small tweak can do:

My-billboard-example.png

Source File

pagelines_welcome_billboard is defined in get_welcome_billboard() which is located in admin/class.welcome.php