How can we help?

If you are looking for support for our PokaTheme, this is the place!

Home Forums PokaTheme support Social Share problem

Viewing 5 posts - 21 through 25 (of 25 total)
  • Author
    Posts
  • #18135
    admin
    Keymaster

    Hi Ricardo. Please add the following code to helpers.php

    if (!function_exists(‘poka_social_share’)) {
    function poka_social_share()
    {
    global $post;
    $permalink = esc_url(get_permalink($post->ID));
    $title = get_the_title();
    ?>

    <ul class="social-icons">
    <li>
    <a class="icon poka-facebook icon-btn icon-btn–gray jsSocialShareIcon" href="http://www.facebook.com/sharer.php?u=&lt;?php echo esc_url($permalink); ?>" title="<?php esc_html_e(‘Share on Facebook’, ‘poka’); ?>" data-width="520" data-height="350" rel="nofollow"></a>
    </li>
    <li>
    <?php
    $title_decoded = html_entity_decode($title, ENT_QUOTES, ‘UTF-8’);
    $title_encoded_for_twitter = rawurlencode($title_decoded);
    ?>
    <a class="icon poka-twitter icon-btn icon-btn–gray jsSocialShareIcon" href="http://twitter.com/share?text=&lt;?php echo esc_attr($title_encoded_for_twitter); ?>&url=<?php echo esc_url($permalink); ?>" data-width="520" data-height="350" title="<?php esc_html_e(‘Share on Twitter’, ‘poka’); ?>" rel="nofollow">
    </a>
    </li>
    <li>
    <a class="icon poka-envelope icon-btn icon-btn–gray" href="mailto:?subject=<?php echo rawurlencode(__(‘I wanted you to see this site’, ‘poka’)); ?>&body=<?php echo rawurlencode(__(‘Check out this site:’, ‘poka’)); ?>&nbsp;<?php echo esc_url($permalink); ?>" data-width="520" data-height="350" title="<?php esc_html_e(‘Share by email’, ‘poka’); ?>" rel="nofollow">
    </a>
    </li>
    </ul>

    <?php
    }
    }

    #18136
    Ricardo Nuno
    Participant

    Get this error on page website

    “A critical error has occurred on this site. Please check the site administration email for instructions.”

    #18144
    admin
    Keymaster

    Hi Ricardo,

    You should add the above code to your child theme’s functions.php, not to the helpers.php of the parent theme. You shouldn’t change the parent theme files at all.

    Apologies for the misunderstanding. Let us know if it’s working as expected now.

    Thank you!

    #18147
    Ricardo Nuno
    Participant

    Hi,

    Well, I can’t make it work like that, because I use a different name for the main theme folder, and I think the child theme doesn’t work because of that, even with changes applied to it.

    I suggest you do the tests according to the title and examples I have already given, if you see that ta fixed, please include the fix in the next update.

    Thank you

    #18150
    admin
    Keymaster

    Hi Ricardo,

    Sure we’ll include the update in the next theme release!

Viewing 5 posts - 21 through 25 (of 25 total)
  • You must be logged in to reply to this topic.