Plugin Author
Vova
(@gn_themes)
You need to create shortcode which returns post title
function my_shortcode_title( ){
return get_the_title();
}
add_shortcode( 'post_title', 'my_shortcode_title' );
and then use this shortcode inside of button
[button] Download [post_title] [/button]
Thanks for help
I have tried the code and button was drawn but it contains the title of "Download [post_title]" I think the variable value is not replaced with the proper value or the syntax has been thrown with no value.
Thanks in advance.
Here is the screenshot link of the button
http://www.anony.ws/i/2013/10/17/oI2CX.jpg
Plugin Author
Vova
(@gn_themes)
I’ve just uploaded new fixed version to the GitHub. You can get this file and replace your original file.
Plugin Author
Vova
(@gn_themes)
These changes will be included in next version. So you will be able to update plugin as before.
Fantastic Plugin.Awesome support.Worked 100%
Vladimir:
Really sorry for the disturb.But everything worked except the button link has been tarted to the base url than the targeted page.I have used the following code in the single page
E.g
<?php echo do_shortcode( ‘[button url=”http://www.sitename.com/product-page”%5D Download [post_title] Software[/button]’ ); ?>
By clicking the link above in the button it lands to the base URL http://www.sitename.com not on http://www.sitename.com/product-page.
What i made wrong.
Plugin Author
Vova
(@gn_themes)
Try this code
<?php
echo Shortcodes_Ultimate_Shortcodes::button( array( 'url' => 'http://www.sitename.com/product-page' ), 'Download ' . get_the_title() . ' Software' );
?>
Ya.This one worked perfect.I hope this way i can add more variables to this button (size,color).If you have time,please share the code (Example with variables usage)I am still beginner to this techie PHP stuff.Thanks.
Plugin Author
Vova
(@gn_themes)
This is just an array. Example:
<?php
$args = array(
'url' => 'http://www.sitename.com/product-page',
'color' => '#fff',
'background' => '#fc0',
);
$text = 'Download ' . get_the_title() . ' Software';
echo Shortcodes_Ultimate_Shortcodes::button( $args, $text );
?>
Suggestion worked,query resolved.Its time to thank Vladimir(Plugin Author) and close this thread.
Note:
To appreciate the work of the author, i have decided to link back to the author website from one of my blog.