Tagged: josue
-
AuthorPosts
-
October 13, 2016 at 7:57 pm #698881
I have added the following code in the functions php file:
<?php
function custom_shortcode_func() {
global $post;
ob_start();
?>
ID); ?>”>Enquire about this painting
<?php$output = ob_get_clean();
return $output;
}
add_shortcode(‘my_shortcode’, ‘custom_shortcode_func’);
?>and I have added the [my-shortcode} to the excerpt but does not work see http://kibantiques.staging.wpengine.com/current-stock/ (hosted on WPengine)
can you please help.Also I have noticed on my imac when using firefox when you right click on the any text on the website it highlights in white can you also help me resolve this. with this please.
- This topic was modified 8 years, 2 months ago by condonpb.
October 16, 2016 at 10:30 am #699504Hey condonpb,
I’m not sure what functions you are calling in your code? Your shortcode looks wrong as well:
[my-shortcode}
should be[my-shortcode]
Thanks,
RikardOctober 16, 2016 at 12:36 pm #699568Rikard,
The function code I am using in function.php is as follows
function custom_shortcode_func() {
global $post;
ob_start();
?>
ID); ?>”>E-MAIL LINK LINK TEXT
<?php$output = ob_get_clean();
return $output;
}
add_shortcode(‘my_shortcode’, ‘custom_shortcode_func’);What I want to do is for you to click on a button and this will activate a link to an e-mail with the subject being title of the portfolio. So people can enquire about this item
I am trying to get this to work in the excerpt of the portfolio image on the thumbnail but does not seems to work see “First Edition” thumbnail on http://kibantiques.staging.wpengine.com/current-stock/ (hosted on WPengine) I am not sure what I am doing wrong
October 17, 2016 at 9:01 am #699831Hi,
Ok, but what does the ob_start() function do for instance? Did you try writing your function with only a simple text echo and did it work then?
Regards,
RikardOctober 17, 2016 at 10:11 am #699859Rikard,
Thanks for the quick response. The code I was give was by Josue see thread #573310. So I am unsure why it does not work.
Many thanks
Peter
October 18, 2016 at 8:38 am #700460October 19, 2016 at 1:30 pm #701267Josue,
Are you able to look at this please?
Many thanks
Petet
October 20, 2016 at 7:45 am #701692October 20, 2016 at 11:17 am #701796Josue,
Can you please help with this as it is now getting urgent.
Many ThanksPete
October 21, 2016 at 6:15 am #702163Hi Pete,
I can’t do much more than to tag him for the topic unfortunately, I know he’s very busy at the moment so please be patient.
Regards,
RikardOctober 21, 2016 at 8:17 am #702203Rikard,
I am being patient I have waited for 8 days to get this resolved. The issue I have is that I have to get this fixed so please understand that, I have a customer who needs this and is pushing me for resolution. Is there anything you can do to help or escalate the situation please.Pete
October 24, 2016 at 6:30 am #703122Hi,
We are very sorry for the late response. Could you please post the code on pastebin.com? It looks broken in the forum. And where are you adding the shortcode?
Best regards,
IsmaelOctober 24, 2016 at 9:08 am #703158Ismael,
Thanks for the response. I am using the portfolio post to place images on a page. Within each image I have a description which is place in the “Excerpt” see http://kibantiques.staging.wpengine.com/current-stock/. (hosted on WPengine) (see “First Edition” image). What I want to do is to place a button that will link to an e-mail with which puts the tItle of the portfolio post in the subject line of the e-amil so that people can send an e-mail to enquire on the product. I have used some code supplied by Josue but does not seem to work.Here is the custom code which I placed in the functions.php file
function custom_shortcode_func() {
global $post;
ob_start();
?>
ID); ?>”>E-MAIL LINK LINK TEXT
<?php$output = ob_get_clean();
return $output;
}
add_shortcode(‘my_shortcode’, ‘custom_shortcode_func’);I hace enclosed ftp and wp access details.
October 24, 2016 at 11:46 pm #703474Hey!
The WordPress access (kibantiques) provided is not working, please check.
Regards,
JosueOctober 25, 2016 at 4:33 pm #703848Josue,
Have reset password now, sorry !
October 26, 2016 at 5:40 am #704109Hi!
The shortcode is working but i think the reason you’re not seeing the link is because it’s set to a white color by this code in style.css:
.main_color a, .main_color a:hover { color: #fff; font-weight:normal; }
Cheers!
JosueOctober 26, 2016 at 10:01 am #704183Josue,
I have altered the css see but no difference see :
I still see under the “First Edition” image the [my_shortcode] showing with no link to the e-mail. What I was expecting see is a button that would link to generate an e-mail with subject being the title of the portfolio item.
This does not seem to workKindets regards
Pete
October 26, 2016 at 8:59 pm #704511Hi!
Shortcode should appear now, i’ve modified the following file:
/enfold/config-templatebuilder/avia-shortcodes/portfolio.php
You can move that modification to your child theme by doing the following:
Regarding the subject, i’ve added a parameter to the custom shortcode, so you can specifiy it:
[my_shortcode title='Something']
Regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.