Forum Replies Created
-
AuthorPosts
-
bicho44MemberHi @jason!
Thanks for your input.I just need the way to show a list of post in a metabox,and if there’s a piklist function to do it
June 8, 2016 at 1:30 pm in reply to: Function to programatically save add-more field values in settings? #6632
bicho44MemberI think
1) You have to take a look at the database, to see how the add-more’s are storaged.
2) Then make sure your adding the prepopulated info in the same way. I cannot remember but i think is a JSON array in one database field.
3) Also (a little more work) you can make a xml with the prepopulated info and import them with the wordpress import. But i think is better the other wayBest Regards
bicho44Member@steve:
Thanks, i was thinking in a similar solution, but trying to piklistplicate (replicate the piklist way 😉 ) the template page dropdown with a show / hide option.
But your solution is nice and much more simplier.
Thanks again
bicho44MemberThanks, @steve works like a charm.
One nice addition will be the Page Template dropdown work’s like a show / hide field so you dont have to save first the page to the field be showed 😀
I know im a pusher, im sorry 😛
Regards and really thanks
bicho44Member@steve – There something wrong with the workflow tutorial
The code is not clear or is something wrong with the css for the code display.I attach a image to ilustrate.
Also if is no too much to ask a step by step will be nice 😀 Because i have the same problem every one here, when i try to separate sections in my settings page.
Best regards
Attachments:
You must be logged in to view attached files.
bicho44Member@steve
I send you a picture, but is really simple, when i select especific template page in page attributes, that page need a attribute, in this case a shortcode, so i need to show the text field.
I manage to extend the page attribute metabox and put in there a show / hide radio button to show the text field, but that makes the shorcode field avaliable to a templates where is no need it.Regards and thanks.
Attachments:
You must be logged in to view attached files.April 22, 2016 at 11:57 am in reply to: Piklist v0.9.4.29 & v0.9.4.30 won't install on WordPress v4.4.2 & 4.5 #6342
bicho44MemberHi:
When i have this problems, the solution i found is to check the PHP version,try to update it to the last 5.x version and maybe you can use piklist.
I hope this help.
bicho44MemberHi, With the trunk version you can extend the metabox anyway you want.
I don have the mechanics, but the plugin examples are pretty simple to implement.
I hope this help you
January 6, 2016 at 10:41 am in reply to: show_admin_column & list_table_filter – apply to custom post meta fields #5505
bicho44MemberRight Now you have to use the WordPress Way or if you like there’s a plug-in called Admin Columns The pro version is a little better than the free one, but the free works OK.
bicho44MemberHI Steve:
I was a little busy, but i figure out, after you ask me about the
get_terms()function.And this is the code I made, is not pretty but works, je.
$buscadores = $settings['buscarxcategorias']; foreach ($buscadores as $id => $value) { //echo $value; /* Obtengo la data de cada categorÃa */ $categoria = get_taxonomy($value); if ($categoria) { // piklist::pre($categoria); $catname= remove_accents ( strtolower($categoria->labels->name)); //piklist::pre($categoria); /* * Para saber el Nombre en Singular * $categoria->labels->name * * El valor debe ser url/cat/slug */ $url = esc_url( home_url( '/')); $terms = get_terms($value, array('hide_empty' => false)); /** * Here I piece together the url to send the dropdown. * Not pretty but works. */ $menu=array(); foreach ($terms as $i => $v){ $menu[$url.$catname.'/'.$v->slug] = $v->name; } /* end URL glueing :D */ // Here the piklist part piklist('field', array( 'type' => 'select' , 'scope' => 'taxonomy' , 'field' => $catname , 'label' => $categoria->labels->name.' de Productos' , 'columns' => '9' , 'choices' => array('' => 'Seleccione para buscar') + $menu // Array with the links ,'attributes' => array( 'onchange' => "window.document.location.href=this.options[this.selectedIndex].value;" ) ) ); } }If anyone have a better way, please tell me, but for now its working, Yipieee!!!
bicho44MemberYeah, the
get_terms()works, and theslugis published, but i need a little more than theslugi need almost the full url in that placeHow can i mix thing in that array? Im trying to use piklist all the way, lol 😀
Again Thanks in advance.
bicho44MemberIts dosent work either way…
Sorry if i wasnt clear.
Thanks in adavnce, im still trying
bicho44MemberOf course im using pretty permalinks 😀
But, the form with get, do not use it, i was trying to change that, and then i give u and ask for help 😀
This is my front end code, right now (im not using piklist here, because it wasn’t working)
Also i need the form tag. is my second try 😀if ($categoria) { // piklist::pre($categoria); $catname= strtolower($categoria->labels->name) ?> <form id="<?php echo $catname; ?>-select" class="<?php echo $catname; ?>-select" action="<?php echo esc_url( home_url( '/productos/') ); ?>" method="get"> <?php $args = array( 'show_option_none' => __( 'Seleccione para Buscar', 'imgd' ), 'show_count' => 0, 'orderby' => 'name', 'name' => $catname, 'echo' => 0, 'value_field' => 'slug', 'taxonomy' => $categoria->name, ); ?> <?php $select = wp_dropdown_categories( $args ); ?> <?php $replace = "<select$1 onchange='return this.form.submit()'>"; ?> <?php $select = preg_replace( '#<select([^>]*)>#', $replace, $select ); ?> <h4><?php echo $categoria->labels->name; ?> de Productos</h4> <?php echo $select; ?> <noscript> <input type="submit" value="Buscar" class="btn btn-success"/> </noscript> </form> <?php } ?>The form send a get request, and because of the `’return this.form.submit()’ send the ‘name’ arg as variable with the ‘slug’ as value to search.
As i said i need to send a get request with the form of the taxonomies Ex: /productos/linea/GastroenterologÃa but i dont know how.
Also i wanna use the piklist way, but the dropdown in the widget, dont have the form tag,
PS: I have 3 dropdowns in the widget at the same time, each for every kind of taxonomy.Attachments:
You must be logged in to view attached files.
bicho44MemberThaks, amazing
bicho44MemberNice, Thanks
-
AuthorPosts