• Is there a way to specify a header image for a specific category?
    I’m using the Graphene theme.

    Thanks in advance for any help.

    Laura

Viewing 11 replies - 76 through 86 (of 86 total)
  • Thread Starter raindance

    (@raindance)

    It works perfectly! Thanks for creating this flexibility. I really appreciate all of the time and effort you put into this…thank you so much Marventus!

    Hy to all, sorry my lack of knowledge in theme graphene ..
    Im very interested in obtain something like http://juicytravels.com/travel-type/biking-tours/
    i’m beginner..
    I installed a theme in child (from Prasanna), my funcion.php was empty, and when I tried to past the script, it does not work and I see it in the top of the site ..

    I could not figure out where mistake.
    Can you help me please?
    thanks

    Hi Andrea.

    Could you make a pastebin of your entire child functions.php file?
    Also, I haven’t tested this script in a while, so I don’t know if it still works with the latest versions of Graphene and WP. Here is a link to the latest version (1.1).
    Laura, could you confirm if this still works? By the looks of your site, it seems it does, but do let us know just in case. Thanks!

    Cheers!

    Hi Marventus, many thanks for your kindly reply.
    I don’t able to reply your question about my child funcntions php, because it is comoletely blank (emty) in child.

    For child thema i applicate Prasanna methode, which consists in uploda two files (CSS: compilated) and function php (completely EMPTY). PRasanna explain here how to create a child portal, and it is work: http://www.prasannasp.net/graphene-child-theme-template/

    I can suppose (in my ignorabce) that funcion php in a child is tehe same that in the father, but i’d like that Laura tell if is correct or not.
    If my idea is correct, in pastebin you can try my function php ORIGINAL, non t child: http://pastebin.com/X3qEpqyA

    Thanks for your interesting and helping me..

    Basically, what you need to do is paste my script into your child functions.php file. You are going to need to modify the $custom_image_ids Array to customize which categories you would like to show custom header images for. You will find a detailed explanation in the readme.txt file that comes with the script.
    Good luck!

    My Marvenus, thanks for your reply. Problems remains; now my funcions.php file is non emty, but it contains your script. The test of script ios seen in te bottom part of site.. this is first problem
    How is possible that php code is seen in site?
    I dont’t understand..
    give you a paste bin about my php file: http://pastebin.com/2qWreMb6

    Hi, Andrea.

    In your pastebin, you are missing the opneing <?php tag. Your code should start like so:

    <?php
    function custom_header_image($random_image) {

    Also, you need to customize the categories that you will be targeting. Based on your pastebin, you are using the exact same number of categories as the sample $custom_image_ids is.
    Please read the documentation that is shipped with the plugin.

    Cheers!

    Hi Marvenus
    i had inert opening tag, and have removed crashed in child theme php.
    Now i’m studying your documentation and your code.

    I’d like to ask you if there is a simple way to modify your script to realizing a moving (rotation ) effects in header image only in home page.

    This effect will be fantastic, perhaps in Raindance site there isn’t this rotation header image in home page.. cheers
    Andrea

    Hi Andrea.

    I don’t really have the availability to add that functionality right now. However, if you are interested in animations, you can look into the CSS animation property (http://www.w3schools.com/css3/css3_animations.asp) or into jQuery’s (Javascript) .animate() function. There are also many free JS plugins and sliders that support animations and transitions.

    Good luck.

    Hi Marventus, i’m studying your script’s instructions, for customize your code in my site.

    I’d like to ask how to customize my array to use your script, in particular, I did not understand where to put the cat ID, i mean where write the number? id i’d like to crete an HoME PAGE like “HOME PAGE (3) @ *”, where can I write ID number 3? in php function? inb css?

    can you help me?
    Thanks a lot
    Andrea

    Hi Andrea. What you need to do is modify this line:

    $custom_image_ids = array(2,8,28,617);

    with your own category numbers.
    For example: imagine that you have 4 categories and that you wish to display custom images for 2 of those. So, you need to retrieve the category ID for each targeted category and add those IDs as comma-separated values. Assuming the IDs of those two categories were 57 and 324, your $custom_image_ids definition should look like this:

    $custom_image_ids = array(57,324);

    Remember to follow the instructions carefully regarding parent and child categories.
    Cheers!

Viewing 11 replies - 76 through 86 (of 86 total)
  • The topic ‘Specific header image for specific category?’ is closed to new replies.