Forum Replies Created

Viewing 15 replies - 136 through 150 (of 2,107 total)
  • For Twenty Eleven you should be using a child theme, and the changes will work if you have done them right!

    This will depend on what you are changing, to change the posts then you need to understand get_template_part() and how these can be styled with the post_class()

    Have a look at this post, where we change the archive content, the download is a twenty eleven working child theme, so it does work!

    HTH

    David

    Just a footnote to this topic.

    If you are using a custom menu from Appearance > Menu > Menu Items.

    Go to the menu designer and look at the top (Screen Options), check the one that is called “CSS Classes”, now on each menu item you have a new box “CSS Class”.

    This will add whatever you put in the class at runtime, adding class names like, fashion, beauty, diy, food, other and contact, can all be classes without needing the page ID.

    So if you added the ‘CSS Class’ about to a menu item and your style.css code will then work!

    .about {
     color: #FF6666;
     }

    Regards

    David

    Hi,
    It the themes folder you could have a file date.php or archive.php, this is the template that displays the posts when you click on ‘June 2012’

    For more information on the template heirarchy Date Display, look at the fallback date.php, archive.php then the index.php.

    HTH

    David

    I do have a couple of post with downloadable child themes that might help, between the two.
    This Page of Posts has meta textboxes, and select dropdown boxes.

    This one extends the categories with additional boxes including a check box.

    HTH

    David

    If I am reading this right you want to dispaly a checkbox and set this to true if it is in the post meta?

    If so this will display a checkbox and check it if it is set true in the post meta!

    <tr class="form-field">
    	<th scope="row" valign="top"><label for="my_cb"><?php _e('My Checkbox'); ?></label></th>
    	<td>
    		<?php if( get_post_meta( $post->ID, 'my_cb', true ) ){ $checked = "checked=\"checked\""; }else{ $checked = "";} ?>
    		<input style="float:left; width: 15px; border: none;" type="checkbox" id="my_cb" name="my_cb" value="true" <?php echo $checked; ?> />
    	</td>
    </tr>

    Could shorten the $checked to something like:

    <?php $checked= get_post_meta( $post->ID, 'my_cb', true ) ? "checked=\"checked\"" : ""; ?>

    HTH

    David

    Hi,
    Have a look at the line-height: and margins, adjusting to suit!

    I use this block below to centre the twenty eleven menu, note that Internet Explorers older browsers, needs some extra styles.

    /* = Centre Menu including IE7 Support
    ------------------------------ */
    #access {
    	text-align:center;
    }
    
    #access ul {
             display:inline-block;
             *display: inline; /* For IE7 */
             *zoom:1; /* For IE7 */
             vertical-align:top;
    }
    
    #access div {
    	margin: 0;
    }
    
    #access a {
    	line-height: 1em;
    }

    HTH

    David

    Yes using the post_class(), have a read of this for different ideas on setting the post class.

    All we do is add another ‘custom’ class to the post, so we can style it.

    Here is how you might add to your child themes style.css:

    .box-1 {
    	float: left;
    	min-height: 1px;
    	padding: 1em;
    	border: 6px inset #9FB6CD;
    }

    A variation:

    .box-2 {
    	float: left;
    	min-height: 1px;
    	padding: 1em;
    	border: 5px solid #F1F1F1;
             box-shadow: 0 1px 2px rgba(51, 51, 51, 0.65);
    }

    Copy content.php to the child theme:
    find:

    <?php post_class(); ?>>

    change to

    <?php post_class( 'box-1' ); ?>>

    or

    <?php post_class( 'box-2' ); ?>>

    HTH

    David

    As WPyogi said create a child theme, or download mine, this has an empty functions.php, with an after_theme_setup code block:

    Example for a width of 1140, here is the complete solution.
    Then in the child themes style.css

    /* =Make our whole website wider
    -------------------------------- */
    #page {
    	margin: 0 auto;
    	max-width: 1140px;
    }
    .featured-posts,
    #ie7 article.intro {
    	max-width: 1140px;
    }

    Then if you do not have a functions.php in the child theme, create one, here is the complete code for a child themes functions.php
    http://pastebin.com/LCEpYzyB

    This changes the width and height, and removes the default headers, as these are the wrong size now!

    HTH

    David

    @chris:
    You have the block below so is the image inside the right div?

    #logo {
        border: medium none;
        clear: both;
        margin: 63px auto 34px 367px;
    }

    Add to the end of style.css, 85px being left and right margins

    #logo {
        margin: 63px 85px 34px;
    }

    @wpyogi

    Posted same time same solution πŸ™‚

    Copy content.php the the child themes folder.
    content.php is used for search, category and archive lists, so we only want to hide it on the home or front page

    Find this line:

    if ( $categories_list ):

    Add another condition:

    if ( !is_home() && $categories_list ):

    You could repeat this for the post tags:

    if ( $tags_list ):

    Add another condition:

    if ( !is_home() && $tags_list ):

    Done!

    All is does is add a condition ‘not home’, giving, if this is not '!' the home page and '&&' I have a list of categories then display them!

    The other condition that you could use if you were using a custom template for the front page.

    if ( !is_front_page() && $categories_list ):

    Not front page or '||' home:

    if ( !( is_front_page() || is_home() ) && $categories_list ):

    HTH

    David

    Three options:
    1. Use FireFox and FireBug > CSS and view the stylesheets.

    2. Admin > Apperance > Editor > Style.css and have a look!

    3. Another quick test is add a style, change the title or header color, save then ctrl+f5 to see the change, if you see it all is ok

    HTH

    David

    Hi,
    Always something we never expect!

    favicon code will go into the header.php (copied parent to child) between the <head></head> tags.

    functions.php is only required if you need to add a function or over-ride a pluggable function

    WordPress will run the child themes functions.php first then the parents, that is why we use the ‘after_setup_theme’ hook (trigger), this will run last.

    HTH

    David

    The problem might be the space, use hyphons ‘-‘ for spaces, as you are not uploading via the admin panel, you currently have:
    /wp-content/themes/wp-creativix child/

    change to:
    /wp-content/themes/creativix-child/

    HTH

    David

    If the child theme style.css has the correct lines then you do not need the line in the <head> tags

    The child themes folder sits at the same level as the parent, looking at your style.css Case Sensitive ( make theme folders lowercase with no spaces )

    If the folder is WP-creativix then Template: WP-creativix

    parent should be: /wp-content/themes/wp-creativix/
    child could be: /wp-content/themes/creativix-child/

    The child stylesheet would load the parent styles first, then cascade to the child styles:

    /*
    Theme Name: WP-Creativix Child
    Template: wp-creativix
    Version: 1.0
    Author: Eric Abbott
    */
    
    /* =Do not add styles before the Stylesheet import
    -------------------------------------------------------------- */
    @import url('../wp-creativix/style.css');
    
    /* =Add styles changes below this line
    -------------------------------------------------------------- */

    Optional: Add the screenshot from the parent
    child theme functions.php if required:

    <?php
    
    /* Add code here that needs to run before the parents functions.php */
    
    /**
     * Tell WordPress to run post_theme_setup()
     * when the 'after_setup_theme' hook is run.
    */
    
    add_action( 'after_setup_theme', 'post_theme_setup' );
    
    if ( !function_exists( 'post_theme_setup' ) ):
    function post_theme_setup() {
       /* place for code to execute after parents functions.php */
    
    }
    endif;

    HTH

    David

    This may help!

    Creating a Static Front Page

    David

Viewing 15 replies - 136 through 150 (of 2,107 total)