It looks like you're new here. If you want to get involved, click one of these buttons!
Welcome to the new Community Forums!
Existing Users: As an additional security precaution measure, please reset your password and login with your new password given to you via your email.
New Users: You are required to link with either your Facebook, Twitter, Google or OpenID account to register.
If you have any other issues, please send the administrator an email at support [ a t ] arrastheme.com/* Theme Name: Child Theme of Arras Theme Theme URI: http://www.arrastheme.com/ Description: Child theme for the Arras Theme for WordPress Author: Creature Author URI: http://www.arrastheme.com/ Template: arras-theme Version: 1.0 . For more information on how to create and use child themes: http://codex.wordpress.org/Child_Themes Any CSS code written below will override any existing declarations from the theme itself. . */Change this part into anything you like
Theme Name: Child Theme of Arras Theme Theme URI: http://www.arrastheme.com/ Description: Child theme for the Arras Theme for WordPress Author: Creature Author URI: http://www.arrastheme.com/
/* Theme Name: Kuro Theme URI: http://www.kuro.ex Description: Black Child Theme for Arras Author: Giovanni / Extatix Author URI: http://www.animeblog.nl Template: arras-theme Version: 1.0 . For more information on how to create and use child themes: http://codex.wordpress.org/Child_Themes Any CSS code written below will override any existing declarations from the theme itself. . */

#wrapper { background: #000; }
to the stylesheet./* Theme Name: Kuro Theme URI: http://www.kuro.ex Description: Black Child Theme for Arras Author: Giovanni / Extatix Author URI: http://www.animeblog.nl Template: arras-theme Version: 1.0 . For more information on how to create and use child themes: http://codex.wordpress.org/Child_Themes Any CSS code written below will override any existing declarations from the theme itself. . */ #wrapper { background: #000; }Which results in:

</div><!-- #container -->
<?php wp_reset_query() ?>
<div id="primary" class="aside main-aside sidebar">
<?php arras_above_sidebar() ?>
<ul class="xoxo">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Primary Sidebar') ) : ?>
<li class="widgetcontainer clearfix">
etc. etc.
/** * Called before the main sidebar * @since 1.2.1 */ function arras_above_sidebar() { do_action('arras_above_sidebar'); }
<?php // We're going to add a few functions here ?>
function say_hi() {
echo 'hi';
}
add_action('arras_above_sidebar','say_hi');

function say_hi_again() {
if (is_home()) {
echo 'hi';
}
}
add_action('arras_above_sidebar','say_hi_again');


function say_hi_again() {
if (is_home()) { ?>
<div class="greet">
hi
</div>
<?php }
}
add_action('arras_above_sidebar','say_hi_again');

