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

learn more… | top users | synonyms

0
votes
1answer
29 views

This Wordpress plugin isn't creating links correctly

To get my PHP and Wordpress skills, I've been trying to code a small plugin a day. Today's project was to create a plugin that searched over every word in my posts, checked if ...
-3
votes
1answer
814 views

How I can show short content with short tag

I am using wordpress I want to show ** short content with limit ** of wordsfor every post on home page for this I am using this code functions.php function abc_the_content($num_words) { ...
0
votes
2answers
328 views

Extract a link in the_content()

I'm trying to improve a bookmarks manager/theme I've built (http://bookmarkie.waterstreetgm.org). Right now, each post is simply a link: <a href="http://tumblr.everlane.com/page/4">Everlane ...
3
votes
3answers
1k views

How to wrap an element around an iframe or embed in content automatically?

Id like to have wordpress automatically wrap a div around any iframe or embed when they are used in the_content...how might this be achieved?
0
votes
1answer
943 views

How to limit post content and remove image caption from it

I am using this function to limit the content in my themes. But the problem is whenever I call the function, it also displays the image caption. I want to remove the image caption when calling ...
0
votes
1answer
180 views

how can I get seperate the HTML in the_content(); output?

I want to be able to seperate the first image form the post into a <div> tag and link it to the post page and be able to add html around the post text elements seprately. Any help is greatly ...
2
votes
1answer
120 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
151 views

Loop after page content

I just upgraded to 3.4.2 from 2.9 (i know, i know, but if it ain't broke...) I have page templates that are (or at least were) set up to display the page content first, then start a loop of posts, ...
1
vote
1answer
395 views

Nested calls the the_content filter

I'm writing a plugin that adds some custom content near the end of a post (or page). So I've added a filter for 'the_content', and the plugin adds its content there. Mostly, it works. However, some ...
1
vote
1answer
93 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 ...
-1
votes
1answer
93 views

Scroll over to get definition

I need to have content appear when I scroll over certain words or groups of words. Eg. If I scroll over the word pastor. I should see a definition of Pastor appear next to the word.I would like to ...
2
votes
2answers
263 views

Testing for post title in 'if/else' statement returns no content

I'm testing for a certain fixed post on an about page, I guessed that the best way is to test for post title (?). Here's my code, what's going wrong? <?php if (is_page()) { ...
0
votes
1answer
56 views

Post Format Link Validation Error

For link post formats to appear in my archive.php I'm using the following code: <a href="<?php echo wp_trim_words( get_the_content(), 100 ); ?>"> <?php the_content(); ?> </a> ...
1
vote
2answers
243 views

How to split <p> text text text </p> into array

I like to output and style in a shortcode, but the content that is get is the content of a page, so it's style like that <p>2012-12-12</p> <p>2012-6-23</p> ...
0
votes
1answer
68 views

Stop WordPress from showing images on non post pages

With regards to how WP displays "preview" text on the home page, category page etc for each post, how do you stop it from including images in this section. I'm not talking about the featured image ...
1
vote
1answer
192 views

How to place HTML tags in content from the_content()?

Firstly, I am new to Wordpress so thank you for your patience. I have a list of posts (with excerpts) being displayed in the page using Short Tags. The output is fine , However, I wish to add and ...
0
votes
1answer
79 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
251 views

Shortcode append to the the_content()

Currently I have a short that embeds a div into the the_content. This works fine like thus: [shortcode param=1 param=2] This returns a message at the end of the post, but within the current article, ...
1
vote
1answer
175 views

Function to show only first instance of shortcode

I need to add a function to my theme to remove additional instances of a shortcode in a post. First off I wonder if i'm approaching this wrong, but I have a theme that is drastically reformats the ...
0
votes
1answer
255 views

Filters on the_content with plugins, pages and shortcode

I am using a plugin to add tweet, likes... This plugin add filters to the_content() to display this social buttons on a blog page (list of posts). I coded a shortcode which does a custom SQL query ...
0
votes
1answer
95 views

Query does not return content

Working on updating an old WP site developed for WordPress 2.0 and have a post (page) query that does not return the "post_content" data. Here is said query: $the_query = ...
0
votes
1answer
682 views

Add custom PHP and HTML to the_content()

I am developing a wordpress website on the thematic framework. In my child theme i have made a full width page template called resources.php In this page template i have written custom php code which ...
-1
votes
2answers
951 views

shortcode causing the_content() to return blank?

I have a shortcode that just retrieves some info from the options table in the database. For whatever reason, when the content reaches a certain character limit the_content() to return blank? The ...
0
votes
1answer
122 views

How to check if this is the nth instance of a given shortcode in a post

Suppose I have a shortcode called [item], which I have used 20 times in a particular post. Is it possible, from within the shortcode handler function, to know what the numerical index of the given ...
0
votes
1answer
130 views

the_content returns blank when adding SEO details

I am using the Thesis theme and wanted a custom style for my pages. So I created a custom template while using thesis hooks and functions where applicable. I am doing this with a solution similar to ...
0
votes
1answer
327 views

Paginate the_content automatically? [duplicate]

Possible Duplicate: Automatically create pages in a post based on number of words Can Wordpress automatically paginate large amounts of content? A user wants to enter a document that is ...
0
votes
1answer
196 views

Adding if statement into the_content()

I've created my own page template where I have a list of posts coming in directly below the content as so: <?php the_content(); ?> <?php query_posts('category_name=vacancies'); ...
1
vote
2answers
164 views

Accessing Media/Files outside the_content

I'm building a site and each post has a PDF file attachment. Is there a way I can access that file outside the_content() on a single post page? I'd like to put the file attachment in a sidebar and not ...
0
votes
2answers
251 views

Inserted double quote when prepending to the_content

I am trying to write a plug-in to display the RunKeeper Healthy button on single posts, but my output has an extra space and double-quote when I look at the page source. What I'm trying to do with the ...
0
votes
1answer
732 views

post->post_content filter

I'm trying to determine if the REGEX I'm using is incorrect -- or if I'm missing something basic here. The following: add_filter('the_content','wpdu_image_replace'); function ...
0
votes
1answer
385 views

Force the_content() to show full post in RSS feed

I'm making a custom RSS feed where I want the full article to display. The problem is that when I use the_content() to output the article, it will only show the excerpt if there is a 'more' tag in ...
1
vote
1answer
669 views

add data-attribute to all images inside the_content()

I wonder if it's possible to add a filter to all images inside the_content() to create the following image pattern for all images … <img class="digest" src="smallest-file.jpg" ...
2
votes
1answer
494 views

Add $more_link_text parameter to the_excerpt()

this filter is on the Wordpress Codex …  add_filter('excerpt_more', 'new_excerpt_more'); function new_excerpt_more($more) { global $post; return '<a class="moretag" href="'. ...
1
vote
1answer
2k views

How to correctly limit the content and strip HTML?

I have been using this code for a long time : $temp_arr_content = explode( " ", substr( strip_tags( get_the_content() ), 0, 720 ) ); ...
2
votes
1answer
70 views

Template Page Content Made Searchable

I'm migrating a client site over to a WordPress CMS. I made templates for each of the pages that would have static content: about us, facility, FAQs, etc. The problem is that this content seems to be ...
1
vote
2answers
420 views

Filter the_content() in the Quote Post Format to Display Quotes

I'm customizing a theme for a client and I want to leverage post formats. On the quote post format I would like the_content(); to be wrapped in a two spans that contains quotation marks that I ...
1
vote
1answer
2k views

Add Class to Specific Paragraph of the_content()

Let's say I want to give the first paragraph bold text by adding a body class to the first paragraph. Is there a way to filter the output of the_content(); or any other paragraph? First paragraph? ...
0
votes
1answer
395 views

custom field output after the_content

What I want to do is output a custom field content (which is a button with a dynamic link that's being inserted in the value of the custom field of each posts) right after the_content and before the ...
1
vote
1answer
712 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
1answer
800 views

the_content() is not displaying content, why? [closed]

I have a custom theme and have built a blog page where I'd like to utilize "the loop", but get_content() is not working. Instead of displaying page content, it displays code from a template. I don't ...
2
votes
1answer
306 views

Wordpress Wysiwyg Content not being displayed

My Wordpress website really isn't working to how I want?! It was working fine, with nothing being touched, Then lately I find every-page is displaying the same content on each page. Not the ...
0
votes
1answer
108 views

In Loop Output Place Custom Field Content In Between Paragraphs

I'd like to place the contents of a custom field or variable in between the second and third paragraphs in the loop on a page template. Is there a way to do this? So for example, on a client's ...
2
votes
2answers
2k 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
415 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 ...
3
votes
1answer
491 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 ...
0
votes
2answers
755 views

embed the_content

Im trying to wrap video urls and embed code in a classed div so that I can style it. The vid code is being pulled from the custom meta value I've setup for the video post type. Nothing I've been able ...
2
votes
1answer
114 views

Sanitising post content for use in an email

I'm sending the content of a custom post type in a plaintext email (it's to send competition entries to a panel of judges), so I need to make sure that $post->post_content is correctly sanitised ...
1
vote
2answers
187 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
162 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
561 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', ...