Modifying Studiopress Genesis (Agency) theme

efeezy

New member
Oct 5, 2007
5,250
136
0
50
I'm using the child theme Agency for Studiopress Genesis, and I'm trying to figure out how to remove the title from individual pages so I can replace it with a custom image. I have the simplehook plugin, but I'm not sure the best way to do this. Any ideas?
 


Simple hooks will work if you know exactly where you want it.

Otherwise you're looking for the genesis core files>lib>structure> (post.php more than likely, depending on what exactly you're trying to achieve)
 
I'm using the child theme Agency for Studiopress Genesis, and I'm trying to figure out how to remove the title from individual pages so I can replace it with a custom image. I have the simplehook plugin, but I'm not sure the best way to do this. Any ideas?

I don't think it would be in post.php, unless that's a really weird theme the way it handles data

go to page.php in wp-content/themes/agency-whatever/ and you should see something similar to this code (I dont have the theme so i cant show exactly)

look for <h1 class="entry-title"><? php code ?></h1>

Replace the php code/h1 code with your <img> code. if you want a different image for each page though that will be tricky
 
... not trying to be a dick at all, but here's page.php:

Code:
<?php
// For backward compatibility
require_once(PARENT_DIR. '/index.php');
?>
post.php

Code:
<?php

/**
 * Post Title
 */
add_action('genesis_post_title', 'genesis_do_post_title');
function genesis_do_post_title() {
    
   [B] if( is_singular() ) {
        $title = '<h1 class="entry-title">'.  apply_filters('genesis_post_title_text', get_the_title()) .'</h1>'  . "\n";
    }
    
    else {
        $title = '<h2 class="entry-title"><a href="'.  get_permalink() .'" title="'. the_title_attribute('echo=0') .'"  rel="bookmark">'. apply_filters('genesis_post_title_text',  get_the_title()) .'</a></h2>';
    }[/B]
    
    echo apply_filters('genesis_post_title_output', $title) . "\n";
    
}

/**
 * Post Image
 */
This is not a regular theme... it's based off of hooks which is pain in the ass if you ask me, though I do understand the benefit.

As mentioned, this is not the standard post.php file, you will find this in the genesis library.