After further investigation, I noticed my theme was actually replacing all the anchor tags with shortcodes for SEO purposes, so there weren’t any links in the content anymore. I was able to make it work by replacing
$content = get_the_content();
with
$content = apply_filters( 'the_content', get_the_content() );
Related Posts:
- If No Search Results, Show Posts from Alternate Search Query
- How to go about combining dropdowns / filter queries?
- How do I set the Stewart Search Template to return only published posts in the result
- How to fix pagination for custom loops?
- Remove the Homepage Query
- A search for ‘0’ returns results
- Is `query_posts` really slower than secondary query?
- Are there any scenarios where the query_posts may be used?
- Transient not working for custom loops
- post loop causes wp_users and wp_usermeta DB queries for each users
- get_the_foo() in the loop – does it perform another query?
- How to Loop within a Loop (Display Children and then Grandchildren)
- Loop posts only excluding first post
- Custom search form to display users only
- Loop after page content
- How to get an array of years from all of the search results, and use it to filter by year the paginated loop?
- A loop with all articles with certain text strings in tags
- Display most viewed post from last 30 days is not working correctly
- Query posts if meta key starts with
- 3 Posts in Loop, Show Stickies First
- Get search.php results in header.php?
- Query reset problem or flawed code to enable custom post type query
- Query last updated posts (posts updated in the last 24 hours)
- Conditional query that displays on Woo product attribute pages
- How do I use AJAX Query in my posts loop?
- woocommerce get_price_html not pulling in correct price
- Filter the_posts doesn’t work on search page
- How to fix pagination for custom loops?
- How can I paginate this?
- How to display posts by vote count and if no value continue with latest posts with no votes?
- How to fix pagination for custom loops?
- Split wordpress loop to multiple layouts
- Making a query to the DB using same parameters of loop
- Loop inside query
- How to modify search.php to not show pages only show posts
- Include future posts in tags and in search
- get_delete_post_link() inside Loop stubbornly returns nothing
- loop inside the foreach
- Query posts only with actual text content (not including shortcode or images)
- Search page loop banner image issue
- Does search.php autofilter The Loop?
- Exclude posts based on an array
- Query post & loop problem.
- Loops for cat links not looping for wordpress site
- Custom Query with Sticky Posts
- Build a Page which shows the Oldest Post with specific Custom Field Value
- Work arounds for conditional checks inside the loop in search.php?
- Query posts and display all dates in repeater field in chronological order
- How to fix pagination for custom loops?
- Search – Check if post is a page on search page
- Get featured image outside the loop using foreach
- Alternative layout the loop
- Show posts by tags excluding current post
- Strange problem with wp_get_attachment_image_src database (db) query count
- Next 10 posts data of currently viewing post in blog page
- How to fix pagination for custom loops?
- How to fix pagination for custom loops?
- How to fix pagination for custom loops?
- Get query result before posts are displayed?
- Combine Query and Select Database to create directory loop
- WordPress loop: Display if posts exist
- wordpress showing all posts instead of date range
- Eliminate duplicates in a foreach loop [closed]
- Multiple loop with pagination in same page
- Query Loop Block: possible to restrict just child pages?
- Use Base-URL with Query-Loop
- How to force excerpts / teasers in the loop
- Usage of the new “posts_clauses” filter in WordPress 3.1?
- Loop through pages with specific template
- Single page site (WordPress) including posts
- Meta Query with spaces in value?
- Styling text and images in the_content()
- Output loop leveraged shortcode twice on one page
- How do I search events between two set dates inside WP?
- Added if statement to loop
- How to get The Loop working with $wpdb->get_results()
- Group posts by date with a list
- Add class to last 3 posts in loop
- Will only show the first 10 wordpress posts instead of all my posts
- displaying recent comments outside loop without plugin
- get_the_ID not returning correct ID value
- How to put a block of code between [shortcode][/shortcode] in do_shortcode()?
- current-user_can not working in loop
- Search.php – return number of results but cannot loop through
- How can I access a post’s feature image outside the loop?
- Category name for all posts getting assigned to a single random post
- How to add pagination in Terms
- A code that I could not fully grasp related to foreach & count_user_posts()
- Include only one category but Exclude if is in a category from loop
- how to show more than 1 post into three columns query
- numberposts not responding to wp_reset_postdata()
- Problems With Query and/or Template Part and/or PHP
- Get child taxonomies in loop
- WordPress Multiple Loop: Home/Archives Page, with pagination
- Placing the content of one post in two side by side columns, newspaper style
- One loop for sticky, one for all the rest – how, without specifying category?
- Pass WP post content to a jQuery plugin (Fancybox)
- Custom Page Template and Category Exclusion
- How to store wordpress title in a variable
- How to split the loop every 2 and 5 results? [closed]