• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to link #respond / #comments to #disqus_thread using functions.php?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to link #respond / #comments to #disqus_thread using functions.php?

This topic is: resolved

Tagged: #disqus_thread, disqus, functions.php

  • This topic has 3 replies, 2 voices, and was last updated 8 years, 9 months ago by Chris Moore.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • December 14, 2013 at 10:09 pm #79177
    Chris Moore
    Member

    Hello StudioPress friends!

    Have another question for you all!

    Using functions.php, how can I change the 2 default comment links (#respond and #comments) at the top of posts to link to #disqus_thread instead?

    Here is an example link using #respond:

    1.) #respond: http://reflectonthis.com/health-well-being/meditation-alters-the-mind-and-the-brain/#respond

    Thanks in advance! I know someone will answer... 🙂


    Resepctfully, Chris Moore
    Web Dev, CSS Hacks, & Biz Consulting @ MooreCreativeIdeas.com / Blogging @ ReflectOnThis.com

    http://reflectonthis.com/health-well-being/meditation-alters-the-mind-and-the-brain/#respond
    December 15, 2013 at 10:18 pm #79358
    Chris Moore
    Member

    Just what the doctor ordered!!! SOLVED. 🙂

    Just drop this in your functions.php:

    // Filter #respond to be #disqus_thread
    	add_filter( 'get_comments_link', function( $link, $post_id ) {
    	    return get_permalink( $post_id ) . '#disqus_thread';
    		}, 10, 2 );

    Hope this helps someone here!


    Resepctfully, Chris Moore
    Web Dev, CSS Hacks, & Biz Consulting @ MooreCreativeIdeas.com / Blogging @ ReflectOnThis.com

    April 26, 2014 at 6:51 am #102415
    treoguy
    Member

    Thanks Chris! This was exactly what I was looking for and it worked great! Much appreciated.

    April 26, 2014 at 12:05 pm #102482
    Chris Moore
    Member

    Sincerely happy that it worked out for you and was useful. 🙂


    Resepctfully, Chris Moore
    Web Dev, CSS Hacks, & Biz Consulting @ MooreCreativeIdeas.com / Blogging @ ReflectOnThis.com

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble