Forum Replies Created

Viewing 15 posts - 16 through 30 (of 58 total)
  • Author
    Posts
  • in reply to: Displaying posts in a meta-box filtered by post_meta #6638
    bicho44
    Member

    Hi @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

    bicho44
    Member

    I 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 way

    Best Regards

    in reply to: How to show a field if a template page is selected #6576
    bicho44
    Member

    @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

    in reply to: How to show a field if a template page is selected #6565
    bicho44
    Member

    Thanks, @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

    in reply to: User Workflow Guide Request #6561
    bicho44
    Member

    @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.
    in reply to: How to show a field if a template page is selected #6559
    bicho44
    Member

    @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.
    bicho44
    Member

    Hi:

    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.

    in reply to: There's any way to add a field to existing metabox? #6341
    bicho44
    Member

    Hi, 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

    bicho44
    Member

    Right 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.

    in reply to: Dropdown with onchage part 3 :D #5346
    bicho44
    Member

    HI 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!!!

    in reply to: Dropdown with onchage part 3 :D #5295
    bicho44
    Member

    Yeah, the get_terms()works, and the slug is published, but i need a little more than the slug i need almost the full url in that place

    How can i mix thing in that array? Im trying to use piklist all the way, lol 😀

    Again Thanks in advance.

    in reply to: Dropdown with onchage again #5051
    bicho44
    Member

    Its dosent work either way…

    Sorry if i wasnt clear.

    Thanks in adavnce, im still trying

    in reply to: Dropdown with onchage again #5043
    bicho44
    Member

    Of 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.
    in reply to: Dropdown with onchage #5014
    bicho44
    Member

    Thaks, amazing

    in reply to: What's this? #4950
    bicho44
    Member

    Nice, Thanks

Viewing 15 posts - 16 through 30 (of 58 total)