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

learn more… | top users | synonyms

0
votes
1answer
349 views

Get the_content with ajax

I'm using WordPress (WP) as the backend for an app that delivers content on a map. I've been trying for a couple of days to get my head around AJAx in WP and have found a good tutorial I'm trying to ...
-1
votes
4answers
175 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, ...
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 ...
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 ...
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 ...
0
votes
2answers
702 views

remove <p> tags from the_content

I've got a post format of Image, and I am running into an issue where the image is being wrapped by a <p> tag. I want to get rid of that tag (specifically on the single.php version) of those ...
0
votes
2answers
245 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
291 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
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 ...
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
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
129 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
237 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', ...
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 ...
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
981 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
3answers
288 views

How to show video from specific category on sidebar?

I need to get video and content from recent posts in specific category called "Video" and show it on my sidebar. The problem is when I need to have limited text content. so, when I use the_content(); ...
-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: ...
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 ...
0
votes
1answer
143 views

pre_get_posts returning unformatted page

I ran a custom loop the other day to get some twitter information. Since I was running the code in a template and that template was being called from another loop, I was able to get the template data ...
0
votes
1answer
94 views

Append data to the_content within the database (not using filter)

My site requires that people can search for terms that are included in tags and categories (towns and counties). I'm having some resource issues using the 'Search Everything' plugin, it's causing the ...
0
votes
1answer
120 views

Is it possible to remove next-post / previous-post with out creating a custom template?

I'm creating a plugin that uses a custom post type. I do not want to make a custom template for viewing the posts and discovered I can add a filter for the_content to include my custom fields, this ...
2
votes
1answer
274 views

<p> tag the_content()

I'm trying to configure my content-page.php but i'm struggling with a few 'mistakes'. <article id="post-<?php the_ID(); ?>"> <div class="page_content"> <h1><?php ...
5
votes
1answer
96 views

Add whitespace between Chinese and other letters

I want to add a space between a Chinese character and a letter or a number to make the article more readable. For example: Google与Apple展开的专利大战在2天之前结束。 Google 与 Apple 展开的专利大战在 2 天之前结束。 But ...
-1
votes
1answer
713 views

How can I add multiple content-editable blocks without a plug-in?

I'm using WP as a CMS, not a blog. I have a lot of pages (not posts) that need to have different content per page in the sidebar. The content (html, images, php) in the sidebar will be different ...
0
votes
1answer
230 views

Why does apply_filters behave different inside and outside a loop?

What I want: the array of posts returned by creating $query = new WP_Query($args); Why: to return specific content as a sort of API request in json format, ready to display on another site What I ...
1
vote
1answer
708 views

Split the content of the_content();

I want the content before the <!--more--> tag in one column and the rest in another column (single.php) only. I don't want to use plug-ins where I would need to edit all the posts to get it as ...
0
votes
2answers
148 views

Replace full content with an excerpt

My theme shows full posts on the main page and I want it to show only the summary, I tried searching for the_content tag in my theme's index.php file but it is not even there! I don't have a home.php ...
1
vote
1answer
444 views

the_content() isn't showing content, but $post->post_content does

I'm trying to echo the content of a single post by using the_content(); but I get an empty result. However when I directly address the global $post, and specifically the post_content property it does ...
6
votes
2answers
255 views

WordPress Internal @ Mentions

I'm looking for a way to link to author pages within one WordPress install simply by putting the @ symbol in front of a person's username in a post.... just like on twitter. Example: If the username ...
0
votes
1answer
72 views

Can / should a widget plugin define its own Widget Area?

Should a plugin be able to add a widget area above the_content? (Without requiring template/theme changes.) What would be the best way to do this? Doubts: widgets typically echo output to the screen; ...
0
votes
1answer
157 views

Conditional function for excluding first image from content, not working

I have the following function: function remove_images( $content ) { if( ( is_category() || is_archive() || is_home() ) && has_term( 'MyCat', 'category', $postID ) ) { $postOutput ...
0
votes
1answer
113 views

How to disable the_excerpt from one post

I have this code for the_excerpt : function get_excerpt(){ $excerpt = get_the_content(); $excerpt = preg_replace(" (\[.*?\])",'',$excerpt); $excerpt = strip_shortcodes($excerpt); ...
1
vote
2answers
47 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 ...