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

learn more… | top users | synonyms

1
vote
2answers
190 views

Combining the_excerpt with the_content

I have some html: <div class="container"> <p class="accent">The first paragraph...</p> <p>The rest of the article...</p> </div> I'd like to put "the_excerpt" in ...
0
votes
1answer
165 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
575 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
232 views

Fixed height of the_content()

I have page with news. I'm displaying them as a shortened text (300 chars limit), I'm removing any images using preg_replace() and everything looks fine, until someone uses line breaks in his post. ...
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 ...
0
votes
1answer
225 views

Problem on the_excerpt(); function <the_excerpt> <the_content>

I am working on wordpress but I have problem when I write the_content('read more'); then on indexpage each post load full data of post but I want to but when I am using the_excerpt(); then ...
1
vote
2answers
871 views

Hook midway through the_content();?

Basically, I want to add a function that executes half way through the_content(); I want to add a message/ad block whatever in the middle of all of my content without having to go in to each ...
0
votes
1answer
95 views

How to parse without changing the characters case (lower and upper) in wordpress the_content?

I made a custom parse function for my plugin and this one works great. I just have a little problem ! Here is my function : public function ys_glossary_parse( $text ) { // Get all the ...
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; ...
4
votes
2answers
9k views

Get content from one page and show it on another page

So, I've been googling and reading and testing and failing. I'm fairly new to php, so don't expect to much :) I'm working on a new design, and I want to show content from the about page on my ...
0
votes
1answer
367 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 ...
1
vote
1answer
521 views

Adding the_date inside <p> tags around the_content

I am trying to get it so that all of my posts display the date at the beginning of the post content, such that each post begins as: "August 28 - Lorem ipsum dolor sit amet..." However, if the ...
0
votes
2answers
2k views

How to access & display images from a post without textual content ( and vice versa) according to best wordpress practices

Looking to create a customized single.php for my posts. In one column I'd like to display all images added through the add media function (inserted into post). In the next column all other content ...
4
votes
1answer
3k views

why doesn't the_content() work in this {single-custom_post_type.php} page?

This code is from my page single-publication.php. It outputs the relevant custom fields etc (here wrapped in template tags), but the_content() won't output the post content. I've resorted to using ...
0
votes
1answer
288 views

Help with add_filter('the_content', 'some_function') and multiple matches

I have a site where a user can insert slideshows into a post by entering the shortcode in the content box. He can also add videos by adding the video code in the same box. I need to separate these two ...
4
votes
1answer
4k views

How to appending to the_content using add_filter with custom post type?

I have a custom post type running fine, but some of the text in the page is the same for every post, so I want to add it in using a function. I have this set up: function ...
0
votes
1answer
3k views

add_filter for specific pages

Is it possible to add this filter add_filter("the_content", "magicalender_get_event_page"); But only for one specific page, for example if($post->post_name == "magicalenderpage") If I put the ...
0
votes
3answers
675 views

how to include page content to specified length & then “read more” link

I'm pretty new to WP, so please forgive any stupid questions and/or coding! I'm using the following code in my index.php file to include content from another page: <div id="tm-container"> ...
0
votes
2answers
2k views

How can I remove filters from custom post types?

I created a custom post type which I'll use as landing page for PPC. Now on that custom post type I would like to remove all the filters which are adding the social media buttons for example. I tried ...
0
votes
1answer
197 views

The_content display a different content from a previous loop

I have custom template for my homepage. If i just put the_content(); to this template, nothing else, then it will display my text i entered in my admin panel in the editor. But if i have a different ...
0
votes
1answer
365 views

WordPress appends the_content filtered text inside last paragraph tag of content (rather than after it)

Using WordPress version 3.2.1 I've noticed that when I use this filter: add_action('the_content', 'myFunction', 0); The content editor places the content written from "myFunction" within the last ...
0
votes
1answer
490 views

Problem in replacing the_content with the_excerpt()

I want to add read more to a blog. For that I need to replace the function the_content(). I found it in the loop file and replaced it with the_excerpt() but still posts are being shown of full length. ...
1
vote
3answers
626 views

Finding the paragraphs in content

I am trying to create two functions, one that catches the first paragraph of some content, and one that catches the rest, but I have hit a bit of a conundrum. I have this in my single.php: <div ...
0
votes
2answers
2k views

Get the Page Content,without generating HTML

I want to get the page content (so i can parse the tags/short-codes in it), but i don't want to output the result itself to the browser (i.e. echo=0). I tried get_the_content(); but its the same ...
2
votes
1answer
917 views

the_excerpt(), get_the_excerpt() and the_content() all killing “the Loop”

Before I call the_excerpt(), the_permalink() displays the correct thing. Afterwards, it does not... <?php global $query_string; //strip out the ...
0
votes
1answer
830 views

How do I pull excerpts from pages?

So I enabled custom excerpts on my pages with this function. add_action('init', 'page_excerpts'); function page_excerpts() { add_post_type_support( 'page', 'excerpt' ); } However, When I enter ...
1
vote
2answers
2k views

Content/Excerpt length control for a specific loop?

Is it possible to control the length of the content or excerpt for a specific query/loop? I have come across the following code, but this changes the length for all excerpts, I want it focused on a ...
0
votes
2answers
1k views

Best way to strip the_content of html on the front end?

What is the best way to strip *the_content* of html tags and needless spaces on the front end? I'm building a special use theme that needs to allow users who can edit_post to make changes on the front ...
0
votes
2answers
443 views

How to add multiple the_content or something like that?

ok... let me explain: i have an example post in wp admin and i want to add : some text (already added via the posts editor) some custom stuff (some taxonomy that i have already added) some videos ...
1
vote
2answers
370 views

the_content is always surrounded by paragraphs (how to disable or remove them)?

the_content is always surrounded by paragraphs, it doesn't matter if I'm in HTML view and there's nothing there. Does WordPress have a function to remove them? IS there any way?
2
votes
1answer
650 views

Add span to the first letter of post

Example post <p>Lorem ipsum dolor sit amet</p> <p>Morbi elementum odio vel tortor adipiscing vel tempor risus ullamcorper.</p> What I have done : function ...
0
votes
2answers
213 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 ...
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, ...