Tagged Questions
0
votes
2answers
55 views
Place the page title into the short code
I have created a short code called [contianer-narrow][/container-narrow] which wraps your content in a twitter bootstrap class: .container-narrow the issue is that the page title is not included. is ...
0
votes
1answer
36 views
How to use shortcode inside of shortcode in theme
I am trying to place a shortcode inside another shortcode within a page template, however the various attempts I've made seem to not do anything.
Here's how my code looks now -
<?php echo ...
0
votes
0answers
15 views
Printing shortcode as it is for demo purpose [duplicate]
I would like to show demo to my client.
So I wanna print the shortcode as it is. For example like this
[rawshortcode][gallery][/rawshortcode]
So all the shortcodes I wrap within rawshortcode ...
2
votes
2answers
41 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 ...
16
votes
3answers
832 views
Where to put my code: plugin or functions.php?
Is there an easy to understand scheme to decide what kind of code belongs to a plugin or the theme’s functions.php?
There are many cases and many debates about that topic, mostly because there are ...
0
votes
1answer
226 views
wp_nonce_field displaying twice
I have wp_nonce_field in my code but it's creating two instances to the html code for some reason, one where I'd expect it and another at the start of the entry. Is this correct or am I doing ...
3
votes
4answers
390 views
Run shortcode before filters
My users post snippets code in comments.
I created a shortcode for this :
function post_codigo($atts,$content=""){
return '<code>'.$content.'</code>';
}
...
0
votes
2answers
672 views
do_shortcode() in twentyeleven theme
I observed a difference between twentyten and twentyeleven themes. Let me explain with an example:
example.com/category/health-beauty/ finds one post containing just a shortcode.
If I use twentyten, ...
1
vote
1answer
727 views
Why does my short code get executed before other content?
I have the following text in a page. As you can see my shortcode is right at the bottom but somehow when the code runs, the out put of my shortcode is inserted at the top of the page instead of ...
0
votes
1answer
348 views
Extract all shortcode data from post into loop variables?
My client wants to have several pages in which he can edit small, separate parts of a Wordpress page. For example, there is a callout box in the upper left corner. There is also a small piece of ...
0
votes
1answer
149 views
Multiple Content Shortcodes
I was trying to create a shortcode for a multiple tabs panel. The user can set the number of tabs, the titles and the content for each. It would be something like :
[tabs number='4']
[tab ...
0
votes
1answer
75 views
Wordpress Shortcodes - Optional Styles
i'm creating some custom shortcodes for my wordpress theme. Shortcodes are by nature optional on pages/posts, but may contain css, js or other files.
My question is, how can i enqueue css styles ONLY ...
3
votes
1answer
487 views
do_shortcode() doesn't do shortcodes ;)
Imagine this basic shortcode in your functions.php file:
function div_shortcode( $atts ) {
return '<div class="div"></div>';
}
add_shortcode('div', 'div_shortcode');
So every [div] ...
0
votes
1answer
228 views
Hide/disable sidebar using shortcode?
The question is pretty simple, but it's complex in fact.
I have implemented custom sidebars for each post/page function in my blog.
It looks like:
<div id="<?php echo ...
0
votes
1answer
649 views
How to provide support for [gallery] shortcode?
I'm developing a new custom theme - and noticed that if a post contains the shortcode [gallery] it gets ignored (edit: I mean that the HTML delivered to the browser does not include [gallery], nor ...