Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1060328
    Sam
    Participant

    Hi Nabeel,

    Thats right, when I activate parent theme everything goes fine except sidebar and some css issues! but if you keep child theme and check home page code, its working fine also!

    only error or issue is in wp-single.php at /home/trac3068253776/html/wp-content/themes/x-child/framework/views/ethos

    And code there is :

    <?php
    
    // =============================================================================
    // VIEWS/ETHOS/WP-SINGLE.PHP
    // -----------------------------------------------------------------------------
    // Single post output for Ethos.
    // =============================================================================
    get_header(); 
    $fullwidth = get_post_meta( get_the_ID(), '_x_post_layout', true );
    
    ?>
    
      
      <div class="x-container max width main">
        <div class="offset cf">
          <div class="<?php x_main_content_class(); ?>" role="main">
    
            <?php while ( have_posts() ) : the_post(); ?>
    
              <?php x_get_view( 'ethos', 'content', get_post_format() ); ?>
    
    <?php echo do_shortcode( '[share title="Share this Post" facebook="true" twitter="true" google_plus="true" linkedin=“false” pinterest="true" reddit="true" email="true"]' ) ?>
    
              <?php x_get_view( 'global', '_comments-template' ); ?>
            <?php endwhile; ?>
    	
    
          </div>
    
          <?php if ( $fullwidth != 'on' ) : ?>
            <?php get_sidebar(); ?>
          <?php endif; ?>
    
        </div>
     </div>
    
    <?php get_footer(); ?>
    

    Can you please review this code and update me what wrong code is done there which is causing to call meta inside body tag instead of head tag!

    Hope to get response asap!

    Thanks,
    Anup

    #1060552
    Lely
    Moderator

    Hi Anup,

    The code above is fine. I have tested it on my test site. Are you sure that’s the only customization you have on your child theme? Please check again. It seems that it might be either on functions.php file or _header.php on x-child/framework/views/global folder. Did you try to remove each custom file on your child theme and then add it again one by one. That’s the best option to see which one is causing this issue.

    Hope this helps.

    #1066302
    Sam
    Participant

    Hi Support Team,

    Thanks for looking into that code so quick!

    As I am the second developer on the project, So I am not sure what code is right or wrong done by first developer!

    I am attaching complete x-child theme as zip. Please review it asap and update me what code is causing that issue!! this issue is getting serious issue for me! hope to get some resolution soon 🙂

    Thank You Guys,
    Anup

    #1066345
    Lely
    Moderator

    Hi Anup,

    Can you check try updating this part of the code on wp-single.php file:

    <?php echo do_shortcode( '[share title="Share this Post" facebook="true" twitter="true" google_plus="true" linkedin=“false” pinterest="true" reddit="true" email="true"]' ) ?>
    

    To this:

    <?php echo do_shortcode( '[share title="Share this Post" facebook="true" twitter="true" google_plus="true" linkedin="false" pinterest="true" reddit="true" email="true"]' ) ?>
    

    This part linkedin=“false” is using pretty quotes. Then try again.

    #1067013
    Sam
    Participant

    Hi,

    Thanks for your quick scan! it was small and silly error! I removed it but still meta and all other tags are under body tag! not in head tag!!

    Seems like somewhere header is calling after body tag open!

    Please review again and help me to resolve it soon!

    Thanks,
    Anup

    #1067660
    Rad
    Moderator

    Hi there,

    The meta is within the <head></head>, view the actual source code instead of the inspector and you’ll see. Inspector only add the meta tags within the <body> if there is any malformed content before the <head>.

    The main reason for that is this &#65629;, something is adding it before the <html>. It’s not viewable on actual source code which means, it’s caused by a javascript instead of PHP coding ( through templates ).

    To fix it, we need to find the javascript that causing it.

    Would it be okay to disable all plugins that are related to javascript? And please remove custom javascript and tracking temporarily too. Or you can wrap them in comment block instead of removing them. I can do those procedures, but you must backup your site first.

    Thanks!

    #1075112
    Sam
    Participant

    Hi Support team,

    I had done backup of website using UpdraftPlus plugin.

    Please review and now check for culprit javacript or any code which is causing issue and resolve it!

    Hope to get some result soon!

    Thanks,
    Anup

    #1075639
    Rue Nel
    Moderator

    Hello Anup,

    Could you please disable your cookie plugin? This is using a javascript. This may have been the cause of the issue all along. I also checked your functions.php file and I feel that your code is incomplete. You should have something like this:

    function my_custom_head_output() {
      ?>
        <meta name="p:domain_verify" content="63658a330ea47bf51939b0c501d736b6"/>
      <?php
    }
    add_action('wp_header', 'my_custom_head_output');

    And another thing, there is still a pretty quotes present in your _content-post-header.php file. You must edit it and replace the lines:

    <?php if ( is_singular('post') ) : ?>
          <?php echo do_shortcode('[share title=Share facebook="true" twitter="true" google_plus="true" linkedin="false" pinterest="true" reddit="true" email="true"]'); ?>
    <?php endif; ?>

    Hope this helps. Kindly let us know.

    #1076331
    Sam
    Participant

    Hi Support Team,

    I disabled eu-cookie plugin and then updated both files..but issue is still same!!
    Still meta tags under body tag instead of head tag!

    Please review work done and check again for some wrong code or plugin still there!

    Thanks,
    Anup

    #1077121
    Rad
    Moderator

    Hi there,

    Same on my end, still no luck. Would you mind providing your FTP login credentials as well?

    Thanks!

    #1078302
    Sam
    Participant
    This reply has been marked as private.
    #1078956
    Rad
    Moderator

    Hi there,

    Looks like two instances of social share shortcode breaks it. Removing one from templates fixes it. The culprit is the sharing shortcode in index and single template. Sharing on header works just fine, please remove the sharing added to the body.

    Thanks!

    #1079009
    Sam
    Participant

    Hi,

    AS you can see issue, Can you please remove that shortcode and confirm is everything working fine or not!
    I checked from my end, but could not see it resolving our issue!

    Please make said changes and update me if removing that shortcode work or not!

    Thanks,
    Anup

    #1079123
    Rad
    Moderator

    Hi there,

    Weird, it was working by removing the shortcode. What I did now is disabled the entire folder of framework templates and it did work. I’m wondering why since the only customization on those templates are shortcode.

    What’s weird is disabling ethos folder by renaming it is not working this either. Renaming framework or ethos folder should have no different since the templates are just on same location. It could be related to Godaddy’s caching or object cache/transients.

    Please check and all meta are now displayed in their proper location.

    Thanks!

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