0

Is there is a way to call a single hook via do_action, attaching four different functions with the same priority number (wrapped in divs) calling items (get_title get_thumbnail etc) and set position: absolute for each so as to begin positioning for each element at 0px, 0px ? Each element will have a stacking z-index.

I'm returned results for display using flex.

Thanks in advance for help and feedback.

Research link, closest answer info found:

https://wordpress.stackexchange.com/questions/119930/which-hook-callback-has-priority-if-both-plugin-and-theme-use-the-same-hook

5
  • 1
    Hi. Your question is a bit unclear to me... Can you please write a simple example (even with syntax errors, just to know what's on your mind)? – Jack Johansson Jun 10 '17 at 15:50
  • 1
    Adding action to the same hook at same priority doesn't give what you want i.e stacking elements one over other and is also unnecessary as far as i can draw conclusion from your question. You can use css and js to load elements with 0px height and 0px width stacked in layers using z index. Your question is quite unclear you should post code snippet as @JackJohansson suggested. – Bikash Waiba Jun 10 '17 at 17:07
  • 1
    functions attached to the same hook with the same priority are called in the order they are attached. to control the order, change the priority. – inarilo Jun 10 '17 at 17:27
  • Thanks everyone for your replies. Was not sure how to word question as it's regarding creating custom query, woocommerce page. I wish there was a codepen with wordpress playground online. Extended question below. Thanks for reading and any feedback. – acctindie Jun 11 '17 at 12:51
  • I'm trying to build my own shop page layout using flexbox with nesting flex containers, have a grid like layout, title, price, add to cart wording all within the boundary box of the thumbnail. Question: Is there is a way to call a single hook via do_action, attaching four different functions with the same priority number (wrapped in divs) calling items (get_title get_thumbnail etc) and set beginning positioning for each element at 0px, 0px ? My idea is to attach them all to the same hook, position: absolute, give each item a stacking order z-index, position items using flex within box – acctindie Jun 11 '17 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.