The effects of alcohol on
sustanon 250 leucine for – real weight loss & bodybuilding benefits?
[Solved] How to move WPDiscuz Comments above Contextual Related Posts
Summarize Topic
✦
✦
✦
AI is analyzing the discussion...
How-to and Troubleshooting
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Mar 12, 2021 4:30 pm
(@supertrooper)
Trusted Member
Joined: 5 years ago
We have been using echo_crp to position Contextual Related Posts in the posts and pages by inserting the following code into the content-single.php and content-page.php files in the child theme:
/var/www/focusingonwildlife.com/news/wp-content/themes/sparkling-child/template-parts
<?php if ( function_exists( ‘echo_crp’ ) ) { echo_crp(); } ?><br />
However the WPDiscuz Comments are positioned below the Contextual Related Posts. i.e. the comments are at the very bottom of the post. This disconnect between the post and the comments is not ideal, and readers probably forget to post comments if they get side-tracked by the Related Posts.
So the question is how can we move WPDiscuz Comments above Contextual Related Posts?
Support
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Mar 12, 2021 4:50 pm
(@asti)
Illustrious Member
Joined: 8 years ago
@supertrooper ,
You should change the location of the comments_template() function.
(@supertrooper)
Joined: 5 years ago
Trusted Member
Posts: 31
Mar 13, 2021 12:50 am
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@asti
I am not a coding expert, so let me illustrate the files we currently have in the child theme:
1) single.php file has not been successfully modified with the crp script, and the complete address is as follows: /var/www/focusingonwildlife.com/news/wp-content/themes/sparkling-child/single.php
You can access and/or download this file on the link: https://drive.google.com/file/d/1gsAP96XVSZHYCRqxWolIfB6PHf5QOv9A/view?usp=sharing
2) content-single.php file contains the echo_crp script and the complete address is as follows: /var/www/focusingonwildlife.com/news/wp-content/themes/sparkling-child/template-parts/content-single.php
You can access and/or download this file on the link: https://drive.google.com/file/d/1q4DVk8cD6GavXqJSda-LDt1welM9OsY9/view?usp=sharing
Please advise in detail what I need to do to change the location of the comments_template() function.
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8294
Mar 13, 2021 2:32 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@supertrooper ,
Please follow the steps below:
1. Cut the following part from the single.php file:
<?php if ( comments_open() || '0' != get_comments_number() ) :
comments_template();
endif; ?>
2. Paste it in the content-single.php file before the line:
<?php if ( function_exists( ‘echo_crp’ ) ) { echo_crp(); } ?><br />
However be careful, after making the changes, please check and make sure there is no problem with other post types.
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Mar 14, 2021 4:50 pm
(@supertrooper)
Trusted Member
Joined: 5 years ago
@asti
Your instructions were followed but without success (see attached screenshot).
Is there anything else we can try?
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Mar 14, 2021 5:11 pm
(@supertrooper)
Trusted Member
Joined: 5 years ago
@asti
There is another file in the theme – comments.php – which You can access and/or download on the link:
https://drive.google.com/file/d/1-DGrbvoiPJld8a9Y5nEzz5PSnrtENaH5/view
Could changes to this file enable us to position CRP below WPDiscuz Comments?
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8294
Mar 15, 2021 11:46 am
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@supertrooper ,
I've corrected my previous post (the red marked parts were added in the code).
<?php if ( comments_open() || '0' != get_comments_number() ) :
comments_template();
endif; ?>
You should paste the code above in the content-single.php file before the line:
<?php if ( function_exists( ‘echo_crp’ ) ) { echo_crp(); } ?><br />
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Mar 15, 2021 12:01 pm
(@supertrooper)
Trusted Member
Joined: 5 years ago
@asti
Now it works perfectly
Thanks for the great support.
Super Globals
Options and Features