• Resolved harvoolio

    (@harvoolio)


    Thanks for adding the way to deactivate the front-end and updating the Facebook share count.

    I wrote a PhP function to add the counters in my genesis_entry_header but the shortcode is breaking everything.

    add_action('genesis_entry_header', 'after_title_text', 12);
    
    function after_title_text() {
       if (is_single()) {
            echo '<div class="twitter-count"> [network='twitter']</div>';
       }
    }

    If I change a letter it doesn’t break the PhP and just appears as text so I think the shortcode is activating but just somehow breaking everything else.

    Thanks,
    Michael

    https://ww.wp.xz.cn/plugins/accesspress-social-share/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter harvoolio

    (@harvoolio)

    I even tried using the script in my genesis_post_meta function that creates the categories with shortcode [post_categories] but to no avail. That script looks with the code looks like:

    // Customize the entry meta in the entry footer (requires HTML5 theme support)
    add_filter( 'genesis_post_meta', 'sp_post_meta_filter', 20 );
    function sp_post_meta_filter($post_meta) {
    	$post_meta = '[post_categories] [apss-count network='twitter']';
    	return $post_meta;
    }

    Thanks.

    Plugin Author Access Keys

    (@access-keys)

    Hello there,

    Can you please send us your site link where you have implemented this so that we can debug it and can give some suggestions regarding this issue.

    You can send us your site details to our support email [email protected] in private as well.

    Thanks

    Thread Starter harvoolio

    (@harvoolio)

    Will do. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding shortcodes in php script’ is closed to new replies.