Tagged Questions
0
votes
2answers
53 views
Shortcode adding p and br tags
I apologize as I realize this has been asked before and I believe the issue is with wpautop function adding closing p or br tags but every solution I've found has not worked so I'm at a loss for ...
0
votes
1answer
38 views
Multi-part form and wp_redirect()
For starters, it's a plugin (with a shortcode) or at least I would prefer it to be.
I've got two issues both related to wp_direct.
If form 1 validates I want to redirect to form 2, and continue the ...
0
votes
1answer
72 views
Shortcodes, output buffering, and WordPress functions
I have a couple of long forms which I want to output as shortcodes. Shortcode API indicates that
If the shortcode produces a lot of HTML then ob_start can be used to
capture output and convert ...
0
votes
0answers
41 views
shortcode with external file is showing twice [closed]
I have problem on short code activation in my custom plugin. The included file it's shows up twice.
class Configurator{
public function __construct()
{
add_action( ...
1
vote
1answer
92 views
Processing shortcodes in groups (separated by line breaks)?
The Project
I'm working on a plugin to resize and embed rows of images using shortcodes that will be converted into <img> tags. In most cases there will be multiple images per row, and the ...
0
votes
3answers
111 views
Multiple Parameters for a Shortcode
I am working on building some shortcodes for my blog.
I can set a single parameter for my shortcode, but not sure how to set different parameter.
For example, I can use [myshortcode myvalue] to ...
-1
votes
1answer
29 views
Developing a wordpress.com shortcode [closed]
I am looking to develop a shortcode that all wordpress.com users can use.
Should I proceed with developing a plugin? I know users on wordpress.org can use the plugin but I am confused on how to make ...
0
votes
1answer
117 views
Wrap text around shortcode
I use a shortcode handler in my plugin. The shortcode can have different (optional) parameters. And it should be possible to use for example 2 shortcodes on a static WordPress page with text before, ...
3
votes
1answer
101 views
Optimize shortcode callbacks
I created a plugin to add some shortcodes in my WordPress site. But I'm a PHP newbie, so I believe it may have some errors or ways to optimize it.
It's working fine, and apparently there are no ...
0
votes
2answers
145 views
add short code not working
I am new to wordpress, I am creating a plugin and for the short code, I am using the short code api. But when I insert this shortcode in my page, it displayes as it is, it does not display the ...
15
votes
3answers
829 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 ...
4
votes
2answers
4k views
How to add a shortcode button to the TinyMCE editor?
How to make any plugin icon in wordpress post? The code I want to insert in plugin code and will appear in post bar [wp-admin/post.php].
Like this image:
Output: If I click the icon it ...
0
votes
1answer
39 views
Create pages for authors
I have a pretty good question here. I would like to create a hidden page on my wordpress blog for each user as they are registered. I already have most of the code of what needs to be put on the page ...
1
vote
1answer
129 views
Adding option to Gallery shortcode
just starting out in WP dev, and I'm looking for any guidance I can get. What I'd like to do is use a hook or filter to add my own option to the core WP gallery shortcode. I would want it to work just ...
1
vote
1answer
59 views
Enumerating shortcode attributes in JavaScript
I'm working on a plugin which uses a shortcode to call a JQuery function, and it requires three aspects to work:
The JQuery code + its own code, to be included on the pages it will be used on
The ...
0
votes
1answer
140 views
Create Widget or Enable Shortcodes in Sidebar
I'm well aware that WordPress by default does not process shortcodes in the sidebar. My question is why.
I'm building a very small plugin that exports some content when the shortcode is present. This ...
-2
votes
2answers
303 views
Shortcode attribute “title” doesn't appear in $atts array
In a post, I have this text:
[bhours shortcode="test" title="test"]
But the "title" attribute appears to be ignored. Here's a var_dump of the $atts attribute array
array(1) {
["shortcode"]=>
...
0
votes
1answer
305 views
add_shortcode() not working inside of function
I have a custom post type bhour, with a field bh_shortcode. When a post of this type is saved, I'd like it to add a shortcode based on the post's value of bh_shortcode.
If the value of bh_shortcode ...
0
votes
2answers
215 views
PHP error with shortcode handler from a class
Currently i am using the following generic flow for adding the shortcode for a plugin.
class MyPlugin {
private $myvar;
function baztag_func() {
print $this->myvar;
...
3
votes
2answers
76 views
How do I make specific plugin functionality apply to different sites in a network?
I have a site specific plugin that I've written for the main site in my multisite network. Now I realize that the shortcodes that are in the plugin are also useful on the sub-sites, however the ...
0
votes
1answer
135 views
Content in WP Editor displayed below CPT shortcode [duplicate]
Possible Duplicate:
Shortcode always displaying at the top of the page
I've developed a couple plugins which grab CPT items through a shortcode (via WP_Query). The problem I'm having is ...
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 ...
0
votes
1answer
61 views
Loop output for custom plugin [solution found]
I am trying to update my plugins to be more user-friendly. One of the things i want to achieve is that i want my plugins output (e.g. for description-fields) to use the full functionality of all ...
0
votes
0answers
348 views
Having problem coding tiny mce button for my plugin's shortcode [closed]
i have this plugin named toggle-box which insert the shortcode [toggle Title="the title"]text[/toggle] and allows me to use this shortcode to insert toggle boxes in to wordpress blog i as tring to add ...
0
votes
1answer
376 views
post content and shortcode content displaying out of order
I've seen a couple of questions that address this problem but I can't seem to get it to work based on the answers given.
I have 2 plugins that I've written myself that output content via shortcodes. ...
1
vote
3answers
969 views
Any Short code Availble for Get Post List With Thumbnail Plugin?
Any Short code Availble for Get Post List With Thumbnail Plugin? or else how to Create Short code for this Particular plugin?
Thank u in Advance.
1
vote
3answers
483 views
stray <p> elements
I coded a wordpress shortcode for columns that basically inserts html via a shortcode. Problem is that wpautop adds stray p elements that renders the code invalid.
To test put this into your ...
1
vote
3answers
161 views
Using a Shortcode to Replace Themes Stylesheet?
Is there a function to replace the active theme's stylesheet with a different one (not just adding a new one, but actually replacing the current one)?
I'm developing a plugin, and using shortcodes ...
5
votes
2answers
259 views
How would I create a plugin for my shortcodes?
All tutorials I have found say to add your shortcodes to functions.php in your theme. I would like to break that away from my theme and put that in a plugin so I can share these shortcodes between my ...
0
votes
2answers
1k views
How to get shortcode to work inside a foreach loop called within a shortcode?
My plugin, WP Coda Slider, uses a shortcode to get_posts and add them to the slider. If one of the posts contains shortcode the shortcode in that post will not work.
$my_wpcodaslider = new ...