Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
BB-Code-like mechanism by which strings enclosed in square brackets can serve as shorthand for longer and more complicated strings. These strings are processed by callback handlers, usually on page load, which replace the bracket enclosed string with the output from the callback handler.
0
votes
0
answers
36
views
Simulate shortcodes with javascript
I found out that [shortcode] are not showed in the post excerpts, so I was thinking about a workaround with javascript: keep the notation [shortcode], deleting its definition, and finally add a javascript … which replace it with the html code of the original shortcode definition. …
1
vote
1
answer
109
views
Autogenerate shortcodes from an array of strings
I have to create a lot of shortcodes of the form
function foobar_sc( $atts ) {
remove_filter( 'the_content', 'wpautop' );
$content = apply_filters( 'the_content', '<div class=con>[block slug= …
0
votes
Can I use a Shortcode output as an HTML attribute value?
This is not exactly what you are asking but maybe can help to find the solution
/* this simulates your shortcode [sola_testimonials_count type='all'] */
function num_sc( $atts ) { return '5,205'; }
add_shortcode …
0
votes
1
answer
344
views
How to use do_shortcode_tag to modify the output of a shortcode?
A simple shortcode is
add_shortcode( 'test', 'test_sc' );
function test_sc( $atts ){ return "$\frac{15}{5} = 3$"; }
By writing $\frac{15}{5} = 3$ in a page this gets displayed
By writing [test] in …
0
votes
0
answers
35
views
Insert HTML in content property and render it using shortcodes
Is it possibile to define a shortcode, such as
function test_sc( $atts, $content = null ) {
$a = shortcode_atts( array(
'note' => '',
), $atts );
/* do something to render the …
1
vote
1
answer
3k
views
Prevent shortcode from being wrapped in <p> tags
$shortcode => '[' .$shortcode,
'<p>[/' . $shortcode => '[/' . … $shortcode,
$shortcode . ']</p>' => $shortcode . ']',
$shortcode . ']<br />' => $shortcode . ']'
);
$content = strtr( $content, $array );
}
return $content …