ThemeShaper Forums » Thematic

[closed]

custom header for single.php

(9 posts)
  • Started 10 years ago by giantbonsai
  • Latest reply from giantbonsai
  • This topic is resolved
  1. giantbonsai
    Member

    I want to make a custom header for when you click "more inside" or the permalink for a single post.

    I had used this advice successfully to create a custom header for the blog, and that worked great.

    I had hoped I could use some modification of the same advice to make a different custom header for the single post page using the single.php file, but so far I am not getting anywhere.

    How should I approach this problem?

    Posted 10 years ago #
  2. giantbonsai
    Member

    Still looking for help on this one - I'm stuck!

    Posted 10 years ago #
  3. http://wordpress.org/extend/plugins/custom-post-template/

    but the template must be in thematic theme folder.

    Juan
    http://evoratec.com

    Posted 10 years ago #
  4. http://wordpress.org/extend/plugins/custom-post-template/

    but the template must be in thematic theme folder.

    Juan
    http://evoratec.com

    Posted 10 years ago #
  5. giantbonsai
    Member

    Hi Juan, I appreciate your pointing out this plug in to me, but I still cannot figure out how to implement my custom header.

    My custom header consists of some css styles, and a few lines of HTML mark-up.

    When I added these styles to my style.css, and my html to this new custom post template plug in I don't get any of the post. The browser just displays my small amount of markup completely unstyled, and none of the rest of the post at all.

    I know the plug-in works, because the new template title shows up in the drop down menu that the plug-in added to my edit post dash.

    Can you, or someone offer some further advice as to where to put my custom css and custom html so that my new header (which I have tested as a 'stand-alone' page and it works fine) works on these inside, single.php pages?

    Thanks so much!

    Posted 10 years ago #
  6. Can you post the code both php and css that you are using and possibly provide a link?

    Posted 10 years ago #
  7. giantbonsai
    Member

    Hi-
    This is the link to the blog theme I am working on: http://embassylane.com/notes/.

    Using the advice that I linked to in my first post of this thread (http://forums.themeshaper.com/topic/modify-header-output-with-functionsphp), I successfully modified my functions file to insert the custom header that you see in the link.

    What I am now trying to do is to insert this different custom header: http://embassylane.com/newtest/ into the "more inside" or what I understand to be the "single.php" file. (css is available just through view source, it's not an external style sheet)

    The php code is exactly my problem . I have no idea what php code to put where to get this different custom heading to show when you click the "more inside" link of a typical post. Nothing that I have tried has worked (which were mostly variations of the original advice added to a single.php file) I don't know if a plug in is the way to do this, or if simply customizing a single.php file is a simpler or easier way to do this.

    I appreciate any advice offered - let me know if you are still missing information from me.....

    Posted 10 years ago #
  8. giantbonsai
    Member

    Anyone? It seems like a lot of blogs do this.... but I'm still stuck....Help!!!

    Posted 10 years ago #
  9. giantbonsai
    Member

    Hi, I really needed to get my question answered, so I went over to WP Questions and got prompt and excellent help from one of their experts named Buzu B. I asked permission from WP Questions, and they allowed me to repost the answer here.

    Using a paid service like WP Questions is definitely not for everyone - I really hesitated on principal myself - but if you are in a crunch and need expert help fast, it's great to have an affordable option like this to turn to.

    That said, I would again like to say that I am grateful to Moderators such as em hr and all the other good folks who devote their time, knowledge and attention to making this an excellent forum. (which is why I am taking the time and consideration to re-post an answer I paid for - in the hopes it will help others as I have been helped here).

    Anyway, here was the solution to my problem - Thanks again Buzu B:

    // Take Away Default Thematic Header

    function new_header() {

    remove_action('thematic_header','thematic_blogtitle',3);

    remove_action('thematic_header','thematic_blogdescription',5);

    remove_action('thematic_header','thematic_access',9);

    }

    add_action('init', 'new_header');

    // Insert Custom Header

    function custom_header() { ?>

    if(is_single()){

    //Here, in this space, I inserted my HTML for the "more inside" custom header. My css is in my style.css file

    }else{

    //This space was where I inserted my HTML for the main page custom header.

    }

    }

    <?php }

    add_action('thematic_header','custom_header');

    add_action('thematic_header','thematic_access');

    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.