The tag has no wiki summary.

learn more… | top users | synonyms

12
votes
2answers
1k views

Switch between Visual and HTML tab freely

So this question has been raised many times under different flags, however I'd like to present a unified thread for an ultimate solution to this issue. In WordPress, by default, when switching back ...
11
votes
2answers
10k views

can I add a custom format to the format option in the text panel?

In the text editor, where you can set headings and other settings, is it possible to add your own styles for clients to use? and even remove the unnecessary ones?
6
votes
6answers
3k views

Nice way to print_r arrays

So you know how Drupal has functions in modules like Devel that allow you to output arrays in a nice format like dsm($array) or krumo($array)... Does WordPress have an equivalent or a nice way of ...
5
votes
2answers
981 views

Formatting Code Snippets on Free WordPress.com Account?

I've got a WordPress blog on WordPress.com. When posting something I'm including some sample Java code in the <code tags, is there any way I can have this formatted better? Such as syntax ...
5
votes
1answer
446 views

Content over 10,000 characters won't display with the_content()

A friend of mine just noticed that their site wasn't displaying pages that had a lot of content. For some reason they are just blank, and if he removes some content from the page it will display ...
4
votes
2answers
13k views

Change CSS/formatting on specific page, but not pages in general?

How do I change the formatting on http://wordpress.barrycarter.info/index.php/voronoi-temperature-map/ so that (for example) the map's nearly flush with the bottom of the menubar? I don't want to ...
4
votes
2answers
659 views

Remove wptexturize from a shortcode?

Is there a way to remove wptexturize only for a certain shortcode?
4
votes
2answers
4k views

Issue with enabling formatting in excerpts in Wordpress

This is what I added in my theme's functions.php file to enable formatting for excerpts in Wordpress (source of the tip): remove_filter('get_the_excerpt', 'wp_trim_excerpt'); ...
4
votes
1answer
980 views

Automatically decrease font size for long words

I am working on an e-commerce site in which post and product titles will need to be displayed in fairly narrow divs. I would like to set a specific font size for words which can naturally fit in the ...
3
votes
1answer
1k views

Create a formatted table-like menu

I've just put the site up a couple weeks ago and adding some more things to it for my friend however there's got to be an easier way to lay content out over wordpress. I've having a hard time with it ...
3
votes
9answers
291 views

disable WP automatically inserted line breaks after an image

I've set medium sized images to a custom size which should allow for both of the images to align horizontally within the post. (The full post width is 880px, medium images are set to 413px.) My ...
3
votes
4answers
7k views

Keep HTML format when switching from Visual to HTML editor

I've been looking around for a solution that will allow me to edit HTML code and have it remain after a switch to the Visual editor and back. I've tried a bunch of things with no luck: the ...
3
votes
1answer
424 views

WordPress adding <br> tags into plugin content

We've written a plugin that shows reviews upon usage of a shortcode. On some sites, Wordpress is adding <br> tags throughout the shortcode content, and others it does not. The shortcode works ...
2
votes
2answers
2k views

Shortcode from a widget is wrapped in unwanted <p> element

I'm using Black Studio TinyMCE Widget as a rich text editor widget. In a sidebar I inserted the TinyMCE widget with a [testimonial] shortcode and some content after it. For example: [testimonial] ...
2
votes
2answers
286 views

Why is WordPress WYSIWYMG and how do I make it WYSIWYG?

