This plugin is just want I needed for that.
]]>*definitely upgrading to the Pro version
]]>example.com/users/shauny/?profiletab=notifications
But I’d like those to be prettier, so they show as:
example.com/users/shauny/notifications/
Is that possible? I can’t seem to find any code I can add to make this work. Thanks!
]]>I use Pretty Links to manage my affiliate links on one of my website’s pages. Looking at the “Clicks” section of the Pretty Links dashboard in WordPress, I see that amazon affiliate links have been clicked approx. 400 times in the last 30 days (as per the report that I can extract with the plugin) whereas my amazon affiliate dashboard reports 14 clicks only. Obviously I can’t explain such large discrepancy so I’m not sure if I’m doing something wrong here.
Any help or guidance would be much appreciated!
Thanks
]]>//
// CREATE SHARE_URL CUSTOM FIELD - NON POSTIE
//
function create_share_url_customfield($post_id) {
global $post;
$post_url = get_permalink();
$post_url_sanitised = esc_url_raw($post_url);
if ($post->post_type == 'post'){
update_post_meta($post_id, 'share_url', $post_url_sanitised);
}
}
add_action( 'save_post', 'create_share_url_customfield' );
It works well when posting via the admin area, but posts created via Postie Plugin are not updated. For that reason, I created a Postie function:
//
// CREATE SHARE_URL CUSTOM FIELD - POSTIE
//
add_filter('postie_post_before', 'add_share_url_custom_field');
function add_share_url_custom_field($post) {
$post_url = get_permalink($post['ID']);
? ? add_post_meta($post['ID'], 'share_url', $post_url);
? ? return $post;
}
This works, but the share_url takes the form of the ‘Ugly’ permalink (https://example.com/?p=N).?
How do I ensure that the first function captures all posts, including those generated by Postie? Or, alternatively, ensure that the second Postie-specific function retrieves ‘Pretty Permalinks’?
]]>