badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Validator and other questions

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5521
    codyblum
    Member

    http://www.lowcountryreds.com

    I’m new to WordPress so a little guidance would be appreciated. I’ve been trying to customize the Attitude Pro and have recently created a Child Theme. Below is the CSS for the child theme, is this correct? WordPress seems to think so and my page loads fine (although a little slow).

    /*
     Theme Name:     Attitude Pro Child
     Theme URI:      https://www.themehorse.com/themes/attitude-pro
     Description:    Attitude Pro Theme Child
     Author:         Theme Horse
     Author URI:     http://example.com
     Template:       attitude-pro
     Version:        1.2
    */
    
    @import url("../attitude-pro/style.css");
    
    /* =Theme customization starts here
    -------------------------------------------------------------- */
    

    Next I figured I would run my website through a validator. It came up with three errors:

    HTML5 Validator Error
    
    Line 306, column 47: Element hgroup not allowed as child of element div in this context. (Suppressing further errors from this subtree.)
    							<hgroup id="site-logo" class="clearfix">
    
    Line 306, column 47: The hgroup element is obsolete. To mark up subheadings, consider either just putting the subheading into a p element after the h1-h6 element containing the main heading, or else putting the subheading directly within the h1-h6 element containing the main heading, but separated from the main heading by punctuation and/or within, for example, a span class="subheading" element with differentiated styling. To group headings and subheadings, alternative titles, or taglines, consider using the header or div elements.
    							<hgroup id="site-logo" class="clearfix">
    
    Line 353, column 30: Element style not allowed as child of element div in this context. (Suppressing further errors from this subtree.)
    							<style type='text/css'>

    I’m not sure what all that means. Using HTML-Tidy, could I cut and paste the codes into my website? If I were to copy the corrected coding, where would this be placed?

    #5526
    codyblum
    Member

    Another Question:

    Looking at page titles, I would like to add an image and text. I’ve added the Page.php to my Child Theme folder and started to look for <?php the_title(); ?>, but there was none. From what I’m reading, below the <?php the_title(); ?> I need to add

    <?php if ( is_page('pets') ) {
          echo '<div class="pets">';
    } else {
          echo '';
    }
          if ( is_page('products') ) {
          echo '<div class="products">';
    } else {
          echo '';
    }
    ?>

    Of course some of those titles would be changed. Anyways, I’m stuck at this point.

    Is there an easier way such as a plugin or would you have some code for me?

    Thanks

    #5551
    codyblum
    Member

    No answers?

    #5563
    Sanjip Shah
    Participant

    @codyblum For you first post, the child theme code that you have used in style.css is fine. About the HTML validator error, please don’t worry about that. We have made our theme in latest HTML5 and CSS3 standards. The HTML validator does not recognize the latest HTML5 tags.
    About your second post, In the theme folder, go to library folder->structure folder->content-extensions.php file. Copy this function from there attitude_theloop_for_page and paste in the functions.php file of your child theme and make your customization there. You may also have to hire a developer if you are not so much familiar with making the child theme and customization ways.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.