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

learn more… | top users | synonyms

0
votes
1answer
226 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
50 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( ...
1
vote
1answer
55 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

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
63 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
132 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
76 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
3answers
94 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); ...
0
votes
1answer
209 views

Links in the_content not linked

I have alot of old posts that are being pulled with the_content() context. In the_content() there is links in the text, however none of them are hyperlinked it just shows like ...
0
votes
1answer
2k views

How do I show current post content in the header?

I'm trying to add the post content in the header but for some reason it doesn't show anything. However it does retrieve the post content. I wrote this: <div <?php post_class() ?> ...
0
votes
3answers
57 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
75 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
35 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
128 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 ...
1
vote
1answer
206 views

Removing permalink from post thumb in twentyeleven

possibly a simple thing to do but I'm not sure how it's done - I want to remove the permalink from a post thumb, in the default twentyeleven theme. Looked through content.php and the other templates ...
0
votes
1answer
25 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
48 views

how to change automatic placing of social plugins below content?

I'm wondering if it possible to change the automatic place below the_content() function; this is becuase I`m displaying custom information fields, but activating the social plugins which have not it´s ...
0
votes
1answer
96 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
4answers
438 views

Output the_title() inside the_content()

I'm sure this isn't possible but thought I'd ask. I have a testimonials section, the html of each testimonial is like so <p> the testimonal here blah, blah, blah, blah, blah, blah, ...
1
vote
1answer
400 views

Post Content, Special Characters and Filters

I added a hook to the_content. add_filter('the_content', 'edit_the_content'); function edit_the_content($content){ return $content; } Pretty simple right? However, when it output $content from ...
1
vote
3answers
706 views

Divide Post content into separate divs for every 500 characters (or any other character counts)

What is the best method for intercepting the_content of a post (for a single post page) and dividing the_content into sections of 500 characters (or any other number of characters), and then ...
0
votes
2answers
396 views

If is_single in functions.php

I want the remove wpautop filter working only on posts from my blog. Because at some pages i need the autop, and at some pages i need it to not be there. I use the following rule and it is in my ...
0
votes
0answers
726 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. ...
0
votes
1answer
57 views

Show uploaded images in full size

I have a very simple template where I am showing images. The code looks like this: <?php /* * Template Name: Portfolio */ ?> <?php get_header(); ?> <div class="row"> ...
0
votes
1answer
3k views

the_excerpt() in content.php and get_template_part() in single.php

everybody. So I'm creating a blog theme and have put the_excerpt() in content.php My index.php displays different post excerpts for the different kind of posts-formats. I have content-gallery.php, ...
1
vote
1answer
1k views

How can i display the content in plaintext

i want to display my excerpt in plaintext. How can i do this? This is my Snippet where i display the content: <?php the_content(__( 'Weiterlesen &rsaquo;','okay')); ?> How i change the ...
1
vote
1answer
272 views

Extracting gallery images in Wordpress 3.5 on index.php

I'm trying to add a slider on my front blog page for every gallery post, but I have some trouble extracting the images from the post gallery, using the following code: $post_content = ...
1
vote
1answer
355 views

Replace audio links with jplayer using the_content filter

I am attempting to use : add_filter( 'the_content', 'filter_function_name' ); To find all of the anchor tags in my post which link to a .mp3 file, and then replace them with a jplayer instance that ...
18
votes
9answers
13k views

Stop Wordpress Wrapping Images In A “P” Tag

I have searched high and low for a simple solution to this, but to no avail. Wordpress keeps on wrapping my images in p tags and because of the eccentric nature of the layout for a site I am working ...
1
vote
1answer
164 views

How to add H4 tag to the_content filter (after content)?

I would like the H4 title to display before the loop starts and only once. The problem I'm having is that H4 tag title I've created either gets stuck in the loop or it displays on the top of the ...
1
vote
1answer
94 views

Editing <?php the_content('Read more…'); ?>

Is there possible to automatically add for example image before first h2 in the_content ? Thank you
0
votes
1answer
87 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
126 views

Automatically adding a link to the next page link before '<!--nextpage-->' tag in posts?

I'm using the following snippet to automatically break a too long post into multiple pages function filter_more_with_nextpage( $content ){ $content = str_replace( '<!--more-->', ...
0
votes
1answer
42 views

Why tags are displayed bellow the content and not inside

I am developing a theme for myself and I was wondering why wordpress tags are allways displayed bellow the_content. I know that this can be done via shortcode, but I would like to know if this is for ...
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 ...
2
votes
1answer
114 views

What functions are included in apply_filter('the_content')

There is a function called apply_filter where you can use it like this: echo apply_filter('the_content', $my_content); It add formatting tags and clean up the content. Trac or docs I looked in ...
0
votes
1answer
300 views

the_content not working on one of two Multisite sites

I have a multisite with two subsites (sub-domain setup) both sites have the same theme, same plugins but the first one is in Hebrew and the Second in English. On certain templates (not all) in the ...
1
vote
2answers
201 views

Output 2 items within the Loop

I have a query that loops through <li>'s and displays the number of <li>'s I have. Is there a way I can make the loop pull 2 <li>'s at a time rather than one? // 5 list items ...
0
votes
2answers
356 views

Strip <p> from <blockquote> or something better?

Looking for some help on something that has me really contemplating not using blockquotes for the moment! I have this code: <?php $show_after_p = 1; $content = apply_filters( 'the_content', ...
1
vote
1answer
593 views

Exclude the_content (); from page password protection

I use a page template to show custom post type. All content from the custom post type should be password protected. I´d like to use the wordpress editor for some additional public information. Can I ...
0
votes
1answer
222 views

How to hide <pre> and <table> content from auto-generated excerpts?

Auto-generated excerpts just take the first x characters from the post content and cut that off at a certain point. When there is a table or pre element in that part, the excerpt looks rather useless ...
-1
votes
1answer
951 views

Get link value only from the_content()?

I have my news in posts and I am trying to display the two latest news articles (posts) on my main page. I've got that solved by getting the title using the_title() and getting a little bit of the ...
2
votes
2answers
3k views

How can i remove all html tags from get_the_content()?

i want to remove all html tags from content like <p>, <br>, <img>, <a> i tried strip_tags() also tried $content = get_the_content(); $content = apply_filters('the_content', ...
0
votes
2answers
2k views

Static page homepage not showing the_content

I must be doing something wrong here. I setup my site with a static front page using front-page.php. I created a page in the admin with a title and chose the front-page.php in the template dropdown. ...
2
votes
1answer
202 views

Display the Content of a Post with qTip2

How would/should I use qTip2 to display the the_content(); of a WordPress post? I've been trying to accomplish this for a month now. I got it working once, but it wouldn't display the content that ...
-2
votes
1answer
32 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
votes
1answer
784 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(' ', ...
1
vote
0answers
224 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: ...
2
votes
3answers
3k views

How do I add the featured image to the_content after the first paragraph?

My problem: I'm trying to create a filter that will add the featured image of a post to the_content, so that I can have the first paragraph of the_content displayed before this image. What I basicly ...
2
votes
2answers
399 views

Rendering Custom Post Types independently of the theme in use

By using a plugin called "Custom Content Type Manager", I have implemented in my blog a simple Custom Post Type called "game review" which is simple a post, plus some extra fields which represents the ...