Support » Plugin: Comments - wpDiscuz » Open Profile Links in Same Page

  • Resolved jetxpert

    (@jetxpert)


    We would like to open profile links (e.g., Author and Member links) in the same page. How can we do this? Currently, they open in a new tab.

    Also, would like to recommend gVectors update its settings section titled “User Authorization and Profile Data” to include a new option with a toggle called:

    Open profile URL in a new tab: [ON/OFF]

    Click here for details.

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Clarification:

    We found the snippet provided below but it only opens the Avatar links in the same page.

    add_filter('wpdiscuz_avatar_link_attributes', function ($attr) {
       if (isset($attr['target'])) {
           $attr['target'] = '';
       }
       return $attr;
    });

    We need as snippet (i.e., filter) to open profile links in the same page. Click here for details.

    Thank you.

    Update:

    We created the filter provided below based on the above info and info found here. Works like a charm.

    add_filter('wpdiscuz_author_link_attributes', function ($attr) {
       if (isset($attr['target'])) {
           $attr['target'] = '';
       }
       return $attr;
    });

    We would still appreciate gVectors adding the above filters to your plugin settings.

    Thank you.

    Plugin Support gVectors Support

    (@gvectorssupportmember)

    Hi @jetxpert,

    We would still appreciate gVectors adding the above filters to your plugin settings.

    Sorry, but it can’t be added in the plugin setting.

    wpDiscuz has a filter that allows you to change the attributes of the link printed on the comment author name.
    Mor info here: https://wpdiscuz.com/docs/codex/filters/wpdiscuz_author_link_attributes/

    @gvectorssupportmember,

    Thank you for the link.

    Can you explain why is it not possible to add a toggle switch to your plugins settings to emulate the above filter(s)? Much easier than adding the filter to our functions.php file.

    Again, thank you.

    Plugin Support gVectors Support

    (@gvectorssupportmember)

    Hi @jetxpert,

    I’m sorry, but we don’t think it’s necessary to add this as an option in the plugin settings. In case if there is a hook specifically designed for such actions.

    @gvectorssupportmember,

    OK. Thanks for the follow. We’ll buy that.

    Again, thanks for creating and offering a great plugin.

    Cheers!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.