0
votes
1answer
48 views

Remove specific shortcode from get_the_content()

I have a variable like this: $post_content = get_the_content(); Here i want to remove some specific shortcode from the $post_content variable e.g i want to remove only this [video height="300" ...
0
votes
1answer
27 views

Have multiple loops on a page appear after/between page content

I created a function (in function.php) that allows me to put additional loops for different categories into pages: function custom_summary($atts) { extract(shortcode_atts(array( ...
1
vote
2answers
326 views

Split Content and Gallery

Is there a way to split up the post content and the gallery short code. I want to display the gallery outside my normal content no matter how or where it is placed. I can use this to get the shortcode ...
-1
votes
2answers
173 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 ...
0
votes
1answer
315 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 ...
1
vote
1answer
89 views

Single post content custom order

In my post I have a shortcode for [video] than text content. Single post page displays first entry-meta, than title, than content [video] + text. What I need is to add some condition in single.php so ...
1
vote
2answers
216 views

How to split <p> text text text </p> into array

I like to output and style in a shortcode, but the content that is get is the content of a page, so it's style like that <p>2012-12-12</p> <p>2012-6-23</p> ...
-1
votes
1answer
222 views

Shortcode append to the the_content()

Currently I have a short that embeds a div into the the_content. This works fine like thus: [shortcode param=1 param=2] This returns a message at the end of the post, but within the current article, ...
1
vote
1answer
146 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
236 views

Filters on the_content with plugins, pages and shortcode

I am using a plugin to add tweet, likes... This plugin add filters to the_content() to display this social buttons on a blog page (list of posts). I coded a shortcode which does a custom SQL query ...
0
votes
1answer
109 views

How to check if this is the nth instance of a given shortcode in a post

Suppose I have a shortcode called [item], which I have used 20 times in a particular post. Is it possible, from within the shortcode handler function, to know what the numerical index of the given ...
5
votes
1answer
725 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 ...
-1
votes
2answers
849 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 ...