I have a custom field that has implemented on product pages that are setup correctly. I believe the previous person created their own plugin called “ACF Shortcode” and used it in conjunction with the “[[LINK href="http://www.advancedcustomfields.com/"]]Advanced Custom Fields[[/LINK]]” plugin.
The shortcode to use this particular feature is [downloadvideo][/downloadvideo]. This activates what you see here on this product page: http://ssmd.vextras.org/product/colorqube-7500-series/ to the right of the picture below the content area.
The “Watch Demo Video” activates a lightbox on the product page, you can see the functionality if you go to the above link. The “Download Brochure” is a downloadable file & the “Contact Us” button takes you to the contact page.
I would like to implement the exact same functionality on the site pages. I have enabled the rule in Advanced Custom Fields for this to be allowed. However, If I try to use the same shortcode now it gets put on the left side of the page down towards the bottom:
http://ssmd.vextras.org/solutions/network-it-solutions/
The functionality works correctly, we just need it put in the correct place. Would someone please help me make it to where it shows up on the right side like the product pages have it please?
I will be glad to provide FTP access or whatever is necessary to get fixed promptly.
Manoj Raj answers:
add the shortcode inside
<div class="twocol-one last">
....
....
</div>
add padding-bottom: 140px to the div so that it becomes
<div class="twocol-one last" style="padding-bottom: 140px;">
...
...
//Shortcode need to be used
</div>
Manoj Raj comments:
Paste the page's html code here... Or send me the ftp details...
Kyle Hungate comments:
i sent you FTP access, if you need more info. please let me know
Manoj Raj comments:
Add
<style type="text/css">
.twocol-one.last { padding-bottom: 140px; }
</style>
before start tag of [twocol_one_last]
Add the shortcode before
[/twocol_one_last]
Kyle Hungate comments:
i tried this but it had no fix for the problem.
Manoj Raj comments:
sorry... You cannot put shortcode inside a shortcode.. :) Let me find a way to correct it in css...
Kyle Hungate comments:
ok great, thank you! if you need anymore access just let me know.
Manoj Raj comments:
Hi kyle,
I have fixed the problem... The problem is with the shortcode from acfshortcode.php
For shortcodes (as well as nested shortcodes) to work fine, you must use "return"... I fixed it another way by adding
ob_start();
at the start of the function and then
return ob_get_clean();
before the end of the function...
So everything works fine now...
Kyle Hungate comments:
this looks great on the site you are working on. is this the only file that changed (acfshortcode.php)? i just downloaded to my local box and it's not functioning correctly. i can download the whole site if I need to but would rather not.
Manoj Raj comments:
Added the following style to custom.css
body.page .twocol-one.last { padding-bottom: 140px; }
Kyle Hungate comments:
thanks so much for your help!
Arnav Joy answers:
let me know clearly what to do?
Arnav Joy comments:
where you want to move it at
http://ssmd.vextras.org/solutions/network-it-solutions/
Kyle Hungate comments:
[[LINK href="http://ssmd.vextras.org/product/colorqube-7500-series/"]]http://ssmd.vextras.org/product/colorqube-7500-series/[[/LINK]] to the right of the picture below the content area
Arnav Joy comments:
can you send a mockup ?
Kyle Hungate comments:
if you click on this [[LINK href="http://ssmd.vextras.org/product/colorqube-7500-series/ "]]link[[/LINK]] it shows the correct placement. On the other link described in the brief, you'll see it is in the wrong place, [[LINK href="http://ssmd.vextras.org/solutions/network-it-solutions/"]]here[[/LINK]] it is again.
Arnav Joy comments:
you have placed the shortcode at incorrect place , place it after
<div class="twocol-one last"></div>
Kyle Hungate comments:
i tried after the shortcode "[/twocol_one_last]" which should be the same as you mentioned but it had no effect.