Wow, it works! Thank you so much! We will experiment with the blog posts and the summary blocks now that they consistently open up in new windows! Thank you so much!
The OP doesn't need to do this step.
Add the following to Settings > Advanced > Code Injection > HEADER.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
Add the following to Page Settings > Advanced > Page Header Code Injection for the page.
<script>
$( ( ) => {
/*
add target attribute to summary block anchor tags
SS Version : 7.0
Templates : Brine ( Aria, Blend, Cacao, Clay, Fairfield, Feed, Foster,
Greenwich, Hatch, Heights, Hunter, Hyde, Impact, Jaunt, Juke,
Keene, Kin, Lincoln, Maple, Margot, Marta, Mentor, Mercer,
Miller, Mojave, Moksha, Motto, Nueva, Pedro, Pursuit, Rally,
Rover, Royce, Sofia, Sonora, Stella, Thorne, Vow, Wav, West )
*/
/*
enter block ids for each block you want to target. an empty array means
all will be targeted. the format of each line is a block id. do not
include # at the beginning
*/
const blockIds = [
// '[enter block id here]',
// last or only item doesn't get a comma at end of line
];
const targetAtttributeValue = '_blank'; /* use _self | _blank | _parent |
_top | framename see
< https://mzl.la/2Q0JROF > */
// do not change anything below, there be the borg here
if ( ! targetAtttributeValue ) return;
const $summaryBlocks = $( '.summary-v2-block' )
if ( blockIds.length ) {
$summaryBlocks.filter ( function ( ) {
return blockIds.includes ( $( this ).attr ( 'id' ) );
} );
}
if ( ! $summaryBlocks.length ) return;
$( 'a', $summaryBlocks ).attr ( 'target', targetAtttributeValue );
} );
</script>
This is for v7.0 using the Brine template family.
Let us know how it goes.