Unable to use multiple Action Hooks simultaneously to add different graphics.

  • Mr North Jersey

    #3866

    OK so here is my question.

    I enabled the graphene_header action hook in Header.php I then went to the widgets are and dragged a text box into it and added the following code that pointed to a graphic.

    Kid Patch

    I then in the child theme added the following CSS Code to place the graphic where I wanted.

    .graphene-dynamic-widget {

    padding: 6px;

    position: absolute;

    left: 790px;

    top: 0px;

    }

    It worked fine but I ran into a problem when I tried to repeat the process this time though by enabling the graphene_nav_search Action hook in Header.php. The problem is that I don’t know how to add CSS code to control the placement of the image in the 2nd attempt because it seems .graphene-dynamic-widget is what would have to be edited via CSS code to control the placement of the 2nd graphic which of course would then mess up the placement I have for the 1st one.

    I read here https://forum.graphene-theme.com/graphene-support/how-can-i-add-adsense-to-the-background-image-1#post-5040 where they used the CSS code .header-widget rather than .graphene-dynamic-widget but the only one that worked in allowing me to control the placement of the graphic was .graphene-dynamic-widget.

    Is there a way to use multiple Action Hooks where a custom CSS can be used if one wanted to place a different graphic for each one?

    Here is a link to my site.

    http://shoot-the-ish.com/TRDMBTest/

    Thanks in advance for any help on this.

    Mod

    Kenneth John Odle

    #26330

    You need to target widgets by the unique ID that WordPress assigns to them. Try this tutorial to see how:

    http://blog.kjodle.net/2011/12/05/fun-with-text-widgets-part-two/#Styling_Text_Widgets_by_Targeting_their_ID

    Mr North Jersey

    #26331

    Thanks again that tutorial did the trick. It was very helpful.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Do NOT follow this link or you will be banned from the site!