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

learn more… | top users | synonyms

0
votes
1answer
22 views

Excerpt all post content Content Same Size without word cutting off

On my category page there are list of 24 posts with title and excerpt content. To display specific lengths of content, I am using substr function. Now the issue is that each post excerpt content are ...
-1
votes
1answer
27 views

I want a part of the_content be under custom post types

On my homepage I have put some information on the page in wordpress. I show this content with the_content();. I also have 3 different custom post types that show under this content which is what I ...
2
votes
0answers
47 views

Heartbeat API oEmbed

By default running content through the_content filter automatically checks for oEmbed content. However when returning data through heartbeat_received the filter for oEmbed doesn't seem to work. For ...
1
vote
1answer
39 views

How to show full post?

I'm using this theme for my magazine website. I'm having trouble showing the full content on my blog side. I have tried changing in the php to show_content but it doesn't work. Any suggestions on how ...
1
vote
2answers
61 views

add_filter('the_content', '…') stops pagination from working

I have a function (it deals with using preg_replace_callbackto replace Image URLs with URLs/paths to the uploads directory - lets call it replaceImgUrls()) which is then passed into ...
-1
votes
0answers
20 views

How can I manipulate the HTML of the_content in a specific way?

I know the basics of how to add a filter to modify the_content, but I want to modify the HTML in detail. Specifically, I want to find any <blockquote> elements and add some HTML within them. ...
0
votes
1answer
48 views

How to check if single.php has already called the_post_thumbnail function

I am creating a front end plugin to upload images and adding filter in the_content() to display post thumbnail but some templates already have the_post_thumbnail in single.php or loop.php. Is there ...
0
votes
1answer
64 views

the_content() not outputting anything (Advanced Custom Fields)

Hi i'm using the custom post types UI and advanced custom fields plugin and would like to use the default content editor as one of my fields for a custom post type. When i use the_content(); in the ...
1
vote
1answer
54 views

Remove empty lines (&nbsp;) when author updates their post

Whenever adding an empty line between paragraphs using TinyMCE, the &nbsp; character entity is added. How can I strip the content of all instances of this character whenever an author updates ...
1
vote
0answers
28 views

Best way to handle Post-Format Video without using the_content?

I have read the Codex and I'm about 3 hours searching around sites for a deep understanding of post-formats but got no answer. Don't know if it is a dumb question but after spending a long time ...
0
votes
1answer
30 views

post_content with line breaks

I want to be able to get post_content with line breaks. What is the best way to do it? I previously use the_content() which was working fine until I needed to install a plugin that adds share buttons ...
0
votes
1answer
41 views

the_content() won't load galleries on homepage

I need to show a gallery that's on the content of one of the pages I'm displaying on the homepage (I altered the query so it would display pages instead of posts). If I open the page directly I can ...
0
votes
1answer
26 views

Add Element as a Filter to the_content

Can I and How would I add a filter in the function.php that would add a HTML element around the content when the_content is used? This would be similar to what you can do with the_title. i.e: ...
0
votes
1answer
44 views

how to use custom loop in the_content filter

Trying to use the the below code for my CPT 'state' like add_filter('the_content', 'my_custom_loop'); but the trial and error is not getting me anywhere. I can't use a single-{post_type}.php since i ...
0
votes
0answers
53 views

List posts in a select tag and display the_content of the selected option

I would like to create a select tag with posts from my custom post type and then, when an option is selected, I need to get the_content() from that selected post by its ID and display the content ...
0
votes
0answers
31 views

Split the content of single.php by more tag and split texts and photos

I am trying to sprit the_content() by more tag. But I cannnot think of how to write the code for the photos(images) before and after more tag. Photos exists none or more by the post. If anyone know ...
0
votes
1answer
82 views

apply_filters('the_content', $content) alternative

"the_content" filter can get added with other filters from plugins and themes which could alter content, when you simply want this to format the post_content to HTML format. Is there a better ...
1
vote
1answer
38 views

How to ensure “the_content” filter runs only for the main displayed content?

I have a plugin which adds the method to "the_content" filter. add_filter('the_content', 'myFilteringFunction', 10000); Within that function I want to add some links on the beginning and the end of ...
0
votes
0answers
20 views

Add class to all parent elements inside the_content

Is there a way to add a class to all parent elements inside the_content? My problem is I'm using this kind of css selector: .post_content>* {margin-bottom:10px;} This is to due with mostly ...
0
votes
2answers
45 views

Can i use multiple 'the_content' filters?

I am currently using a 'the_content' filter to add some HTML to the bottom of my posts and pages. But, I want to add another 'the_content' filter to a handful of specific pages (using page IDs). Is ...
0
votes
2answers
73 views

How to filter the_content() & include content from template

I am trying to filter the_content() on single page, but it looks like it is creating an infinite loop. I want to know how to fix this. I want to override the_content(). Is there any other way to ...
0
votes
0answers
12 views

Modify images when inserted in to WYSWYG Editor

When an image get added it currently adds <a href="www.domain.com/image.jpg"><img src="www.domain.com/image.jpg" /></a> I am aware that user can directly add the link. However the ...
0
votes
0answers
30 views

the_content not including blog image URLs

I am using the jQuery Image Lazy Loading Plugin on my WP 3.3.1 blog, however I have found that the_content does not include the image URLs, so the preg_replace that this function does cannot find any ...
0
votes
2answers
43 views

put the content of a single post into og:description

I'd like to have the content of the current single post loaded into the og:description meta property - but the '. $content .' doesn't output anything? This is what's in my header.php if ...
1
vote
2answers
87 views

WordPress replacing all line breaks in comments with “rn”

This concerns a problem at my blog. My provider recently required me to upgrade from PHP 5.2 to PHP 5.4. This in turn required me to update WordPress. Ever since the dual update, all line breaks in ...
0
votes
1answer
70 views

