Displays the contents of the current post. This template tag must be used within The_Loop.

learn more… | top users | synonyms

5
votes
1answer
850 views

Using preg_replace to separate gallery from the_content?

In a Wordpress theme, I need to separate a gallery from the rest of the_content. I think one could do that with get_the_content and preg_replace but it's a little beyond my skill level how to actually ...
2
votes
2answers
3k views

limit the words in the post content and add read more link

As you can see into the code, the routine is to display the post which has an id of 266. Now all I want is to limit the words displayed in the post content of that post. Let's say, I want to limit the ...
0
votes
2answers
212 views

append_content help

i have a function in my plugin append_the_content($content) this is used to display my function inside the post, but it is coming before the post, i want to make it after the post, for this i tried ...
18
votes
9answers
11k views

Stop Wordpress Wrapping Images In A “P” Tag

I have searched high and low for a simple solution to this, but to no avail. Wordpress keeps on wrapping my images in p tags and because of the eccentric nature of the layout for a site I am working ...
1
vote
2answers
2k views

What is the filter hook for custom fields content?

The following code hides "the_content" output add_filter( "the_content", "cp_module_pcontent_post_content" ); function cp_module_pcontent_post_content($content){ global $post; ...
0
votes
1answer
571 views

How to prepend text to the_content, but after img/shortcode

I was trying to add some text to the beginning of every post (the text comes from post_meta, but for this example let's assume it's static text). Here's what I tried: add_filter('the_content', ...
4
votes
2answers
969 views

Split Content and Gallery

Is there a way to split up the post content and the gallery short code. I want to display the gallery outside my normal content no matter how or where it is placed. I can use this to get the shortcode ...
5
votes
1answer
445 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 ...
3
votes
1answer
496 views

Custom filter for the_content doesn't work correctly

=====THIS POST HAS BEEN UPDATED===== SCROLL TO THE BOTTOM TO READ THE UPDATE! I asked a question yesterday that a gentleman named Tim was nice enough to take a stab at. He helped me through writing a ...
2
votes
3answers
3k views

How do I add the featured image to the_content after the first paragraph?

My problem: I'm trying to create a filter that will add the featured image of a post to the_content, so that I can have the first paragraph of the_content displayed before this image. What I basicly ...
2
votes
2answers
378 views

Rendering Custom Post Types independently of the theme in use

By using a plugin called "Custom Content Type Manager", I have implemented in my blog a simple Custom Post Type called "game review" which is simple a post, plus some extra fields which represents the ...
2
votes
2answers
2k views

What params are available with the_content filter?

I am looking for what params are passed to my filter function. Where can I find such info in the codex? http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content didn't provide much info I ...
0
votes
2answers
2k views

Removing any and all inline styles from the_content()

For one of my current projects, I had to transfer blogposts from an old Wordpress site to my project. Things went smoothly until I've seen that all the posts were copy pasted from Word, leaving this ...
3
votes
1answer
419 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
1answer
121 views

Modify the_content after the more tag

I have created a custom plugin that pulls video and images out of a post and puts them into a nicely formatted set of galleries. The only problem is that the plugin doesn't allow me to put a video or ...
1
vote
1answer
206 views

Extracting gallery images in Wordpress 3.5 on index.php

I'm trying to add a slider on my front blog page for every gallery post, but I have some trouble extracting the images from the post gallery, using the following code: $post_content = ...
1
vote
1answer
729 views

How to encode post content as JSON?

I`m trying to construct a json object but are having difficulties with the_content since it returns newlines, which causes the script to fail. The error messages received is: Uncaught SyntaxError: ...
1
vote
2answers
812 views

How to apply content filter permanently?

I have the following temporary filter to fix a content error. We have data in our posts that have 4 digit zip codes, because the leading zero was cut when the original file was created. (For instance, ...
0
votes
1answer
164 views

How do I assign this filter to a variable? (Appending php & markup to the_content)

===I HAVE SOMETHING THAT WORKS NOW, JUST NOT CORRECTLY. PLEASE READ THE WHOLE POST, I AM GOING TO LEAVE IT ALL UP HERE BECAUSE OTHERS MAY BE ABLE TO BENEFIT FROM ME BUMBLING THROUGH THIS PROCESS!! I ...
0
votes
1answer
364 views

Wp-query causing problems with the_content();

I'm using some code provided in an answer on here to calculate "post X of Y" and display pagination icons on single.php. It works beautifully but it's causing problems displaying the_content(); On ...