Tagged Questions
0
votes
0answers
28 views
Shortcode returns parts of the code twice?
I have a shortcode that lists custom type posts, like:
while ( $loop->have_posts() ) : $loop->the_post();
$output .= '<a href="#">';
$output .= '<div><img ...
0
votes
1answer
105 views
Wpautop stops working after get_the_excerpt
function pre_process_shortcode($content){
global $shortcode_tags, $shortcodes;
// Backup current registered shortcodes and clear them all out
...
1
vote
1answer
91 views
Wrap Shortcodes and wpautop
WP has me pulling my hair out at the moment (past few days trying to solve).
Trying to do some simple shortcodes which wrap around various points of an article. However wpautop() I believe is ...
2
votes
2answers
42 views
What is wrong with this code I have to make a blockquote shortcode
I have a shortcode for a blockquote [blockquote]this is the quote[/blockquote] ... this is the code.
function shortcode_shortcodetest( $atts, $content = null ) {
$return = '<div ...
0
votes
1answer
65 views
Remove some tags from shortcodes output? Trying to fix autop
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop' , 99 );
add_filter( 'the_content', 'shortcode_unautop', 100 );
Work for almost all my shortcodes excluding one that ...
0
votes
1answer
78 views
Raw output (preventing wpautop)
Using WordPress 3.5.
I'm trying to put a <form> into a Page of a WP-based site. Unfortunately, WP is "helpfully" screwing up the formatting of the form by inserting <br> and <p> ...
2
votes
1answer
138 views
wpautop() when shortcode attributes are on new lines break args array
I have a custom shortcode tag with a few attributes, and I would like to be able to display its attributes on new lines - to make it more readable to content editors:
[component
attr1 ="value1"
...
2
votes
1answer
1k views
Remove wpautop from shortcode content / remove whitespace in buffering
I am using the Mailchimp plugin ( http://wordpress.org/extend/plugins/mailchimp/ )and it has a shortcode that uses output buffering to grab it's widget's code and spit it out in the content. however, ...
1
vote
2answers
1k views
Shortcode from a widget is wrapped in unwanted <p> element
I'm using Black Studio TinyMCE Widget as a rich text editor widget. In a sidebar I inserted the TinyMCE widget with a [testimonial] shortcode and some content after it.
For example:
[testimonial]
...
1
vote
0answers
93 views
include a post unrendered into a post, then render the whole thing [closed]
With a few extra lines in my functions.php I've created a shortcode that lets me include the content of a post:
function include_content( $atts ) {
$id = (int) $atts['id'];
if ( ! $post = ...
0
votes
1answer
504 views
WordPress wpautop/shortcode generating invalid markup
I notice that theres invalid markup in my shortcode. Its ok if I disable wpautop tho
function shortcode_banner($attrs, $content = '') {
echo ' --- ' . $content . ' --- ';
$html = '<section ...
2
votes
3answers
1k views
Creating a table from shortcode avoiding wpautop for each row
I'm probably doing this all wrong, and there'll be a much simpler solution. Basically, I'm trying to build a table of tour dates that'll be editable by someone with little technical knowledge, but can ...