How to change the position of Jetpack sharing icons?

Typically Jetpack sharing buttons target the single page's the_content() function and echo the sharing icons just below the content. But for my site, I actually want it to Disable for the_content(), ...
0
votes
1answer
49 views

Remove specific shortcode from get_the_content()

I have a variable like this: $post_content = get_the_content(); Here i want to remove some specific shortcode from the $post_content variable e.g i want to remove only this [video height="300" ...
0
votes
0answers
34 views

Removing image dimensions from `the_content`

I'm looking to remove image dimensions from the_post_thumbnail, as well as the_content. I've found the following code, but there's a slight issue: add_filter( 'post_thumbnail_html', ...
0
votes
1answer
39 views

How can i specify the size of the image rendered by the_content();?

I can do it manually like this: echo get_the_post_thumbnail($post->ID, 'large'); But how can i set the size of the image rendered by the_content(); to Large too ?
0
votes
0answers
22 views

more tag not recognized but content is truncating

Specifying truncating posts of category 'news' on homepage. Trim works but not recognizing the <!--more--> code in posts... from homepage. code in homepage ...
0
votes
1answer
94 views

change the_content images for different sizes (Desktop, tablet, mobile)?

This may be a complicated question so I'll try to explain it as easy as possible. I have three sizes for images in my post (thumbnail, medium, large, 640px, small) and I would like to change the size ...
1
vote
2answers
79 views

Filter to change the content of 404 page

I have created custom rewrite rules. These rules now go to 404 page as expected. I can use action hook template_redirect to change the template matching query_var. But I don't want to create separate ...
0
votes
0answers
32 views

Is it better to use filter for the_content in archive pages?

I'm using advancd-custom-fields plugin and I'm about to modifiy my acrhive content page that is shown frontend. I use the file personnel-archive.php (because the custom post type used is personnel) in ...
0
votes
1answer
39 views

What happens when two or more plugins use the same hook?

Two of my plugins use the same filter hook: the_content. What happens in this case? Is there a priority handler, like which plugin will be served first? I would like to use both of the plugins. I ...
0
votes
2answers
31 views

Content won't load when using action the_content

When I use add_action( 'the_content'... The content of the page just won't load. Also the content I am trying appears in all kinds of places in the page. Why? Is there a way to force it to only ...
0
votes
1answer
33 views

Is it possible to change the contents of “the_content()”?

I have moved a blog over to wordpress and I've used a lot of DOMDocument, xpath, regex and other methods to scrub the text. This means that the_content(); is no longer the content and I'm using my ...
0
votes
1answer
79 views

the_content() “crashes” for single pages

I have big trouble with the_content() for single.php. Whats my problem? the_content() doesn't give any output on single pages furthermore it crashes (no other PHP code below the function call is ...
1
vote
1answer
35 views

Plugin Using get_the_content Causing Issues With <!--more--> Tag

I'm testing out the Woothemes "Our Team" plugin to see how it works for future project purposes. The plugin uses at CPT for Team Members as well as a shortcode to allow users to display members on a ...
0
votes
1answer
27 views

Have multiple loops on a page appear after/between page content

I created a function (in function.php) that allows me to put additional loops for different categories into pages: function custom_summary($atts) { extract(shortcode_atts(array( ...
0
votes
1answer
25 views

IF Inside A Function For Content Filter [closed]

Trying to use a filter for post content. But how do i make an IF work inside the function. <?php function my_the_content_filter($content) { } add_filter( 'the_content', 'my_the_content_filter' ...
0
votes
0answers
40 views

Suppress the_content filter in a nested loop

I have some layout changes that are being applied to the_content. I need to do one of two things, but neither is working as expected... either: Pass data to the filter so that it knows if it is a ...
-1
votes
1answer
72 views

Find and replace weird characters in the_content [closed]

So, I am using the following code to filter out certain letters. $phrase = get_the_content(); $phrase = apply_filters('the_content', $phrase); $replace = 'ï'; echo str_replace('ï', $replace, ...
0
votes
1answer
54 views

Sort appearence order in the_content()

I have an About the Author plugin, echoing inside the_content(), and a Facebook Like Button, that I hardcoded in the HTML, after the_content(), here's how it is outputting: The Facebook Like button ...
0
votes
0answers
112 views

Altering images inserted into Posts for lazyloading with PHP Simple HTML DOM Parser

I want to find a robust solution to make lazyloading possible for images inserted into a post. There are many lazyload solutions out there. I'm not looking to cater any one of them specifically, but ...
0
votes
3answers
54 views

content and excerpt not displaying

I am using get_the_title(453) and while the title displays, i am unable to display the content and the excerpt for the page with the id of 453. The following is my code get_the_title(453); ...
1
vote
2answers
346 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 ...
0
votes
3answers
51 views

how to print the content of pages inside the front end area

i'm new to wordpress and i'm trying to create a website. i need display the content of the pages when corresponding menu items are clicked. my page.php contain <?php while ( have_posts() ) : ...
2
votes
1answer
42 views

preg_replace Remove comment text in content

In post content, i insert a text like below abc acb acb acb <!--REMOVE--> text to remove <!--ENDREMOVE--> abc acb acb acb abc acb acb acb <!--REMOVE--> text to remove ...
0
votes
1answer
30 views

How accomplish modification the_content if home/start page?

How can I modify the_content if the page is the home/start page? I thought this could be done through a function in functions.php, but soon realized after some googling that the functions.php -file ...
0
votes
1answer
69 views

alternative to the_content filter

"i am using the_content filter on the category pages like cat=1" I am appending --N in the content. But due the the theme functionality it strip the content after some number of characters therefore ...