Tagged Questions
0
votes
1answer
36 views
How to wrap a text with shortcode into php file?
I want to wrap a text with shortcode into the single.php file.
The shortcode is: [box type="note" align="aligncenter" ][/box] and
the code is:
Διοργανωτής διαγωνισμού: <?php ...
-1
votes
1answer
21 views
Creating Features List in Wordpress Post
I want to create features list in wordpress post. I know how to do in CSS but I was wondering if it can be done by using a short code or a plugin?. Like
[features_list]
Item 1
Item 2
[/features_list]
...
1
vote
1answer
32 views
Showing a different gallery in a seperate post
i am using the [multigallery] function and I was wondering if there is a way to use the function to call attachments from another post.
For example if i was writing a post about taylor swift and I ...
0
votes
1answer
46 views
Adding Image Count to Multigallery
Ok so I am using the [multigallery] function and it works fine, but one thing I want to add.
Here is the code that I am using for the multigallery in my functions.php file
function ...
0
votes
1answer
32 views
Custom short code not doing as I tell it too? [closed]
So I built a short code as follows:
if(! function_exists ('aisis_toc') ){
function aisis_toc($atts, $content = null){
extract(
shortcode_atts(
array(
...
0
votes
1answer
114 views
How do a put a form with php code into a variable or shortcode?
I'm trying to put my frontend form into a variable or a shortcode so I can wrap another shortcode around it (specifically Bainternet Post Creation Limits).
My form has PHP code in it so I'm not ...
1
vote
2answers
239 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 ...
0
votes
0answers
26 views
Remove [gallery] from the_content() and display elsewhere [duplicate]
I'm really struggling to find a way to customise the layout of a gallery on a page. Is there a way of separating this from the_content() and then displaying elsewhere in a separate div? I'm assuming I ...
0
votes
0answers
9 views
Code for shortcode [duplicate]
Possible Duplicate:
How to return loop contents
I got this code and i need to pass to shortcode. The way i tryed didnt work. Anyone help me?
Home:
<?php get_header(); ?>
<div ...
0
votes
1answer
66 views
Shortcode displaying at the top of the page [duplicate]
Possible Duplicate:
The result of a shortcode appear BEFORE page content
short code output too early
I got this shortcode for display my blog posts on my page, but the EXCERPT and the ...
2
votes
1answer
121 views
Audio tags around Mp3 URL in content
I have an audio player than uses the following syntax to display its player:
[audio src="http://somedomain.com/wp-content/uploads/2013/01/songtitle.mp3"]
The thing is, I'm pretty sure I can show the ...
0
votes
2answers
198 views
How to use 'Event Manager Shortcodes' plugin via the php code?
I am using Event Manager plugin. I want to use many of the shortcodes via php code. e.g [events_calendar]
3
votes
1answer
237 views
Shortcode to insert <!--nextpage-->
Since wordpress does not have a menu icon (aka "user friendly) way to add the command to a post or page, I'm trying to create a shortcode to do it.
However, as logic would have it, its not that ...
1
vote
1answer
36 views
Storing Options in a Shortcode
I am creating a Wordpress plugin. I want to create 1 single shortcode that changes output based on the settings changed by the user on the admin settings page.
So for starters, I have something like ...
1
vote
1answer
91 views
How to display posts by current user in a drop down
I am trying to write a shortcode that works in conjunction with Contact Form 7 to display the current user that is logged in posts.
I have been able to get it to work with regular posts using this ...
0
votes
1answer
86 views
Adding a Tag Parameter / Filter to My Shortcode
I have this plugin that displays category featured image thumbnails for each post via shortcodes.. like so,
[categorythumbnaillist 3] (3 being the category of course)
I would like it to only show ...
0
votes
1answer
255 views
AJAX function not working [closed]
One person on the site wrote a function, but I do not know why it works. This function displays a random quote. The functions implemented the ability to download new quotes via AJAX (link New Quote), ...
-1
votes
2answers
122 views
Get URL from shortcode tag
I am running a wordpress site and I need the correct regex syntax to get a URL from some shortcode that is returned inside the_content().
When I use the_content(), it will return something like ...
0
votes
1answer
329 views
PHP Widget and do_shortcode
I'm using PHP Widget which allows PHP code to execute from a widget. I tried using this code to execute do_shortcode but it's not rendering
<?php
$lat = get_field('woo_maps_lat');
$long = ...
1
vote
1answer
459 views
How to put JQuery/Ajax inside shortcode?
The purpose of this plugin is to create a list that users can modify with up or down votes. The shortcode is supposed to display the list on a page and use JQuery to fadeIn and fadeOut while updating ...
0
votes
1answer
147 views
Creating a WordPress shortcode
I'm coding my first WP shortcode and am having trouble turning my working PHP into a working shortcode. I have successfully created a basic shortcode that returns text in the spot I'd like so that ...
4
votes
1answer
346 views
Update all posts automatically when using post_meta
I recently created a new site using wordpress but I'm a rookie - everything I know is trial and error with no formal training. So please, please, please keep your answers as simple as possible. Thanks ...
1
vote
3answers
1k views
How to Insert Shortcodes into Theme?
I have content locker plugin.
For locking contents, im using this shortcode:
[wp-like-locker]
Your locked content here...
[/wp-like-locker]
and I need lock every post on my blog. How could I ...
-1
votes
1answer
310 views
How to use dynamic content in a shortcode [closed]
All,
I'm trying to create a custom template to display my single blog posts and I'm trying to use Shortcodes to create a tabbed layout. Say I have the following code to display some tabs:
<?php
...
6
votes
2answers
7k views
How to manually fix the WordPress gallery code using PHP in functions.php?
It's been talked many times that Wordpress outputs some really bad code for the built-in gallery function.
This is the core code responsible for the gallery output (in /wp-includes/media.php):
...
0
votes
1answer
245 views
Emdedding PHP in shortcode $content
I have created an enclosing shortcode that is styled to be a button with the intention of putting content in it. I am echoing this shortcode inside a theme file and want the content to link to a ...
3
votes
1answer
237 views
Adding Custom Fields for Img in Posts
I'm wondering how I'd be able to set a custom field within my Wordpress posts. I want to have a field available to add an image via the Post dashboard - that has a max width & max height set, I ...
1
vote
2answers
97 views
How to return multiples lines in a shortcode?
I found this example of a shortcode on the Internet:
function project_shortcode( $atts, $content = null ) {
extract( shortcode_atts( array(
'class' => '',
'id' => '',
...
0
votes
2answers
126 views
Unable to process php via shortcode
I've been searching around for a fix to this and while I definitely have a much better understanding of my issue (thanks to similar queries posted by others) I am still not sure of the solution.
I am ...
0
votes
1answer
185 views
Problem using explode inside add_shortcode() callback funciton [closed]
Explode not working as i expect inside add_shortcode() callback funciton.
Here is the scenario:
My implemented sortcode is like this:
[table]
name1 = value1;
name2 = value2;
name3 = ...
3
votes
1answer
689 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 ...
0
votes
1answer
465 views
Can 'Custom Field' data be inserted into this Short Code?
I have created a custom page template. In the template, I use a shortcode for JJ NextGen JQuery Slider. I would like the page to have a 'custom field' called 'Image Gallery' with a value that derives ...
0
votes
1answer
375 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. ...
0
votes
1answer
92 views
Shortcode returns values in the wrong order
I have a shortcode function that returns:
return '<ul class="list-pages">'. wp_list_pages( $args ) .'</ul>';
Of course it returns:
{pages}
<ul class="list-pages"></ul>
...
-1
votes
1answer
562 views
Calling function from within functions.php returns unwanted value
I am trying to customize the output of the [gallery] shortcode to include comment count by this plugin: Facebook Comments for WordPress plugin
I found a function by Zack Austin (shown below) that ...
0
votes
1answer
280 views
Help with Wordpress function inside a shortcode
I'm trying to spice up a theme of mine with some shortcode buttons but I'm having quite a bit of trouble when trying to call the author's name within the button itself. I tried simply including
...
0
votes
1answer
996 views
How do I hardcode a WordPress shortcode into my theme?
I am using WooTheme's Canvas theme and would like to "hardcode" in the [post_comments] shortcode into my theme. [post_comments] displays a comment link with comment count (ie Comments 10) in my post. ...
1
vote
1answer
353 views
Create own Wordpress shortcode gallery
How I can handle this shortcode:
[my_gallery]
img01.jpg
img02.jpg
img03.jpg
img04.jpg
[/my_gallery]
I can't understand how to write a function, to handle image files name.
2
votes
1answer
189 views
Browser title script ignoring is_page /else conditional [closed]
I've used this code to stipulate different separators for different pages in my clients site:
<title>
<?php if(is_page('Portfolio')){
wp_title( 'of', true, 'right' );
echo ...
0
votes
1answer
501 views
Shortcode content filter?
I'm looking for something, but don't exactly know what.
I have a shortcode, let's call it [shortcode].
Users will input HTML tags inside, mostly images, but also links, images in links, etc., for ...

