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

learn more… | top users | synonyms

0
votes
3answers
53 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
150 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
1k 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
50 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
41 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
28 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 ...
2
votes
4answers
3k views

Modify 'Read more' link adding a new class

I want to add a class to the 'Read more' link. Actually I have this: <?php the_content( 'Read more...' ); ?> Which outputs: <a href="...?p=14#more-14" class="more-link">Read ...
0
votes
1answer
67 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
187 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
20 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
38 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
85 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 ...
-1
votes
4answers
172 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
203 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
397 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
0answers
30 views

the_content() function in loop-single.php

i need to show to different layout based on featured_image size for that how on can the_content() as per that. if featured_image .size =={ the layout would A } else{ the layout would B } how does on ...
0
votes
2answers
243 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
288 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
39 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
2k 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
304 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
140 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
215 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
10k 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
126 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
65 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
66 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
128 views

Function to wrap the_content in a div

Whenever I've developing a new theme I always wrap the_content in a div, like so; <div class="entry-content"> <?php the_content();?> </div> Is there a way I can streamline ...
0
votes
1answer
88 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
37 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 ...
-2
votes
1answer
68 views

the_content to the_excerpt

How I can change the_content to the_excerpt, when there is no line with the_content words. Please help. <?php do_atomic( 'before_content' ); // origin_before_content ?> <div ...
0
votes
1answer
40 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
92 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
236 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
172 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
175 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
449 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
155 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
771 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
2k 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
975 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
94 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 ...
0
votes
2answers
1k views

Removing any and all inline styles from the_content()

For one of my current projects, I had to transfer blogposts from an old Wordpress site to my project. Things went smoothly until I've seen that all the posts were copy pasted from Word, leaving this ...
-2
votes
1answer
29 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
488 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
182 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
2k 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
353 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 ...
0
votes
2answers
887 views

Giving the_excerpt in the place of the_content?

Short and sweet — I wanted to deliver up the excerpt of a post in the place of the_content on certain pages. Naturally, if no excerpt is present one would be generated from the content. I ...
0
votes
1answer
135 views

filter the_content, custom post type, and wp_query

I thought this was going to be quick and easy, but naturally it's turning out to be more complicated. I'm writing a simple plugin that creates a custom post type "Ad", and then puts a random ad at ...