It’s really simple, you add this CSS to your stylesheet, whether the style of the child theme you use or Jetpack’s edit CSS
.menu-container { display: table; margin: 0 auto; }
That’s it 😉
(edit: .menu- not .menubar-)
It’s really simple, you add this CSS to your stylesheet, whether the style of the child theme you use or Jetpack’s edit CSS
.menu-container { display: table; margin: 0 auto; }
That’s it 😉
(edit: .menu- not .menubar-)
I am currently making a “ComicPress – Plugin” designed after the Comic Easel plugin, but uses the ComicPress coding scheme that will work in conjunction with ComicPress Manager. Which will allow you to use ComicPress on the Easel theme and integrate it into any theme on the WordPress repository.
It’s either that or I take the Easel theme and move ComicPress into it ;/ ONE OR THE OTHER! Which one would you rather have? .. seriously, need to know.
– Phil
Additionally do you think we should retire ComicPress altogether in favor of the better Comic Management Systems that are available?
What this does is give your users who do *not* have gravatars from gravatar.com when they post comments, custom avatars that you create. It will pick one from inside the directory and constantly use it based on the end users email address that they use when making a comment.
This code will only replace “default” avatars, not ones that people have made at gravatar.com.
The ComicPress and Easel themes already have this, this is a code snippet for ‘other’ themes.
This is not code for someone who is completely new to PHP and WordPress coding.
Include this into your functions.php file of your main theme you use, not the child theme. You will have to add it again if your theme updates. This is meant for theme author’s to include it in their themes on updates.
function frumph_random_default_avatar_callback( $id_or_email = '' ) { if (!empty($id_or_email)) { $count = count($results = glob(get_stylesheet_directory() . '/images/avatars/*')); if ($count) { $checknum = hexdec(substr(md5($id_or_email),0,5)) % $count; if ($count > 0) { $custom_avatar = basename($results[(int)$checknum]); $replace_src_avatar = get_stylesheet_directory_uri().'/images/avatars/'.$custom_avatar; return $replace_src_avatar; } } else return get_option('avatar_default'); } else return get_option('avatar_default'); }
THEN, you need to modify your get_avatar call in your theme (if your theme has it), this code is if your theme HAS a call to the get_avatar function.
What you do is you search for the function ‘get_avatar’ within the theme you are using, for example the thematic theme in the library/extensions/ has a file called ‘comments-extensions’ inside of it and the line with get_avatar looks like this:
$avatar = str_replace( "class='avatar", "class='photo avatar", get_avatar( $avatar_email, $avatar_size ) );
You want to modify the get_avatar function in it, the 3rd position is the the reference to the ‘default’ image, right after size, you will pass the email of the commenter to the function.
$avatar = str_replace( "class='avatar", "class='photo avatar", get_avatar( $avatar_email, $avatar_size, frumph_random_default_avatar_callback($avatar_email) ) );
In the twentytwelve theme, it’s in the content*.php files, looks something like this:
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ) ); ?>
You modify it to add the 3rd argument which changes the default image that it uses, with my code you also pass the email of the commenter in the function.
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ), frumph_random_default_avatar_callback(get_the_author_meta('user_email')) ); ?>
THEN
Add your images into the theme (or child theme’s) images/avatars/ directory so wp-content/themes/mychildtheme/images/avatars/ directory.
The reason I use get_stylesheet_directory is so that the images are retained in the child theme and if the child theme doesn’t exist the end user can put them in their main theme, but checks child theme first.
– Phil
Basically it removes an extra loop which wasn’t needed.
content-aside.php content.php content-comic.php content-page.php  basically each ‘content type’ has their own php file (which is basically html), this will allow you to modify those ‘post areas’ display look and feel how you want them to in your child theme… basically copy the content- type file over to the child theme and hack away. You can also create other ‘content’ types which are commented out in the functions.php like for images and video’s etc if you want specific looks for your post areas for whatever content type you want.
n/t
IN the post info area, to the left of the title, the thumbnail will now display all mini like, instead of above everything, looks keen.
in the default style I added some ‘look’ to the post info (the header of each post) to denote it’s difference from the rest of the post.
opengraph = facebook – google, etc.
This one is very important to CSS skinners, #column no longer exists and it is now #content, so find-replace inside of your CSS file if you used it. This also paved the way to allow the use of Jetpack’s Infinite scrolling. Which allows people to keep scrolling down the page and new posts will pop up. (along with the post formats change)
NOTE edit the style.css, search for .post-image
.post-content .post-image { float: left; display: inline-block; padding: 3px 3px 0; border: solid 1px #ccc; margin: 4px; } .post-content .post-image img { width: 100px; height: auto; }
Fixes the issue with 3.3 with the post image in the title
IF you have layout-head.php in your child theme, make sure to change the id=”column” to id=”content” inside of that .php file