I am creating a WordPress plugin that turns widgets into a sidebar in a tab-content area.
Sidebar content currently in the form of output: widget_ title, widget content - widget_ title, widget content
I would like them as output: widget_title, widget_contents, widget_contents < / P>
Here's my sidebar:
register_sidebar (array ('name' = & gt; __ ('tabbed sidebar', 'equin'), 'id' = & gt; ; 'Tab-sidebar', 'Description' = & gt; __ ('', 'Equivalent'), 'first_width ='> & lt; div class = "tab-widget">, 'after_widget '= & Gt;' & lt; / div & gt; & lt; / div & gt; ',' before_title '= & gt; & lt; h5 class = "Tab-title" & gt; ', after_title' => gt; & lt; / h5 & gt; & lt; div class = "tab-content" & gt ;,)); Interface-design can have more flexibility with the title list without being dispersed by the content (and vice versa).
Edit I think I have this: & lt; Div class = "tabbed-headers" & gt; & Lt ;? Php foreach $ widget resonance $ title title count ++; ? & Gt; & Lt; / Div & gt; & Lt; Div class = "tabbed-content" & gt; & Lt ;? Php foreach $ widget resonance $ content content count ++; ? & Gt; & Lt; / Div & gt; Any suggestions on how I can do that would be greatly appreciated!
For the code:
& lt; Div class = "tabbed-headers" & gt; & Lt ;? Php foreach $ widget resonance $ title title count ++; ? & Gt; & Lt; / Div & gt; & Lt; Div class = "tabbed-content" & gt; & Lt ;? Php foreach $ widget resonance $ content content count ++; ? & Gt; & Lt; / Div & gt; Your original php mistake is that you have ; Do not go after $ title and #content after . Then this code should be: & lt; Div class = "tabbed-headers" & gt; & Lt ;? Php foreach $ widget echo $ title; Titlecount ++; ? & Gt; & Lt; / Div & gt; & Lt; Div class = "tabbed-content" & gt; & Lt ;? Php foreach $ widget resonant $ content; Contentcount ++; ? & Gt; & Lt; / Div & gt; But as long as the $ widget , $ title and $ content are you veriables, t Work by WordPress.
No comments:
Post a Comment