GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   What WP plugin will do this? (https://gfy.com/showthread.php?t=1012080)

DWB 02-27-2011 12:23 PM

What WP plugin will do this?
 
I need to be able to add a note or author comment after each blog post and would like to have it highlighted like this is. I see it on many blogs but can't find a plugin to do it.

http://i52.tinypic.com/900g39.jpg

Thanks in advance. :thumbsup

MrGusMuller 02-27-2011 01:23 PM

Edit the post page and had div with proper css and content in it? :S

DWB 02-27-2011 01:31 PM

Quote:

Originally Posted by MrGusMuller (Post 17943937)
Edit the post page and had div with proper css and content in it? :S

Yea I could hard code it in but I'd like to be able to use it on and off. Like an excerpt for example. If you don't put anything there, nothing shows up. Same idea.

I figured there is plugin for this but I could be wrong.

MrGusMuller 02-27-2011 01:32 PM

try to add this in your /wp-content/themes/YOURTEMPLATE/single.php

PHP Code:

<div style="background-color:#f5f5b7; border-color:#e2d6ac; border-style: dashed; padding:10px;">

    
YOUR MSG
    
</div

before
PHP Code:

<div class="comments"



You can also create a shortcode for that, like [note msg="blablabla"]....

Hit me if u need help :thumbsup

Kiopa_Matt 02-27-2011 01:33 PM

It's not a plugin. I don't know Wordpress much expect reverse engineering it, but there's comments, and then there's admin comments, or something to that affect. Maybe it's "author comments".

Anyway, it's in the CSS. You have to find a theme that supports it, then copy it.

PS. Don't quote me on that, as I could be wrong. Again, I don't know WP very well.

MrGusMuller 02-27-2011 01:39 PM

Quote:

Originally Posted by DirtyWhiteBoy (Post 17943946)
Yea I could hard code it in but I'd like to be able to use it on and off. Like an excerpt for example. If you don't put anything there, nothing shows up. Same idea.

I figured there is plugin for this but I could be wrong.


You can create a shortcode for that.
Its easy shit.
Add something like this to ur /wp-content/themes/YOURTHEME/functions.php

PHP Code:

function myNote ($atts$msg)
{
    
    
extract(shortcode_atts(array(
                
"atts" => '',
                
"msg" => ''
        
), $atts));
 
 return 
'<div style="background-color:#f5f5b7; border-color:#e2d6ac; border-style: dashed; padding:10px;">'.$msg.'</div>';
      
}
add_shortcode('note''myNote'); 


then, in the post that you want to call, write [note msg="blalbla bla bla"] where you want the warning

Agent 488 02-27-2011 01:44 PM

post the blog you see it on.

Jdoughs 02-27-2011 01:53 PM

Lots of hard solutions for an easy problem.

Search "WP Author Plugin" in google, there is dozens of them, you could also just add it as a custom field and have a lot more control over it (ie an endless amounts of text/image/author combinations and even advertisements).

Working it as a custom field allows you to add it wherever you want, but also with any text/image/etc that you want to put.

harvey 02-27-2011 02:03 PM

you're over complicating things, just do this:

Code:


<?php if(get_post_meta($post->ID, 'author-comment', true)): ?>
<div style="somestyle"><?php echo get_post_meta($post->ID, 'author-comment', true); ?></div>
<?php endif; ?>

then just use a custom field named author-comment (or whatever) with the text you want and apply the style as you want.

Alternatively, if your theme doesn't use excerpts, then you can simply place the_excerpt() there, so you'll only need to add an excerpt to display that text, and if you don't input anything, then nothing will be displayed.

DWB 02-27-2011 02:57 PM

Quote:

Originally Posted by MrGusMuller (Post 17943957)
You can create a shortcode for that.
Its easy shit.
Add something like this to ur /wp-content/themes/YOURTHEME/functions.php

PHP Code:

function myNote ($atts$msg)
{
    
    
extract(shortcode_atts(array(
                
"atts" => '',
                
"msg" => ''
        
), $atts));
 
 return 
'<div style="background-color:#f5f5b7; border-color:#e2d6ac; border-style: dashed; padding:10px;">'.$msg.'</div>';
      
}
add_shortcode('note''myNote'); 


then, in the post that you want to call, write [note msg="blalbla bla bla"] where you want the warning

My theme is throwing an error when I try this. Saying I can't modify the header. :Oh crap

Also flagging me when I try to create a custom field. Grrrrr.

It's a Woo Theme.

DWB 02-27-2011 03:27 PM

I messed something up in my functions page that was creating the error for the custom field. Working on that now.

DWB 02-27-2011 04:00 PM

OK... I think the custom field will work, but how do I tell it to call just 1 key (key is called "note")?

If I put the_meta() it calls them all.

DWB 02-27-2011 04:02 PM

Quote:

Originally Posted by harvey (Post 17943985)
you're over complicating things, just do this:

Code:


<?php if(get_post_meta($post->ID, 'author-comment', true)): ?>
<div style="somestyle"><?php echo get_post_meta($post->ID, 'author-comment', true); ?></div>
<?php endif; ?>

then just use a custom field named author-comment (or whatever) with the text you want and apply the style as you want.

Alternatively, if your theme doesn't use excerpts, then you can simply place the_excerpt() there, so you'll only need to add an excerpt to display that text, and if you don't input anything, then nothing will be displayed.

Bingo, that did the trick. :thumbsup:thumbsup:thumbsup

Thanks everyone.

fris 02-27-2011 06:18 PM

Quote:

Originally Posted by DirtyWhiteBoy (Post 17944135)
Bingo, that did the trick. :thumbsup:thumbsup:thumbsup

Thanks everyone.

if you are using woothemes, they have their own shortcodes for notices. like you see on this page.

scoll down

http://www.woothemes.com/2011/02/new-ideas-feb-11/

more info

http://www.woothemes.com/2010/08/woo...rk-shortcodes/

http://www.woothemes.com/2011/02/we-...ur-shortcodes/

chris_joseph 02-27-2011 07:04 PM

check this plug-in http://wordpress.org/extend/plugins/...x/screenshots/


All times are GMT -7. The time now is 03:04 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123