Php WordPress help
Posted on
16th Feb 2014 07:03 pm by
admin
I am writing the following code for making a plugin
<?php
header("Content-Type: text/css");
/*
Plugin Name: Name of the plugin.
Plugin URI: The page having information related to plugin.
Version: 0.1
Description: Your plugin description.
Author: Your name
Author URI: Author's website.
*/
?>
<?php
function box()
{
?><div class="box">
<p><b>Author:</b> <?php the_author_link(); ?><p>
<?php echo get_avatar( get_the_author_email(), '50' ); ?>
<p><?php the_author_description(); ?></p>
</div>
<?php
}
function style() {
echo "
<style>
<!--
.avatar{
float:left;
background-color: #fff;
border:1px solid #ccc;
padding: 4px;
margin: 0 7px 2px 0;
display: inline;
}
.box{
color: #666;
font-weight: normal;
background: #fff;
border: 1px solid #ccc;
padding: 12px;
margin-bottom:8px;
}
-->
</style>
";
}
function author_box_ContentFilter($content)
{
if (is_single())
return $content.box().style();
else
return $content;
}
add_filter('the_content', 'author_box_ContentFilter');
?>
This code is appending the author info box at the start of post.But i want to add the box a the end of post.I also tried
{
if (is_single())
return box().$content.style();
else
return $content;
}
But this is also not working.
Seeking for help to append the box at the end of post.
Thanks in anticipation
No comments posted yet
Your Answer:
Login to answer
127
37
Other forums
why this query can delete duplicates ?
why this query can delete duplicates ? Anybody can give me the detailed explanation ?
Tha
IMAGE - SERVER SIDE scripting help...
How to receive pixel data of an image and buid a bitmap file on the server using the HTTP POST metho
Help uploading .JPG
I have a problem with upload images when the ending is .JPG capitalized.. I really don't know what c
curl javascript problem
Hi Experts.
I'm new curl and wanna to get some info from this http://www.amadeus.net/
when
Help with file_get_html
The following code gives the expected results:
<html>
<head&g
php code generators
All
Whilst enjoying learning a new language i have come accross a number of free code generat
Add "width" check when upload
Hi!
Can someone add a function that is checking if picture witdh is bigger then 800px whwn up
How to know if online site made with PHP
Hello,
I see some sites that does not display extensions at all , for example:
www.site.co
How to insert random unique values in 2 columns ?
I have table with 2 columns
Create Table code_for_code (
first_code varchar2(10) uni
Deleting Partners on the Customer Master.
Does SAP handle removing the Partner from Open Sales Orders when a Partner is deleted in the Custome