New Landing How can we help? Cardinal Moving Disqus comments section (or just comments)

Viewing 15 posts - 1 through 15 (of 18 total)
  • Posted in: Cardinal
  • #138518
    Tekguild
    Member
    Post count: 171

    Hello again!

    Another theme customization I’m trying to do is move the comments section (we’re using Disqus) to above the ‘Related Articles’ section.

    I can’t seem to find the function/template that would allow me to do this. I looked at single.php, which called ‘sf_base_layout( ‘single-post’ ), found the ‘single-post’ in swift-framework>layout and, from there, saw the function for ‘sf_post_after_article’, which I found in ‘sf-post-detail’ in swift-framework>content. I tried making a copy of ‘sf-post-detail’ into the child theme folder using the same structure (cardinal-child>swift-framework>sf-post-detail) and putting the comments function above the related articles function, but that didn’t seem to work.

    I recall with Flexform having the same issue – not being able to copy files from the parent theme to the child them to have them override the parent theme functions.

    I’m hoping for a little insight into how to get this working properly, without having to edit the parent theme files and losing them (or having to remember to re-edit them) after updating the theme.

    Is there a particular reason that you don’t put all theme functions in the primary functions file, rather than in sub-folder functions files? It seems to defeat the purpose of being able to override parent theme files with child theme files.

    Thanks!

    #138685
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Can you provide the url of one of those pages/posts that you want to change the comments position and also a screenshot showing the new position so that I can find in the code a solution for it.

    Thanks

    -Rui

    #138691
    Tekguild
    Member
    Post count: 171
    This reply has been marked as private.
    #139120
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779
    This reply has been marked as private.
    #139511
    Tekguild
    Member
    Post count: 171
    This reply has been marked as private.
    #139620
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Can’t login with those credentials. Can you check please?
    Thanks

    -Rui

    #139757
    Tekguild
    Member
    Post count: 171
    This reply has been marked as private.
    #139772
    Tekguild
    Member
    Post count: 171
    This reply has been marked as private.
    #140093
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Very confused at the moment, you are talking about Cardinal but I’m seeing Flexform in that url.

    Can you advice?

    -Rui

    #140193
    Tekguild
    Member
    Post count: 171
    This reply has been marked as private.
    #140532
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779
    This reply has been marked as private.
    #141314
    Tekguild
    Member
    Post count: 171
    This reply has been marked as private.
    #141450
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Manage to login now. This is complicated, does Discuss have any function that can be called directly in the code?

    This way we could call it before the related articles.

    -Rui

    #146487
    Tekguild
    Member
    Post count: 171

    Yes, there’s a way to use code to call the Disqus function, the question is – how do we do it in such a way that it can be used in the Child theme?

    The bigger problem is not being able to use files in the Child theme directory and have them take priority over the primary theme files. If you can tell me how that is done with this theme, putting the Disqus code in the proper place should be trivial.

    #147501
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Try to add this code below to the functions php. Not sure if it will work.

    
     add_action( 'sf_post_content_end', 'sf_custom_discuss_function', 80 );
    
    function sf_custom_discuss_function(){
    
    //call here your function
    }

    -Rui

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.