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

learn more… | top users | synonyms

0
votes
0answers
14 views

Search & Replace trailing strings

I need to filter the_content/the_excerpt and search & replace the following prepared array: $searchArray = array("foo", "bar", "foo bar", ...); My problem is the fact, that using php's ...
0
votes
3answers
21 views

the_content() not working in my Android mobile

I have got a little problem. I am working in a theme developed by someone I don´t know. I was testing the site in my cellphone and saw the_content() function does not show anything. I checked in one ...
-1
votes
1answer
18 views

Auto populate a Form

I'd like to auto populate a form / Text area with the post content ! For Example : The link below has got a link which take it to the form ! http://cozysms.com/passenger-tumne-mere-jeb-me-hath/ ...
-1
votes
1answer
23 views

After adding filter to plugin's code, post's content doesn't display

After adding a filter to plugin's code, the post-template.php is not showing the post's content. This code in plugin's index file: add_filter('the_content','post_add_me'); function post_add_me(){ ...
0
votes
1answer
20 views

Making a specific page wordpress compatable that is not index

When I first created my website I overwrote the wordpress php and essentially made the website static. Now I want to make one specific page wordpress compatable (e.g. when i make posts from the ...
0
votes
0answers
28 views

Some shortcodes breaking after AJAX call

I have a content slider that displays my Academic posts on my website. Some of my posts have shortcode in order to display an accordion menu and some columns. I am using AJAX to fetch the posts and ...
1
vote
1answer
19 views

How to modify how the_content outputs a link to an internal page

I like the default add link dialog in the wordpress editor. IT allows for easy linking to internal pages. I need to modify the output of those internal links. Right now its outputting: <a ...
0
votes
2answers
28 views

Retrive images from the_content()

I would like to get the images from the_content(), I know I could use a regex to get the images but I wanted to know if there is any other more 'wordpress way' for doing this? I have this within a ...
0
votes
1answer
40 views

Divide post content in three columns

Is it possible to split the_content() into three equal size columns? I have tried to achive that by getting this code which I found here <?php $content = get_the_content(); ...
0
votes
2answers
42 views

the_content() brings the medium size image [closed]

So I have the problem, the image I want to dispaly in post is not big enough and in my preffered size it gets bad quality, then i noticed that is not the default size image returned it's medium size ...
1
vote
1answer
47 views

Apply the_content filter, but prevent other hooked actions

I have a plugin that displays some content onto the front end of the site after applying the_content filter to the block of text. I do this for formatting and maintaining links and images etc. When I ...
3
votes
1answer
50 views

Add Incrementing ID to each paragraph in the_content

I need to loop through each paragraph in the_content and add an ID to each paragraph with an incremental value. function incrementparagraphs( $content ) { for ($i = 0; $i <count($content); ...
0
votes
1answer
33 views

Email Obfuscation: Is antispambot() Acceptable? [closed]

I've been looking into Email Obfuscation and trying to get away from obfuscation plugins when I ran across this code snippet[1]: function remove_plaintext_email($emailAddress) { $emailRegEx = ...
0
votes
1answer
37 views

How to make post content from each post display within the same div

Basically what I am trying to do is have the featured image of each of my posts display in rows of 3 showing only the featured image. When you click on one of the featured images, a div above the row ...
1
vote
1answer
62 views

Only show content before more tag

I am using the Siren Template. In homepage.php this code is used to display the portfolio content print_excerpt(200); But I to need show the content only before <!--more--> I have used this: ...
0
votes
2answers
45 views

the_content() Returns post content when I want page content

I'm very new to WordPress, but I'm currently doing work on a site built on the platform. I'm making my way through, but I've run into a bit of a problem. I'm trying to add content from the text ...
0
votes
2answers
83 views

Add shortcode within the_content()

I'm trying to add a shortcode within the text of the_content(). It is possible to add it to the beginning or the end however I cannot figure out how I would get it to show after say 200 characters. ...
0
votes
1answer
221 views

Can't get content of all (19) posts - Incomplete Chunked Encoding

I've got some documentation stored in a WordPress install for something I'm developing, and I want to have a pure html, single page version of it in addition to the regular templated version which is ...
0
votes
0answers
46 views

Where should I insert code to dynamically generate page content?

I would like to generate dynamic pages based on a third-party API. However, I'm not sure where in the WP loop to capture the request and generate the content. For example, if a user is requesting a ...
0
votes
1answer
27 views

append PHP function to the_content

I'm using the Jetpack plugin for related items and social sharing. Both of these options filter the_content and append themselves to the end of it. The problem is that I'm using custom navigation in ...
0
votes
2answers
218 views

add_filter the_content in functions.php not working

I want to add_filter for the_content in functions.php of my theme. I have added code which just display echo but it seams that my filter is not applied. function add_mod_hatom_data($content) { // ...
0
votes
1answer
25 views

Checking post content for a shortcode, but content is being returned as empty

Alright so I am trying to check for a shortcode in the post content so that I can enqueue scripts as necessary. I have this: if( plugin_has_shortcode() ) { // Load CSS ...
0
votes
2answers
112 views

the_content of template page

When I use the_content in the page-template doesn't show anything. Loop to call the page-template in the index: index.php <?php /** * Main template file * * This is the most generic template ...
0
votes
3answers
293 views

Use the_content outside the loop

I was trying to get first 100 words of the content in the header, and I use the following snippet to get the first 100 words in the loop, but is it possible to get the value outside the loop: ...
0
votes
1answer
78 views

Including Custom fields within the_content

I’m designing a site for a client and I’m using custom fields for buy links to her books. I only want buy buttons to appear for fields that contain a URL, so I’ve hooked this just below the_content: ...
0
votes
1answer
44 views

Why is get_the_excerpt returning full content

I have my home page set to a static page with a custom page template. Here I want to show posts, but just the excerpts with a "Read more" link. I want to use the more tag, which is a part of wordpress ...
-1
votes
1answer
124 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
29 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 ...
3
votes
2answers
238 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
58 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
112 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 ...
0
votes
1answer
72 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
153 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
574 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
42 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
105 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
56 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
62 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
97 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
259 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
82 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
421 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
53 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
36 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
107 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
202 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
19 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
48 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
103 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
198 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 ...