Digital experiences for all disciplines
New Landing › How can we help? › Cardinal › Moving Disqus comments section (or just comments)
New Landing › How can we help? › Cardinal › Moving Disqus comments section (or just comments)
- This topic has 17 replies, 4 voices, and was last updated 8 years by David Martin – Support.
-
Posted in: Cardinal
-
January 2, 2015 at 2:15 am #138518
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!
January 2, 2015 at 7:02 pm #138685Hi,
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
January 2, 2015 at 7:36 pm #138691This reply has been marked as private.January 5, 2015 at 4:28 pm #139120This reply has been marked as private.January 6, 2015 at 10:13 pm #139511This reply has been marked as private.January 7, 2015 at 11:14 am #139620Hi,
Can’t login with those credentials. Can you check please?
Thanks-Rui
January 7, 2015 at 5:56 pm #139757This reply has been marked as private.January 7, 2015 at 8:10 pm #139772This reply has been marked as private.January 8, 2015 at 4:10 pm #140093Hi,
Very confused at the moment, you are talking about Cardinal but I’m seeing Flexform in that url.
Can you advice?
-Rui
January 8, 2015 at 8:57 pm #140193This reply has been marked as private.January 10, 2015 at 12:21 am #140532This reply has been marked as private.January 13, 2015 at 11:32 pm #141314This reply has been marked as private.January 14, 2015 at 1:31 pm #141450Hi,
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
February 2, 2015 at 7:51 pm #146487Yes, 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.
February 5, 2015 at 11:30 am #147501Hi,
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
-
Posted in: Cardinal
You must be logged in to reply to this topic.