The the-content tag has no wiki summary.
2
votes
2answers
1k 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 ...
3
votes
1answer
444 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 ...
0
votes
2answers
205 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 ...
13
votes
9answers
7k 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
1k 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;
...
3
votes
1answer
301 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
2answers
288 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 ...
1
vote
2answers
1k 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 ...
3
votes
1answer
244 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
86 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
434 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
745 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
2answers
143 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 ...
0
votes
1answer
119 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
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', ...
0
votes
1answer
235 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 ...