Guest User

Untitled

a guest
Jul 18th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. <?php while (have_posts()): the_post(); ?>
  2. <h3><?php the_title(); ?></h3>
  3. <img style="float: left; padding: 13px 20px 0px 0px;" src="<? echo catch_that_image(); ?>" width="100">
  4. <?php the_excerpt(); ?>
  5. <p><a href="<?php the_permalink(); ?>">Read more...</a></p>
  6. <?php endwhile; ?>
  7.  
  8. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  9.  
  10. <?php require('/the/path/to/your/wp-blog-header.php'); ?>
  11.  
  12. <?php echo esc_html(get_the_excerpt()); ?>
  13.  
  14. <?php header("Content-type: text/html; charset=UTF-8");?>
  15.  
  16. <?php remove_filter( "the_excerpt", "wptexturize"); ?>
  17.  
  18. function local_fix_quotes($in) {
  19. $in = str_replace("&#8220;", '"', $in);
  20. $in = str_replace("&#8221;", '"', $in);
  21. $in = str_replace("&#8217;", "'", $in);
  22. $in = str_replace("&#8216;", "'", $in);
  23. $in = str_replace("&#8211;", "-", $in);
  24. $in = str_replace("&#8230;", "...", $in);
  25. $in = str_replace("xC2xA0",' ',$in);
  26. $in = str_replace("xE2x80x99","'",$in);
  27. $in = str_replace("xE2x80x9C",'"',$in);
  28. $in = str_replace("xE2x80x9D",'"',$in);
  29. $in = str_replace("xE2x80x93",'-',$in);
  30. return $in;
  31. }
  32. add_filter( "the_excerpt", "local_fix_quotes" );
  33.  
  34. <?php
  35. define('WP_USE_THEMES', false);
  36. require_once('./wp-blog-header.php');
  37. remove_filter( "the_excerpt", "wptexturize");
  38. ?>
  39. <html>
Add Comment
Please, Sign In to add comment