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
Multiple WHILE loops help
Hi there. I'm writing an application that is pulling and displaying results for real estate listing
pls clear my confusion
Hi friends,
Pls solve my query .
what is the exact use of Scope Resolution Operator( i
Asset Transfer from One plant to another within same company code
Hi,
Please advise how to transfer one asset from one plant to another plant within same c
Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming
listcube issue
Hi
I have a virtual cube ZREMOTE. I use Tcode "listcube" to retrieve contents. I use of the
How do I give a developer access to a specific directory and nothing else?
I want to give a develop access to a specific directory and nothing else
I can give them an F
noob question
i traying to do a php form with auto replay for both(me and the user who send me a mail),
a u
Unifying logins of two different scripts
I have two different game scripts which I want to embed on my own site. The problem is I don't want
type check while uploading
Hi Everyone,
How can I check the exact type of a file while uploading on my site?
Here
Printing issues with xMII 11.5
For some reason, we have one report (and only one) that is giving us fits when trying to print. The