Tagged Questions
0
votes
1answer
36 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
66 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
45 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
80 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
86 views
Loop after page content
I just upgraded to 3.4.2 from 2.9 (i know, i know, but if it ain't broke...) I have page templates that are (or at least were) set up to display the page content first, then start a loop of posts, ...
1
vote
1answer
74 views
Function to show only first instance of shortcode
I need to add a function to my theme to remove additional instances of a shortcode in a post.
First off I wonder if i'm approaching this wrong, but I have a theme that is drastically reformats the ...
0
votes
1answer
363 views
Add custom PHP and HTML to the_content()
I am developing a wordpress website on the thematic framework.
In my child theme i have made a full width page template called resources.php
In this page template i have written custom php code which ...
0
votes
1answer
90 views
In Loop Output Place Custom Field Content In Between Paragraphs
I'd like to place the contents of a custom field or variable in between the second and third paragraphs in the loop on a page template.
Is there a way to do this?
So for example, on a client's ...
1
vote
2answers
130 views
Combining the_excerpt with the_content
I have some html:
<div class="container">
<p class="accent">The first paragraph...</p>
<p>The rest of the article...</p>
</div>
I'd like to put "the_excerpt" in ...
0
votes
1answer
229 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
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
279 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. ...
2
votes
1answer
732 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 ...
0
votes
1answer
700 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
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 ...