The the-content tag has no wiki summary.
0
votes
1answer
118 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
2answers
176 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
190 views
Fixed height of the_content()
I have page with news. I'm displaying them as a shortened text (300 chars limit), I'm removing any images using preg_replace() and everything looks fine, until someone uses line breaks in his post. ...
0
votes
3answers
2k views
Why is the_content() not displaying the content? [closed]
in my wordpress site, the_content() is not showing the content, but $post->post_content shows it, why this is happening? and how can I use the_content again?
5
votes
1answer
280 views
Content over 10,000 characters won't display with the_content()
A friend of mine just noticed that their site wasn't displaying pages that had a lot of content. For some reason they are just blank, and if he removes some content from the page it will display ...
0
votes
1answer
199 views
Problem on the_excerpt(); function <the_excerpt> <the_content>
I am working on wordpress but I have problem when I write
the_content('read more');
then on indexpage each post load full data of post but I want to
but when I am using the_excerpt();
then ...
0
votes
1answer
77 views
How to parse without changing the characters case (lower and upper) in wordpress the_content?
I made a custom parse function for my plugin and this one works great. I just have a little problem !
Here is my function :
public function ys_glossary_parse( $text )
{
// Get all the ...
0
votes
1answer
362 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', ...
1
vote
2answers
583 views
Hook midway through the_content();?
Basically, I want to add a function that executes half way through the_content();
I want to add a message/ad block whatever in the middle of all of my content without having to go in to each ...
0
votes
1answer
168 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
1k views
What is the filter hook for custom fields content?
The following code hides "the_content" output
add_filter( "the_content", "cp_module_pcontent_post_content" );
function cp_module_pcontent_post_content($content){
global $post;
...
3
votes
2answers
4k views
Get content from one page and show it on another page
So, I've been googling and reading and testing and failing.
I'm fairly new to php, so don't expect to much :)
I'm working on a new design, and I want to show content from the about page on my ...
-1
votes
2answers
525 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
0answers
2k views
How to use `the_content` filter properly? [closed]
I have a plugin that filters a particular page, and another plugin(a widget actually) that uses WP_Query to display a number of posts list. The problem is when I am on that particular page that is ...
0
votes
1answer
235 views
Wp-query causing problems with the_content();
I'm using some code provided in an answer on here to calculate "post X of Y" and display pagination icons on single.php.
It works beautifully but it's causing problems displaying the_content();
On ...
2
votes
1answer
58 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 ...
0
votes
1answer
77 views
While there is content; applying filters in blocks [closed]
So I'm trying to filter content and get it into 1400 character blocks (or there abouts, using </p> as separation points.
I can do this. My question is (hopefully) a simple PHP one (I am still ...
0
votes
2answers
1k views
How to access & display images from a post without textual content ( and vice versa) according to best wordpress practices
Looking to create a customized single.php for my posts. In one column I'd like to display all images added through the add media function (inserted into post). In the next column all other content ...
3
votes
1answer
2k views
why doesn't the_content() work in this {single-custom_post_type.php} page?
This code is from my page single-publication.php.
It outputs the relevant custom fields etc (here wrapped in template tags), but the_content() won't output the post content. I've resorted to using ...
4
votes
1answer
2k views
How to appending to the_content using add_filter with custom post type?
I have a custom post type running fine, but some of the text in the page is the same for every post, so I want to add it in using a function.
I have this set up:
function ...
0
votes
1answer
2k views
add_filter for specific pages
Is it possible to add this filter
add_filter("the_content", "magicalender_get_event_page");
But only for one specific page, for example
if($post->post_name == "magicalenderpage")
If I put the ...
0
votes
1answer
227 views
Help with add_filter('the_content', 'some_function') and multiple matches
I have a site where a user can insert slideshows into a post by entering the shortcode in the content box. He can also add videos by adding the video code in the same box. I need to separate these two ...
0
votes
3answers
484 views
how to include page content to specified length & then “read more” link
I'm pretty new to WP, so please forgive any stupid questions and/or coding!
I'm using the following code in my index.php file to include content from another page:
<div id="tm-container">
...
1
vote
1answer
378 views
Adding the_date inside <p> tags around the_content
I am trying to get it so that all of my posts display the date at the beginning of the post content, such that each post begins as:
"August 28 - Lorem ipsum dolor sit amet..."
However, if the ...
0
votes
2answers
887 views
How can I remove filters from custom post types?
I created a custom post type which I'll use as landing page for PPC. Now on that custom post type I would like to remove all the filters which are adding the social media buttons for example. I tried ...
0
votes
1answer
161 views
The_content display a different content from a previous loop
I have custom template for my homepage. If i just put the_content(); to this template, nothing else, then it will display my text i entered in my admin panel in the editor. But if i have a different ...
0
votes
1answer
260 views
WordPress appends the_content filtered text inside last paragraph tag of content (rather than after it)
Using WordPress version 3.2.1
I've noticed that when I use this filter:
add_action('the_content', 'myFunction', 0);
The content editor places the content written from "myFunction" within the last ...
0
votes
1answer
277 views
Problem in replacing the_content with the_excerpt()
I want to add read more to a blog. For that I need to replace the function the_content(). I found it in the loop file and replaced it with the_excerpt() but still posts are being shown of full length. ...
1
vote
3answers
410 views
Finding the paragraphs in content
I am trying to create two functions, one that catches the first paragraph of some content, and one that catches the rest, but I have hit a bit of a conundrum.
I have this in my single.php:
<div ...
0
votes
2answers
1k views
Get the Page Content,without generating HTML
I want to get the page content (so i can parse the tags/short-codes in it), but i don't want to output the result itself to the browser (i.e. echo=0).
I tried get_the_content(); but its the same ...
0
votes
2answers
655 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 ...
2
votes
1answer
730 views
the_excerpt(), get_the_excerpt() and the_content() all killing “the Loop”
Before I call the_excerpt(), the_permalink() displays the correct thing. Afterwards, it does not...
<?php
global $query_string;
//strip out the ...
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 ...
0
votes
1answer
690 views
How do I pull excerpts from pages?
So I enabled custom excerpts on my pages with this function.
add_action('init', 'page_excerpts');
function page_excerpts() {
add_post_type_support( 'page', 'excerpt' );
}
However, When I enter ...
-1
votes
1answer
597 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
1k 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 ...
1
vote
2answers
2k views
Content/Excerpt length control for a specific loop?
Is it possible to control the length of the content or excerpt for a specific query/loop?
I have come across the following code, but this changes the length for all excerpts, I want it focused on a ...
0
votes
2answers
949 views
Best way to strip the_content of html on the front end?
What is the best way to strip *the_content* of html tags and needless spaces on the front end? I'm building a special use theme that needs to allow users who can edit_post to make changes on the front ...
1
vote
2answers
317 views
the_content is always surrounded by paragraphs (how to disable or remove them)?
the_content is always surrounded by paragraphs, it doesn't matter if I'm in HTML view and there's nothing there. Does WordPress have a function to remove them? IS there any way?
2
votes
1answer
533 views
Add span to the first letter of post
Example post
<p>Lorem ipsum dolor sit amet</p>
<p>Morbi elementum odio vel tortor adipiscing vel tempor risus ullamcorper.</p>
What I have done :
function ...
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 ...
0
votes
2answers
382 views
How to add multiple the_content or something like that?
ok...
let me explain:
i have an example post in wp admin
and i want to add :
some text (already added via the posts editor)
some custom stuff (some taxonomy that i have already added)
some videos
...
0
votes
2answers
205 views
append_content help
i have a function in my plugin append_the_content($content) this is used to display my function inside the post, but it is coming before the post, i want to make it after the post, for this i tried ...
1
vote
2answers
743 views
How to apply content filter permanently?
I have the following temporary filter to fix a content error. We have data in our posts that have 4 digit zip codes, because the leading zero was cut when the original file was created. (For instance, ...