The the-content tag has no wiki summary.
0
votes
1answer
124 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 ...
0
votes
1answer
19 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
29 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
33 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 ...
0
votes
2answers
228 views
Include custom fields into the content of a regular page
Here's my setup:
Parent "Gallery" page: _regular page, not custom type or anything _
Several "Project" child pages (could be as few as 1, unlimited
number): also normal pages
Child pages will ...
1
vote
2answers
65 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
43 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
145 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 ...
1
vote
1answer
249 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
44 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
71 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(); ...
-1
votes
0answers
26 views
All my post content seems to have disappeared from my site :S
Basically what it says above - http://www.welookwelike.com/design-services/ - none of my post content is appearing... at all!
I've only just noticed it today. I've deactivated all plugins and that ...
-1
votes
1answer
598 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 ...
1
vote
2answers
52 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
56 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
32 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
136 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 ...
0
votes
0answers
33 views
custom siderbar with custom cat post widget does not include content
I am trying to make a template with a left sidebar. In that sidebar I want to insert custom cat post query using a text widget so I can format it correctly the way I want. However when I do The ...
-2
votes
1answer
21 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
71 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(' ', ...
13
votes
9answers
7k 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
0answers
96 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:
...
1
vote
3answers
992 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
287 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
657 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
78 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
55 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
61 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 ...
0
votes
1answer
36 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 ...
3
votes
1answer
431 views
Using preg_replace to separate gallery from the_content?
In a Wordpress theme, I need to separate a gallery from the rest of the_content. I think one could do that with get_the_content and preg_replace but it's a little beyond my skill level how to actually ...
0
votes
1answer
125 views
add_filter to the_content after apply_filters
I have a shortcode that outputs null ("").
What I'm trying to accomplish is to output a default message if the shortcode outputs null. I don't want to extend my shortcode because there may be ...
2
votes
1answer
120 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 ...
1
vote
1answer
275 views
Replacing with(out) regex link to attachment by links to files
I tried to do it myself but I have really hard time with Regex (regex is hell. I just don"t understand).
Anyway, I think this would be usefull to some people. The context is that we use a plugin to ...
5
votes
1answer
66 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 ...
0
votes
2answers
148 views
how to place a link on the first post only using a plugin
i want to add a link to the first post of every WP blog that i have. For example this simple function adds the link to every post.
function add_link($link){
$link .= '<a ...
-1
votes
2answers
122 views
Get URL from shortcode tag
I am running a wordpress site and I need the correct regex syntax to get a URL from some shortcode that is returned inside the_content().
When I use the_content(), it will return something like ...
-1
votes
1answer
218 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
77 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 ...
2
votes
2answers
734 views
How to to stop html editor from addig <p> tags to shortcodes, images, etc
I know this this is covered as individual topics but What I am looking for is a single function that stops <p> tags from being wrapped around via the Wordpress editor to shortcodes and images ...
0
votes
3answers
282 views
How to output only the post content
How can I output ONLY the post content (ie the text entered into the wysiwyg) and nothing else? i just need this for the posts in a specific category, so if i could call like say,
<?php ...
0
votes
1answer
172 views
Plugin scans for images in post_content, how about “featured image”?
I use WordPress SEO by Yoast, especially for the Google News sitemap feature.
My theme is coded in such a way that the main image of a post is also the featured image of the point (i.e. the same ...
1
vote
2answers
5k views
Adding a div class or id inside the_content()
I'm trying to create an advertisement block to be placed on a single post (single.php) such that the div class or id is left aligned and the post content wrapped around it. I checked the single.php ...
1
vote
1answer
267 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
85 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
188 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 ...
0
votes
1answer
60 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
54 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 ...
2
votes
2answers
1k views
limit the words in the post content and add read more link
As you can see into the code, the routine is to display the post which has an id of 266. Now all I want is to limit the words displayed in the post content of that post. Let's say, I want to limit the ...
0
votes
1answer
68 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
34 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 ...

