• Resolved neotrope

    (@neotrope)


    Hi
    was curious if we can use the URL format as something like

    {POST_TITLE} https://mysite.com/?p={POST_ID}

    Would that be supported? Would we need to escape the ‘/’ or anything?

    Thanks !

    • This topic was modified 5 years, 10 months ago by neotrope.
Viewing 4 replies - 1 through 4 (of 4 total)
  • We are using WordPress function get_permalink() to get the post link, this will return the post url in the format you set at the wordpress permalink settings.
    If you want to use the format https://mysite.com/?p={POST_ID} then you can select the Plain format for permalink at https://mysite.com/wp-admin/options-permalink.php

    If you are using {POST_TITLE} {PERMALINK} as message format for tweeting,then you should add an image otherwise the link may not appear , Twitter fetches the site content and the tweet will appear like {POST_TITLE} and link preview.
    Please let us know,if you have any questions.
    Thank you.

    Thread Starter neotrope

    (@neotrope)

    So, the {POST_ID} hook does not drop in the ‘ID’ for the post ?

    You do understand that all posts on WordPress are accessible by their built-in shortcode without having to change the permalinks, which nobody would logically do.

    I was basically asking if the hook you provide for story ID actually dropped in the actual ID, and if the usage of ‘https://mysite.com/?p=’ in the element box would break anything in PHP if used that way without any escapes such as
    https:\/\/mysite.com\/?p=

    With WordPress, all posts are still accessible via
    https://mysite.com/?p=123456
    regardless of whether the htaccess redirect format is setup to be
    https://mysite.com/name-of-post-here

    Did that help better understand my query?

    Trying not to crash PHP to test out using the inbuilt shortcode URLs of WP vs the long versions.

    If you add the message format like {POST_TITLE} https://mysite.com/?p={POST_ID},
    WP Twitter Auto Publish will replace the {POST_ID} in the link with the actual post id.

    Thread Starter neotrope

    (@neotrope)

    Hi, thanks for the replies. I went ahead and tested, and did what I needed. Thanks for the great plugin, btw. Was testing replacing the pokey old Feedburner feed, and this is doing the job. ??

    For anybody else reading this – the answer to my question was ” YES ” …

    You can see example here:
    https://twitter.com/NeotropeNews/status/1092559296141889536

    where the ID was dropped in to use as URL shortener:

    Restaurant Industry Results and Outlook Survey for 2019: Over 700 Independent Operators Share Results - massachusettsnewswire.com/?p=39129 .....

    • This reply was modified 5 years, 9 months ago by neotrope.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Using the POST_ID for URL’ is closed to new replies.