Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #881236
    _agus
    Participant

    Hi!

    I just notice that my blog displays a white space under the whole page. Right under the footer. But oddly, this only happens when I am using google chrome.
    How can I get rid of it?

    Thanks!

    #881638
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! To assist you better with this issue, would you mind providing us the url of your site with login credentials, if necessary, so we can take a closer look? 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.

    To do this, you can make a post with the following info:
    – Link to your site

    – WordPress Admin username / password (only if necessary)

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thank you.

    #891022
    _agus
    Participant

    Hi!

    I found out! But now I’m having new problems!

    1. My meta post counts is being override by Disqus.

    I’m using the code:

    if ( comments_open() ) {

    $title = apply_filters( ‘x_entry_meta_comments_title’, get_the_title() );
    $link = apply_filters( ‘x_entry_meta_comments_link’, get_comments_link() );
    $number = apply_filters( ‘x_entry_meta_comments_number’, get_comments_number() );

    if ( $number == 0 ) {
    $text = __( ‘Deixe seu comentário’ , ‘__x__’ );
    } else if ( $number == 1 ) {
    $text = $number . ‘ ‘ . __( ‘Comment’ , ‘__x__’ );
    } else {
    $text = $number . ‘ ‘ . __( ‘Comments’ , ‘__x__’ );
    }

    $comments = sprintf( ‘<span>%3$s</span>’,
    esc_url( $link ),
    esc_attr( sprintf( __( ‘Leave a comment on: “%s”’, ‘__x__’ ), $title ) ),
    $text
    );

    } else {

    $comments = ”;

    }

    And it works initially. But when the page fully loads my meta change to “0 Comments”, even when the display output was the if ( $number == 0 ) funtion or the else if ( $number == 1 ).

    2. Second problem, I would like to know what function X Theme uses to retrieve the color value from the Site Link field in customizing panel, so I can use some php in the css to match that color. Is that possible?

    Thanks in Advance!

    #891641
    Zeshan
    Member

    Hi there @_agus,

    Thanks for writing in!

    #1: To assist you with this, we’ll first need you to provide us with your URL as stated on the forum entrance page. 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.

    #2: You cannot use PHP in CSS. If you want to change the color of a specific element, you can use CSS like this:

    .element-class {
       color: #ff0000;
    }
    

    Thank you!

    #892582
    _agus
    Participant

    Hi!

    I just understood what was going on with my Disqus problem. Thanks. But about the php in the CSS, what I meant was: Is it possible to create a function to output some CSS somewhere like, in the header? If so, how can I make the color value outputted match the site link’s color pick?

    Thanks.

    #893353
    Rue Nel
    Moderator

    Hello There,

    What you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    You can use this custom code in your child theme’s functions.php file

    // Add Custom link colors to my element
    // =============================================================================
    function my_custom_colors(){ ?>
       
       <?php 
          $x_site_link_color = x_get_option('x_site_link_color'); 
          $x_site_link_color_hover = x_get_option('x_site_link_color_hover'); 
       ?>
    
       <style id="custom-generated-css" type="text/css">
         .element-class {
           color: <?php echo $x_site_link_color; ?>;
         }
    
         .element-class:hover {
           color: <?php echo $x_site_link_color_hover; ?>;
         }
       </style>
    
    <?php }
    add_action('wp_head', 'my_custom_colors', 9999);
    // =============================================================================

    We would loved to know if this has work for you. Thank you.

    #894052
    _agus
    Participant

    Hi!

    Thank you very much! That’s exactly what I was looking for.

    Cheers!

    #894872
    Friech
    Moderator

    You’re more than welcome, glad we could help.

    Cheers!

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