Tag Info

New answers tagged


I think you need to do the add_action( 'wp_head', 'add_meta_tags' , 10 ); in your functions.php instead of the template to get the function called. And it adds it then everywhere where you have wp_head(). So if you want to only call it content-share.php you need some conditioning logic like if (is_page_template('page-templates/content-share.php')) { ...


the_permalink() function doesn't return the post permalik, it prints the permalink. To assing the permalink value to $url variable you need to user get_the_permalink() instead: $url = get_the_permalink();


I've actually made a plugin called Social Metrics Tracker which does exactly what you are trying to achieve. Please also feel free to read the source code on GitHub. To answer your questions: You are right that running an hourly cron task to update all of the posts would cause a problem with even just 200 articles because the server would make one GET ...


Facebook sharer no longer accepts custom parameters. Long story short, use a plugin like WordPress SEO to automatically add the open graph data for you.


Im no expert on this but here goes: After reading some code and doing a global search of the filter, its not a filter at all, the only time that filter is called is in a do_action // HOOKABLE: This action runs just before logging the user in (before creating a WP cookie) do_action( "wsl_hook_process_login_before_wp_set_auth_cookie", $user_id, ...

Top 50 recent answers are included