Tagged Questions
0
votes
2answers
30 views
Shortcode / plugin with custom (flexible) output
Following scenario: I'm building a theme framework which I want to reuse in various themes of mine. In this framework there is a collection of many shortcodes. For exemplary illustration of my ...
1
vote
2answers
261 views
Return HTML Template Page with PHP Function
I want to create a form that I can use a shortcode to insert into my site.
It would be really nice if I could create the HTML part in a seperate file and then insert it with a PHP shortcode (to ...
2
votes
2answers
98 views
Adding short codes from a page's content on header and hiding the same from page's content
I have created a page and added the following shortcode from wp-orbit-slider
[orbit-slider category="test"]
I want the contents of
[orbit-slider category="test"]
be displayed on the header ...
-1
votes
1answer
163 views
Display HTML5 jQuery Audio Player On Front Page
I would like to display the plugin HTML5 jQuery Audio Player 'centered' on the front page of my site. The plugin comes with shortcodes for posts and pages but my front(home page) only works with the ...
0
votes
2answers
68 views
Using locate-template & shortcodes doesn't appear to work
For organisation, I'm trying to split up the functions.php file into separate files. In particular the functions for shortcodes in a separate file, with the shortcodes being defined in functions.php. ...
1
vote
1answer
111 views
How to format shortcode's HTML in external file
I need to add a shortcode in my theme and I would like to put the HTML code not in the function which creates the shortcode but in a template file in my theme directory.
Now I have
function ...
1
vote
1answer
150 views
do_shortcode() doesn't work if shortcode contained in variable, works if shortcode passed as string
I'm developing a plugin, wherein one of the features is to switch out forms on a specific page by changing the shortcode within a custom field.
within my plugin file:
function getShort()
{
...
1
vote
3answers
2k views
How to check if a shortcode exists?
I'm using do_shortcode function to add shortcode in my template. But i would like to check if that shortcode exists before display them.
I mean like this
If (shortcode_gallery_exists) {
echo ...
0
votes
1answer
2k views
how can I add a “read more” tag directly in the template?
how can I add a <--more--> tag directly in the template? I mean, the exact php code to use in a template for that shortcode. I need it for a script that makes use of that shortcode to hide content ...
0
votes
1answer
184 views
Trying to display short code content in template file with do_shortcode()
I installed the WP Issuu plugin on a site and tried to use do_shortcode() to render the shortcode in the template file. Strangely it doesn't work, although it does for the [gallery] shortcode.
I.e. ...
0
votes
2answers
320 views
Shortcode in pages or tempate files for custom post type
I am using WordPress to develop a coupon site. Merchant pages are somewhat similar to this. I am using shortcodes in these pages for Facebook Like, Google +1, Customer Review, Codes from similar ...
3
votes
1answer
698 views
Is there a way to parse shortcodes in PHP?
Many plugins don't provide a documented way to access their functions from within PHP (e.g. when building a custom theme), but only shortcodes to insert in posts.
Is there a standard way of executing ...
1
vote
1answer
739 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
2answers
742 views
Wordpress Shortcode wrap around div
Is there a way to wrap a wordpress shortcode around a div in a template file?
Here is my code:
<div id="subscription">
<?php do_shortcode('[subscribe]');?>
<p>This is subscription ...
0
votes
1answer
533 views
Stream Video Player does not work with do_shortcode()?
I have downloaded a plugin called Stream Video Player, which has a shortcode. If I put the shortcode into the content editor, it works well and it displays the video. However, if, inside a template I ...
0
votes
1answer
171 views
How to make post templates to include shortcodes only?
I used to post same shortcodes every time (shortcodes loads dynamic contents). So, I want to pack these shortcodes in a template for my posts. How can I do this?
0
votes
1answer
600 views
Using shortcode in template file
this is shortcode in template:
function shortcode_frame_left( $atts, $content = null)
{
return '<span class="frame alignleft">'. do_shortcode($content) . '</span>';
}
...