Jump to content


Photo
- - - - -

Using same hook twice, how to control the design result?


This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1 janpeeters

janpeeters

    Advocate

  • Members

  • 307 posts

Posted 05 January 2011 - 04:18 PM

Hi I've followed the video on 'docs' to bring the search to the header and save space in my menubar. I would also like to place the WPML language selector in that same sector so I thought of using the same hook twice. This gives a strange result, designwise.

Please Login or Register to see this Hidden Content


The result can be seen here:

Please Login or Register to see this Hidden Content



I would love to have both besides each other. I might need more design control over this. How could I achieve this?

Thanks, Jan

Thanks Adam for your tip to use a plugin for latest posts on a static page. This works nicely as you can see.

#2 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 05 January 2011 - 07:10 PM

The result is likely the same but you can include them in the same function for example: (also for more control wrap them in some html so you can use css to position them ` add_action('pagelines_inside_top_branding', 'language_selector'); function language_selector(){?>

#3 janpeeters

janpeeters

    Advocate

  • Members

  • 307 posts

Posted 05 January 2011 - 07:48 PM

Hi Adam,

thanks, that helped quite a lot.
I added the following CSS which puts everything nicely on the right as you can see in the above URL.

Please Login or Register to see this Hidden Content


What I don't succees at is shoving the two together a bit down so that they optically align with the name of my site. I've tried putting a extra DIV around it named search_lang that I float: right, but what happens then is that the two items are placed under eachother. And not anymore nicely besides eachother. Any idea?

Thanks, Jan

#4 janpeeters

janpeeters

    Advocate

  • Members

  • 307 posts

Posted 05 January 2011 - 07:50 PM

By the way and how do you manage to have all your code displayed as code in this forym. For the second time only part if my code is displayed as code although the /code is really after the last bit of code.

#5 arpowers

arpowers

    Founder

  • Administrators
  • 3271 posts

Posted 06 January 2011 - 04:01 AM

Hey Jan, look like you figured out the code piece... use the `backtick` symbols on the tilde key As to your additional improvements, can't understand. Please post screenshots, and if its a new question, post a new thread.