WordPress may have a text editor that appears to be WYSIWYG, but upon using it I discovered that it is actually WYSIWYMG- What You See Is What You Might Get (once it's done screwing with the HTML). ...
2
votes
1answer
168 views

Use a language specific thousand separator

I have a views counter on each post. When it reaches for example 1000, it adds a dot as the thousand separator, the result is 1.000. This is odd in my language, I should have a space as separator or ...
2
votes
2answers
834 views

Add dollar sign and commas to a number?

I have a field on the admin side where a user enters a number for a price. If a user enters 1000000 I'd like to be able to display on the front-end $1,000,000. Any ideas on how to accomplish this? ...
2
votes
1answer
1k views

Add visual editor capability to custom excerpt window?

The custom excerpt field (under Add New Post) only accepts html. Thus, you can't just cut and paste a segment from the Visual Editor. If you want links to appear in custom excerpt, you have to know ...
2
votes
2answers
2k views

When calling wp_title(), do you have to create some kind of “title.php” file?

... or does wp_title() already handle the various contexts in your blog? This could clarify for me how I can achieve a reusable index.php file without having all the conditional statements inside it ...
2
votes
2answers
718 views

Comment formatting with comment_content

I'm displaying a comment outside the comment template, getting it with get_comments() and echoing the comment_content. My problem is that the comment loses the formatting (paragraphs, line breaks, ...
2
votes
2answers
2k views

Remove hidden formatting when user paste text from MS Word into TinyMCE

Around a fifth of post submissions that I receive contains ridiculous amounts of hidden formatting. For example, here is some of it from a recent post: <!--[if gte mso 9]><xml> ...
2
votes
3answers
690 views

Preserve white-space in Page

I frequently post pages with code examples. However, Wordpress strips out whitespace, thus ruining the indentation and formatting of my code. So this: <pre> selector { property: ...
1
vote
1answer
2k views

Formating the display of a post's date, outside the Loop

I'm using this function to be able to retrieve several data, from outside the Loop: function get_post_data($postId) { global $wpdb; return $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE ...
1
vote
1answer
138 views

Email sent from WordPress has html tags

Instead of: Hello, Thank you dfasdfasdfasdf asdf asdf asdfas dfs Please, feelasdf asdf asdf I am getting something like this in the email that arrives to my mailbox: <p>Hello,</p> ...
1
vote
2answers
967 views

PHP library that can merge stylesheet with inline style [closed]

I am working with html document generated from Micrsoft Word 2007/2010. Besides generating incredibly dirty html, word also has the tendency of using both block and inline style. I am looking for a ...
1
vote
2answers
775 views

Pasting code into pre-formatted text in Visual Editor not working in 3.3.1

Pre-formatted text in the Visual Editor is not behaving like I'm used to. I've got an old installation (3.2.1), and when create pre-formatted text, all the line-breaks and spacing is preserved. In ...
1
vote
1answer
2k views

How to Include HTML in Excerpts?

I use the Leaf theme and I can't seem to format the home page excerpts. I tried plugins and fiddling around with the theme-functions.php file but to no avail. I don't need a lot of fancy stuff in ...
1
vote
1answer
3k views

Stop auto formatting in shortcodes

Is there a way I can stop Wordpress auto formatting everything I enter inside a shortcode tag? A the moment I want to include a h2, a paragraph and another shortcode, but everytime I do Wordpress ...
1
vote
1answer
167 views

Unwanted line break before <input>

Based on help here ( Use of Javascript with Dojo/Dijit on a WordPress page) I got Dijit half way working using a custom template. But, I still can't figure out why WP inserts breaks where it does. ...
1
vote
2answers
685 views

Line breaks not showing up properly

I'm trying to have spacing show up between a paragraph and heading in the following excerpt: In my article series on handling extracurriculars, I coined the term Sovereign Zen philosophies. It builds ...
1
vote
2answers
163 views

Unautop / Sanitize content added to a post through a plugin

I am using the SimpleReach plugin that adds some content to every post using the content hook. The content that is being added is <!-- SimpleReach Slide Plugin Version: {{srslide_plugin_version}} ...
1
vote
4answers
82 views

Formatting with <pre>

I'm building a site that doesn't want any styling applied to the entry-content, because it should keep the formatting of the text. Bizarly, it works on old entries, but new entries via the front-end ...
1
vote
1answer
230 views

Crafting WP_Query array, sort by date

question about wordpress WP_Query: 'post_type' => 'event_date' outputs dd/mm/yy ex: 31122012 I would like to order my frontend 'event_date' output not by latest WP post entry but by latest ...
1
vote
2answers
176 views

Displaying Archives List

I'm displaying list or archives using <?php get_archives('monthly', '', 'html', '', '', FALSE); ?> and my list displays December 2012 November 2012 etc However I would like to format ...
1
vote
1answer
65 views

How to define a custom font family for a wordpress blog that will not affect the entire site

While my related question on Stack Overflow should explain the basic CSS for this once it gets answered, how would I define a custom font family for a wordpress blog that will only apply to a ...
1
vote
1answer
521 views

Is sanitize_title_with_dashes formatting function too liberal (in terms of accepted characters)?

sanitize_title_with_dashes (see code below for reference) is the function Wordpress uses to format "pretty" urls. However, contrary to the function's comment header, it allows much more than ...
1
vote
1answer
421 views

Format the Layout of Images In The Edit Post Textarea?

The textarea in which posts are written and edited doesn't handle image layout very well. Inserted images seem to be aligned with the left edge of the textarea, or the right edge of the previous ...
1
vote
0answers
200 views

How can I remove <br /> line breaks from manually formatted HTML?

I see a lot of posts here and elsewhere having trouble adding line breaks for some reason, but I'm trying to remove them. I'm new to WP, and I see that when editing in "HTML" mode the text is rendered ...
1
vote
2answers
955 views

How can I add custom text styles to the visual text editor?

By default an author can select from Paragraph, Address, Preformatted, Heading 1, etc.. As an example I'd like the author to have the ability to visually wrap selected text in a tag, without ever ...
1
vote
3answers
2k views

Keep formatting for tables copied from MS Word?

I've found that copying and pasting tables from MS Word was closest to easiest when it comes to making tables; rather than formatting a table from scratch in a WYSIWYG editor. The one shortfall I've ...
1
vote
2answers
249 views

How can I prevent Wordpress to wrap <br> into a <p> paragragraph

When I create a new page and put <br class="clear"> into the HTML view it gets rendered as <p> <br class="clear"> </p> This causes problems with the theme ...
0
votes
3answers
87 views

return unformatted content in encosing shortcode

I've written a little shortcode, following basic instructions on Wordpress Codex: function myshortcode( $atts, $content = null ) { extract( shortcode_atts( array( ..., ), $atts ) ); ...
0
votes
3answers
2k views

Automatically added brs and paragraphs?

Here's my very simple shortcode: function box_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( 'width' => 'auto', 'height' => 'auto', ...
0
votes
1answer
59 views

edit formatting.php in a theme so it wont get overwritten

There are some parts of wpautop I want to remove, but keep the rest. I found in wp-includes/formatting.php within the function wpautop: $pee = preg_replace('|<p>\s*</p>|', '', $pee); // ...
0
votes
1answer
91 views

PHP echo stripping formatting in Advanced Custom Fields [closed]

Using Advanced Custom Fields in Wordpress, I have the following code: if(the_sub_field('company_name')) { echo '<strong>Company name:</strong>'; echo '<p>' . ...
0
votes
2answers
57 views

Exclude uploaded files from appearing in the excerpt()

In a post I have some text and some media attachments and when I use the_excerpt(), it strips all the anchor tags from the attachments and shows just their file names and its causing me problems as ...
0
votes
2answers
92 views

Linebreaks behaving oddly inside blockquotes

I'm using a vanilla up-to-date WordPress install. I've noticed that the visual editor, even in text mode, does not show <p> or <br> tags, and if you insert them it strips them out and ...
0
votes
2answers
1k views

Stop wordpress from adding html tags but not remove my own tags?

I've been trying to make wordpress stop adding html tags to my content but leave my own html tags alone? Tried remove_filter( 'the_content', 'wpautop' ); and installed PS Disable Auto Formatting ...
0
votes
1answer
358 views

How to prevent automatic conversion of dashes to &ndash;

When I put -- into a post it is automatically converted to the – &ndash; character in the output by wordpress. How can I get normal '--' double dashes in my content.
0
votes
1answer
172 views

post_class() breaks out of formatting. . . extra markup also generated

Hoping Im just running into something easy Here's the scenario, I've created a function called tr_get_post_image_tplt that spits out the post thumbnail (or custom size) for the post being called. Im ...