You could use the following:
<script>
function open_win( thePostURL )
{
window.open(thePostURL);
}
</script>
<a href="#" onclick="open_win( "https://wordpress.stackexchange.com/questions/116036/<?php the_permalink(); ?>" )">More...</a>
It seems like a bit more work than it’s worth though, the following would have the same result of the link opening in a new window:
<a href="https://wordpress.stackexchange.com/questions/116036/<?php the_permalink(); ?>" target="_blank">More...</a>
Related Posts:
- How to Create Editable Blocks of Text for the Homepage?
- How to display by default only published posts/pages in the admin area?
- Set Post Title to Read-only and Disable Permalink Slug Editor in Gutenberg
- how to get permalink using sql
- how to display full post with pagination on home page
- how to grab first link in post… and of course call it
- Custom colors for post rows based on post meta value
- All WordPress scheduled posts are being published immediately
- Get all posts by post_author
- Linking to page with all posts
- Undelete post (untrash)?
- What Defines What Category A Post Picks (if in multiple)
- Delete Post From Front-End and attachment permanently
- Every possible way to get data (posts) from WordPress
- Double count view in archive.php
- disable column on post and user list
- Multiple social buttons with a fast loading? [closed]
- How can I display widget in a Page or Post?
- Different style for most recent article
- Show info to author only
- How can I replace the text at the top of a custom column into a icon?
- count the total number of comments the user has received for his published posts
- Is there a straight-forward way to iterate over all shortcodes in a post?
- Using custom post template
- Display post option on frontend
- Create new posts in bulk using existing post
- Problem with adding programmatically woocommerce product post into category
- Post id algorithm in WordPress
- Show the content that is after the excerpt using child theme
- How to put link in twenty fourteen theme? [closed]
- Change target of view link in admin
- Switch to page template when using post permalink
- how to add older post to new wordpress post with new post?
- How not display particular post?
- WordPress Comment posting problem
- Pasting code into WordPress post – LFs being eaten
- Increase 10 post limit per page
- Insert sometext after first h3 in content
- Shortcodes on my website stops working after theme update [closed]
- Remove password protected posts from default RSS feed
- Show posts by author of membership level (Paid Membership Pro)
- How can you display all sibling categories to a post?
- Why posts array is empty?
- How to disable the_excerpt from one post
- Blog post not showing title
- Category page when using static front page
- retrieve the oldest post id
- How do you search for a post or page with a certain url on the WordPress admin panel?
- How to check in functions.php if there is data in a WP_Query?
- why str_replace targeting pages instead just targeting post?
- how to add updated_by column to posts admin panel?
- Display the 2nd category name of a custom post type without error if its null?
- How to set a certain Custom Template to a Single Blog Post
- Get latest post from categories
- Simple Custom Metabox Not Saving
- Access last visit time to a post
- why the posts queried from sql is more than those showed on the page?
- Highlighting Current Category in the Archive and Feeds page
- Get current taxonomy and display query accordingly
- Is there a function to get post info for any publish_status by post ID?
- Geting error in post and category [closed]
- Add static text to post URLs
- Display a specific category in a focused area of my site
- Post page overwrite the custom blog page
- Target only single product page
- Check if almost 10 year old – working code is up to date
- Post Image Gallery After Content Function messes with other content
- Posting an article containing mathematical symbols and R code
- Query custom post type custom meta key
- WordPress: Develop multiple posts with different data
- Bulk find & replace on WordPress posts/pages (minus image paths)
- How can get the last post date of the user?
- How to convert attachment pages to Posts?
- Remove pagination if search returns empty
- Remove HTML tags from all posts
- how can i fix my display post in my index.php
- Page with Category Returning 1
- Ajax post doesnt call succes after got the response
- Adding a ‘section’ to the backend menu
- Customizing URL slugs of Custom Post Type and Taxonomy make posts/pages 404
- Get 5 most recent categories
- Allow reader to reorder posts for themselves (oldest first)
- Is it possible to completely replace a post with an action/filter?
- Surrogate ID for posts, is there an alternative field in the posts table?
- Expired Post with More Recent Time Stamp?
- Post preview in iframe without saving the post
- Set post beginning date and final date
- How to get only current images of a post
- How do I get thumbnails?
- Using Post ID and Page ID in same function
- How can I show my post under a certain content name?
- How to Include a common category in a custom Category Search
- How to display only one post on first category page and rest on next pages?
- Show Custom Post From Logged In Author
- Is there a way to separate wordpress titles from their posts?
- Viewing category won’t show up Custom post type posts
- Get attachment if matches a variable
- Trying to create shortcode listing custom posts, but formating not being included
- Sort Posts Alphabetically Based on Specific Category (Divi)
- Inserting Media on New Post But Hides Previous Uploads for Editor/Contributor