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)
-   -   formatting posts in wordpress... (https://gfy.com/showthread.php?t=970474)

klinton 05-27-2010 10:41 AM

formatting posts in wordpress...
 
Hello, what is best way for adding posts to wordpress ? I tried to make some html before in some wysiwyg editor, and copy and paste it later to wordpress, but wordpress editor seems to add <br> tag everywhere...... Do you know some EASY solution for making nice wordpress posts (like nice html sites), I mean with all images putted, videos embedded and so on....is there some nice editor to do it ?

yeah i know i'm lame at wordpress.....but Thx :)

cyber 05-27-2010 10:59 AM

Add this to your functions.php file:

Code:

function my_formatter($content){
  $new_content = '';
  $pattern_full = '{(\[raw\].*?\[/raw\])}is';
  $pattern_contents = '{\[raw\](.*?)\[/raw\]}is';
  $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);
  foreach($pieces as $piece){
    if(preg_match($pattern_contents, $piece, $matches)){
      $new_content .= $matches[1];
    } else{
      $new_content .= wptexturize(wpautop($piece));
    }
  }
  return $new_content;
}

remove_filter('the_content', 'wpautop');
remove_filter('the_content', 'wptexturize');
add_filter('the_content', 'my_formatter', 99);

now in any post you don't want WP to auto-format, type "[raw]" at the beginning of the post, and "[/raw]" at the end of the post.

There is probably a plugin to do this. I'm not sure. Also, you can manually edit one of the WP core files to do this as well for all your posts.

LoveSandra 05-27-2010 11:05 AM

bump bump

cyber 05-27-2010 11:07 AM

Quote:

Originally Posted by LoveSandra (Post 17180008)
bump bump

There's no need to bump this thread. it was JUST posted and I just answered it.

I know you're not a bot, but you're just a person somewhere running up your post count by posting "bump bump" "thanks for this" "good luck" "2 cents" "lol" posts all day. My god that gets annoying, QUICK, when half the GFY posts are spamhumans.

klinton 05-27-2010 11:11 AM

hey, thank you very much, i will try it....

Supz 05-27-2010 11:18 AM

If you use www.blogdesk.org application to create posts. There is a format function in this program that you can use. It is a great tool. You can also add custom fields and do a bunch of other cool stuff. Publish to multiple blogs so on so forth.


All times are GMT -7. The time now is 05:18 PM.

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