Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Add more not saving correctly #7845
    Juan
    Participant

    I no longer have the code. I’ve solved it in another way. Thanks anyway @Steve!

    in reply to: Filter by leanguage #7723
    Juan
    Participant

    Ok, i found the answer here:
    https://wpml.org/forums/topic/get_posts-by-language/
    and also here:
    https://wpml.org/forums/topic/get_posts-function-suppress_filters0-not-working/

    I have to add ‘suppress_filters’ => 0 as an argument to the get_posts() query.

    thanks anyway. I hope this helps somebody else.

    đŸ™‚

    in reply to: Creating dynamic select #7665
    Juan
    Participant

    thanks Jason!

    in reply to: Creating dynamic select #7662
    Juan
    Participant

    Hi @Jason!

    is it posible to add a default first choice? something like: “Select one post…”

    thanks!

    
      piklist('field', array(
      'type'      => 'select',
      'field'     => 'staff_member',
      'label'     => 'Add Staff Members',
      'columns'   => 12,
      'add_more'  => true,
      'choices'   => piklist(get_posts(array(
      	'none' => 'Select one post…' ,
        'post_type'   => 'staff',
        'numberposts' => -1
      )), array('ID', 'post_title'))
    ));
    in reply to: Default Editor content repeating on second Piklist Editor #7602
    Juan
    Participant

    this is the code i’m using:

    
    <?php
    /*
    Title: Page Section
    Post Type: post, page, portfolio
    Meta box: true
    Order: 1
    */
     
    piklist('field', array(
    	'type' => 'editor',
    	'field' => 'post_content', // This is the field name of the WordPress default editor
    	'scope' => 'post', // Save to the wp_post table
    	'label' => 'Post Content',
    	'template' => 'field', // Only display the field not the label
    	'add_more' => true,
    	'options' => array( // Pass any option that is accepted by wp_editor()
    	  'wpautop' => true,
    	  'media_buttons' => true,
    	  'shortcode_buttons' => true,
    	  'teeny' => false,
    	  'dfw' => false,
    	  'quicktags' => true,
    	  'drag_drop_upload' => true,
    	  'tinymce' => array(
    	    'resize' => false,
    	    'wp_autoresize_on' => true
    	  )
    	)
    ));
Viewing 5 posts - 1 through 5 (of 5 total)