Skip Navigation

[Resolved] Open in new tab Post Link With A Title

This thread is resolved. Here is a description of the problem and solution.

Problem:

The user wants to create an archive where the Post Link With A Title opens in a new tab, but the switch in the settings is not working.

Solution:

To achieve this, use an HTML block instead of the Paragraph block and add the following code:

<a href="[wpv-post-url]" class="ptitle" target="_blank">[wpv-post-title]</a>

This code uses [wpv-post-url] for the post URL and [wpv-post-title] for the post title. The target="_blank" attribute ensures the link opens in a new tab.

For CSS customization, apply styles to the "ptitle" class:

.ptitle {
}

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by fahimS-2 1 year, 10 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2570239
Screenshot_4.jpg

Tell us what you are trying to do?
I created an archive where in the loop I added Post Link With A Title. But I can't make it Open In New Tab. The switch isn't turning on. How can I do it?

#2571435

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

You can use HTML block for that and add a code like this there instead of the Paragraph block:

<a href="[wpv-post-url]" class="ptitle" target="_blank">[wpv-post-title]</a>

The [wpv-post-url] whos the URL of the post and [wpv-post-title] is the title itself.

You can use the "ptitle" class to add CSS customization to that title:

.ptitle {
}
#2571755

My issue is resolved now. Thank you!