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

learn more… | top users | synonyms

0
votes
3answers
24 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 ...
0
votes
3answers
56 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() ) : ...
0
votes
3answers
570 views

How to limit the characters shown on the page - get_content

I've the below php to display the content of the post id#9 on my 'home page' of my site, so that whenever the client updates the page, it's reflected on the homepage as well - rather than having to ...
1
vote
2answers
50 views

Adding a form at the end of the content

I'm trying to add a little form after each post for a plugin I have to code, but I'm not very familiar with Wordpress. By using add_action with the_content as hook, I was able to add some text to the ...
0
votes
2answers
133 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 ...
2
votes
1answer
177 views

Proper use of the_content filtering

This is a bit difficult without posting scads of code, but my question is: What are the benefits of filtering through apply_filters('the_content', 'anything');, and given my example loop, am I ...
1
vote
1answer
99 views

Single post content custom order

In my post I have a shortcode for [video] than text content. Single post page displays first entry-meta, than title, than content [video] + text. What I need is to add some condition in single.php so ...
0
votes
1answer
11 views

the_content inside my own theme does not retain line breaks / enters like in the admin

Ok, I tried everything. the_content, get_the_content, filters, disabling plugins, Chtulu. Nothing. In my own theme, the content retains the format given in the admin editor (like bold, italic, ...
0
votes
1answer
25 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
1answer
86 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
104 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
1answer
105 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
1answer
80 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
1answer
161 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 ...
0
votes
1answer
104 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 ...
0
votes
1answer
24 views

Get Content Limit?

I know this might seem like a silly question, but I've searched online and can't find what I"m looking for. It seems like I've used the following markup before (though modified) to limit the number of ...
0
votes
1answer
91 views

filter on the_content stopped working when I updated to WP 3.6.1

I created a filter to add a pin button on to my blog posts' images, which after much playing worked. Then, a few weeks later, I updated to 3.6.1, and the filter stopped working. Did something change ...
0
votes
1answer
83 views

Read more link for blog listing page

I have a blog page setup to list posts. The "Read More" link is added by <?php global $more; $more = 0; the_content('<a href="#" class="button">Read More</a>'); ?> How do ...
0
votes
1answer
41 views

Retrieve page content and pass to PHP?

I'm new to WP but not PHP. I've a custom page that I have a PHP call to do some processing on the page content. the_content() even when enclosed in a function call <?php ...
0
votes
1answer
81 views

Confused on loading page content

I'm building my first full site into WP and I am rather confused on the process involved to load the content you enter via the WP Pages editor into the actual page. For example, I am having a static ...
-1
votes
1answer
25 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
154 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
31 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 ...
-1
votes
1answer
655 views

Add read more to the_content

Hi I have a custom post type that i've truncated on the archives pages using this: function limit_the_content($content){ $word_limit = 35; $words = explode(' ', $content); return implode(' ', ...
-2
votes
1answer
30 views

How to build or store lots of custom content

I'm setting up a new WordPress site and going forward we are going to be building a lot of custom interactions that will need to be stored within WordPress. When I say custom interactions I'm talking ...
1
vote
0answers
48 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 ...
1
vote
0answers
208 views

Can I insert the feature image inside the content, after any paragraph?

I want to display the feature image inside a post text, perhaps after the third or fourth paragraph (or any) into the_content. Searching the site I've found this code, by Amit: ...
0
votes
0answers
15 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
0answers
43 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 ...
0
votes
0answers
49 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
0answers
290 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
86 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
0answers
39 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
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
50 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
0answers
61 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
0answers
36 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
0answers
48 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
0answers
56 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 ...
0
votes
0answers
198 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
0answers
571 views

The Loop won't display page or post content

I can't get the page content to appear in my custom wordpress theme. I have an extremely simple version of The Loop, which should just display the title and the content of the current page or posts. ...