Tagged: 

Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #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, 1 month ago by condonpb.
    #699504

    Hey 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,
    Rikard

    #699568

    Rikard,

    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

    #699831

    Hi,

    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,
    Rikard

    #699859

    Rikard,

    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

    #700460

    Hi Peter,

    Ok, thanks for the feedback. I’ll tag Josue for the topic.

    Thanks,
    Rikard

    #701267

    Josue,

    Are you able to look at this please?

    Many thanks

    Petet

    #701692

    Hi,

    I’ve tagged Josue for the topic, please wait for his reply.

    Regards,
    Rikard

    #701796

    Josue,

    Can you please help with this as it is now getting urgent.
    Many Thanks

    Pete

    #702163

    Hi 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,
    Rikard

    #702203

    Rikard,
    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

    #703122

    Hi,

    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,
    Ismael

    #703158

    Ismael,
    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.

    #703474

    Hey!

    The WordPress access (kibantiques) provided is not working, please check.

    Regards,
    Josue

    #703848

    Josue,

    Have reset password now, sorry !

    #704109

    Hi!

    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!
    Josue

    #704183

    Josue,

    I have altered the css see but no difference see :

    Current Stock

    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 work

    Kindets regards

    Pete

    #704511

    Hi!

    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

Viewing 18 posts - 1 through 18 (of 18 total)
  • You must be logged in to reply to this topic.