Support » Plugin: Flex Posts - Widget and Gutenberg Block » Open links in new tabs

  • Resolved Douglas Ferraz


    Hi @tajam

    Firstly, congratulations on the excellent plugin.

    Please, I would like to suggest that you include an option to open articles in a new tab. Or create a filter for developers to add the option.

    So it would not be necessary to edit the $title variable to insert “target = _blank” in the link.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tajam


    Hi, thanks for your suggestion. Do you mean the article title or the block/widget title? The $title variable is used as the block title. There is already a filter to change block title: flex_posts_block_title.

    Thread Starter Douglas Ferraz


    Hi @tajam

    I talk about the article title.

    Sorry for my mess.

    I looked at the plugin code here. I talked about the wrong variable.

    For example: to open the titles in a new tab in layout 2.

    In the templatetags.php file:

    <a class="fp-thumbnail" href="<?php the_permalink(); ?>" target="_blank">

    In the flex-posts-list-2.php file:

    <h4 class="fp-title"><a href="<?php the_permalink(); ?>" target="_blank"><?php the_title(); ?></a></h4>

    The suggestion would be to include an option to be able to open these links in a new tab.

    Thread Starter Douglas Ferraz


    I managed to solve this by rewriting a function from template-tags.php

    Inserted in my functions.php

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Open links in new tabs’ is closed to new replies.