How did I workaround this?
Step1: From my WordPress Permalink Settings, I selected Custom Structure and added /%post_id%/
This means my results will be in this format:
<myurl>/<postID>
Step2: To make it easier for me instead of writing a regex query I used a a Split command like this:
var postlink = entry.link;
var id = postlink.split(/\//)[3];
(///)[3] would simply split the URL by the number of slashes and take only that 3rd bit which is where my postID is.
I hope this comes in handy for others in my position.
Related Posts:
- RSS feed with specific keyword
- why ignore_sticky_posts in sticky post query
- get custom post type by tag
- Does tax_query really beats meta_query in all situations?
- WP_Query by post ID doesn’t work if post is in custom post_status
- Using WP_Query To Get Posts Randomly From today
- How to know which one is the main query?
- WP_Query can’t exclude more than 1 author?
- Finding all results from database within 500 miles of the given latitude and longitude [closed]
- How to order posts by custom WP role?
- posts2posts query using connected_items array issue [closed]
- WP Query and order by particular specified IDs
- Get the post permalink within the loop but without additional DB query
- Create Posts using Import>RSS/WXR/XML and pass values to Custom Fields
- Display revision if post status is pending
- Meta query field order together with post_date order causes posts without the meta field to be unordered
- How To Remove/hide some specific categories from two different categories widget from sidebar
- WP Query search for attachments and their exact title
- How to add another parameters to WP_Query?
- Display link to taxonomy archive only if it has posts with certain custom field values
- How to display posts month by month?
- Display posts with date wordpress default
- Extending woocommerce admin product search
- Pagination is broken and I need help fixing it
- Query total number of posts
- Category attribute not working in custom shortcode
- How to display a posts 1 year ago with custom WP_Query loop?
- Check on which page specific result exist
- WC displaying products from category
- Loop returning only 1 result
- Fetch posts that match term slug first two letters (wp query)
- pagination with numbers for WP_User_Query
- How does one perform a sub query with different post types
- Query with search and subscribers only output
- Stuck in the query loop
- Query Page Content From Theme Options?
- Filter wordpress post categories with jquery/ajax and pagination?
- Taxonomy order exception for specific term
- next_post_link / previous_post_link not working with WP_Query
- How to Create a Random List of Child Pages
- How to display the featured image for each post?
- Is there a way to make this kind of loop shorter and nicer?
- How to make posts unqueryable/unpublish posts where ACF relationship field is an unpublished post? [closed]
- WP Query ordering on a meta field for posts with a date in the future not ordering by datetime
- Merge 2 custom post type posts and taxonomy terms and sort ascending
- Pagination on template page for custom query redirecting to index.php
- how to get Nearby zipcode
- Exclude authors IDs from WP_Query
- Get all posts with empty meta_value
- Count identical post titles
- get_page meta query not working, maybe a bug?
- Exec wp query in slow motion to avoid memory error?
- Query by date from custom field
- Remove post type filter added by the plugin in the final query
- How to get more data of a post by wp_query
- What is wrong with my WP_Query Arguments?
- Query of all pages, including children, ordered by meta key
- WP_User_Query orderby meta_val_num
- Query Taxonomy By Page Title
- specific post is not excluded from the loop
- Unable to paginate a custom page query
- How to change the default post type over the loop?
- Performance concerns: index.php vs taxonomy-$taxonomy.php
- Why does apply_filters behave different inside and outside a loop?
- Having a variable based on $post_count increase when i move to the next page of results
- Post order by custom fields
- meta_query where the meta value is not the post title
- Elementor posts custom query based on tag [closed]
- How can I do a orderby by the number of items? So basically list by starting with the array with the largest number of post
- WP_Query order by multiple meta keys & fields
- Is WP Query skipping to check next post when an argument is not met?
- How do you do a meta query on an encrypted field?
- meta_query is overriding default search
- Custom Woocommerce Product Query
- How can I write a WP_Query that is this specific?
- in_the_loop() issue with custom query
- Pagination inside the blog page not working
- How to restrict add media library only to images of the same post family?
- How to query most recent post for each author?
- Custom Query Pagination not working on static front page
- Post Template Query with WP_Query?
- Wp Query sort order
- get_posts query caching?
- Adding additional taxonomies to wordpress taxonomy page
- why doesn’t this pre_get_posts code work?
- Query Top Set Custom Taxonomy In Given Timeperiod
- Custom taxonomy and query multi conditions
- Best way to Order Post in Home without a plugin
- Retrieving category pages from subcategory returns empty sets
- WP_query issue with no posts
- How to get query results for the next page
- Loop through multiple custom fields with increasing number
- Different number of posts showing in development vs production server
- Multiple loop for “featured” items returns wrong posts
- Get WP_Query query after execution?
- Query string form $_GET[‘value’] is not working as meta value in wp_query
- query_posts problem – need help
- 294 Queries on Mainpage of WordPress
- Pagination on custom post type not working
- How to efficiently find “duplicate” posts, where the titles are different, using metadata to match posts?