.greet { color: #000; background: #ff0000; font-size: 16px; font-weight: bold }
(add this to the style.css of the child theme!)
<?php
// We're going to add a few functions here
function say_hi_again() {
if (is_home()) { ?>
<div class="greet">
hi
</div>
<?php }
}
add_action('arras_above_sidebar','say_hi_again');
?>
function put_ad_in_sidebar() {
echo '<img src="http://i45.tinypic.com/9hlvma.jpg" />';
}
add_action('arras_above_sidebar', 'put_ad_in_sidebar');

<?php
// We're going to add a few functions here
function say_hi_again() {
if (is_home()) { ?>
<div class="greet">
hi
</div>
<?php }
}
add_action('arras_above_sidebar','say_hi_again', 2);
function put_ad_in_sidebar() {
echo '<img src="http://i45.tinypic.com/9hlvma.jpg" />';
}
add_action('arras_above_sidebar', 'put_ad_in_sidebar', 1);
?>

function arras_postheader() {
global $post, $id;
if ( is_single() ) {
if ( is_attachment() ) $postheader .= '<h1 class="entry-title">' . get_the_title() . ' [<a href="' . get_permalink($post->post_parent) . '" rev="attachment">' . get_the_title($post->post_parent) . '</a>]</h1>';
else $postheader = '<h1 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">' . get_the_title() . '</a></h1>';
} else {
if ( is_attachment() ) $postheader .= '<h2 class="entry-title">' . get_the_title() . ' [<a href="' . get_permalink($post->post_parent) . '" rev="attachment">' . get_the_title($post->post_parent) . '</a>]</h2>';
else $postheader = '<h2 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">' . get_the_title() . '</a></h2>';
}
if ( !is_page() ) {
$postheader .= '<div class="entry-info">';
if ( arras_get_option('post_author') ) {
$postheader .= sprintf( __('<span class="entry-author">By %s</span>', 'arras'), '<address class="author vcard">' . get_the_author() . '</address>' );
}
if ( arras_get_option('post_date') ) {
$postheader .= ' – <abbr class="published" title="' . get_the_time('c') . '">' . get_the_time(get_option('date_format')) . '</abbr>';
}
if (current_user_can('edit_post')) {
$postheader .= '<a class="post-edit-link" href="' . get_edit_post_link($id) . '" title="' . __('Edit Post', 'arras') . '">' . __('(Edit Post)', 'arras') . '</a>';
}
if ( arras_get_option('post_cats') ) {
$post_cats = array();
$cats = get_the_category();
foreach ($cats as $c) $post_cats[] = '<a href="' . get_category_link($c->cat_ID) . '">' . $c->cat_name . '</a>';
$postheader .= sprintf( __('<span class="entry-cat"><strong>Posted in: </strong>%s</span>', 'arras'), implode(', ', $post_cats) );
}
$postheader .= '</div>';
}
if ( arras_get_option('single_thumbs') ) {
$postheader .= '<div class="entry-photo">' . arras_get_thumbnail('featured-slideshow-thumb') . '</div>';
}
echo apply_filters('arras_postheader', $postheader);
}
function change_header() {
echo 'This is my header';
}
add_filter('arras_postheader', 'change_header');

<?php get_header(); ?>
<div id="content" class="section">
<?php arras_above_content() ?>
<?php
if ( arras_get_option('single_meta_pos') == 'bottom' ) add_filter('arras_postfooter', 'arras_postmeta');
else add_filter('arras_postheader', 'arras_postmeta');
?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php arras_above_post() ?>
<div id="post-<?php the_ID() ?>" <?php arras_single_post_class() ?>>
<?php arras_postheader() ?>
<div class="entry-content">
<?php the_content( __('<p>Read the rest of this entry »</p>', 'arras') ); ?>
<?php wp_link_pages(array('before' => __('<p><strong>Pages:</strong> ', 'arras'),
'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
<!-- <?php trackback_rdf() ?> -->
<?php arras_postfooter() ?>
<?php if ( arras_get_option('display_author') ) : ?>
<div class="about-author clearfix">
<h4><?php _e('About the Author', 'arras') ?></h4>
<?php echo get_avatar(get_the_author_meta('ID'), 48); ?>
<?php the_author_meta('description'); ?>
</div>
<?php endif; ?>
</div>
<?php arras_below_post() ?>
<a name="comments"></a>
<?php comments_template('', true); ?>
<?php arras_below_comments() ?>
<?php endwhile; else: ?>
<?php arras_post_notfound() ?>
<?php endif; ?>
<?php arras_below_content() ?>
</div><!-- #content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php arras_postheader() ?>
<div class="my-text"> In the part about filters I killed my postheader</div>
<div class="entry-content">
I've placed it between the existing stuff and added a div for some custom styling.
.my-text { font-size: 14px; font-weight: bold; color: #800517; }
Result:
</div>
<?php wp_list_categories() ?>
<?php arras_below_post() ?>


function catlist_beneath_author() {
wp_list_categories();
}
add_action('arras_below_post', 'catlist_beneath_author');
I've 'hooked' this action to the 'hook' arras_below_post() which is located right underneath the wp_list_categories() I added in the Templates part.
<?php
function my_first_hook() {
do_action('my_first_hook');
}
?>
require_once 'actions.php';
<?php arras_postfooter() ?>
<?php my_first_hook() ?>
<?php if ( arras_get_option('display_author') ) : ?>
This middle part is now added to single.php.function catlist_above_author() {
wp_list_categories();
}
add_action('my_first_hook', 'catlist_above_author');
See, I've hooked it to my_first_hook().
function my_head($postheader) {
echo $postheader;
$var = get_the_term_list( $post->ID, 'studio',' ', ', ', '' );
if (!is_page() && !empty($var)) {
echo '<strong>Studio:</strong>' . $var . ' ';
}
$vartoo = get_the_term_list( $post->ID, 'jaar',' ', ', ', '' );
if (!is_page() && !empty($vartoo)) {
echo '<strong>Jaar:</strong>' . $vartoo;
}
}
add_filter('arras_postheader', 'my_head');

<div id="content" class="section"> <?php arras_above_content() ?> <?php is_tag(); if ( have_posts() ) : ?>
<div id="content" class="section">
<?php arras_above_content() ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Before Archive') ) : ?>
<!-- optional default content to show when no widget is in this area -->
<?php endif; ?>
<?php is_tag(); if ( have_posts() ) : ?>
register_sidebar( array(
'name' => 'Before Archive',
'after_widget' => '</div>',
'before_title' => '<h5 class="widgettitle">',
'after_title' => '</h5><div class="widgetcontent">'
) );
register_sidebar( array(
'name' => 'Test',
'after_widget' => '</div>',
'before_title' => '<h5 class="widgettitle">',
'after_title' => '</h5><div class="widgetcontent">'
) );
function add_my_sidebar() { ?>
<?php if (is_archive()) { ?>
<div class="my-sidebar">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Test') ) : ?>
<?php endif; ?>
</div>
<?php }
}
add_action('arras_above_content', 'add_my_sidebar');