Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1097779
    Gemma
    Participant

    Hi there,

    I have two very simple shortcodes for displaying my latest posts and similar posts.

    What I’d like to do is sandwich these shortcodes on either side of my Disqus comments, on my Posts pages only. (So structurally my post would go Header > Post Content > Similar Posts Shortcode > Comments > Latest Posts > Footer)

    What is the best way for me to do this? Do I need to edit the theme file itself, or is there a way I can do this in the customizer that I have missed?

    #1098131
    Prasant Rai
    Moderator

    Hello There,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    Thanks.

    #1098435
    Gemma
    Participant
    This reply has been marked as private.
    #1098529
    Lely
    Moderator

    Hello There,

    Thank for the credentials. Did you change your login url? I tried this /wp-admin and /wp-login.php but that is not working. We need to know the stack you were using.

    #1098832
    Gemma
    Participant
    This reply has been marked as private.
    #1099204
    Friech
    Moderator

    Hi There,

    You can add the code below on your child theme’s functions.php file.

    function add_before_comments() {
    if ( is_single() ) {
    echo do_shortcode( 'YOUR ACTUAL SHORTCODE HERE' ); 
        }
    }
    add_action('x_before_view_global__comments-template','add_before_comments', 30);
    
    function add_after_comments() {
    if ( is_single() ) {
    echo do_shortcode( 'YOUR ACTUAL SHORTCODE HERE' ); 
        }
    }
    add_action('x_after_view_global__comments-template','add_after_comments', 40);

    Replace the string with your actual shortcode.

    Hope it helps, Cheers!

  • <script> jQuery(function($){ $("#no-reply-1097779 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>