Support

Account

Home Forums Search Search Results for 'q'

Search Results for 'q'

reply

  • Hello Elliot

    Here is my code from the function.php
    function create_taxonomies() {
    // Add new taxonomy, make it hierarchical (like categories)
    $labels = array(
    ‘name’ => __( ‘Tøjer’ ),
    ‘singular_name’ => __( ‘Tøj’ ),
    );

    $args = array(
    ‘hierarchical’ => true,
    ‘labels’ => $labels,
    ‘show_ui’ => true,
    ‘show_admin_column’ => true,
    ‘query_var’ => true,
    ‘rewrite’ => array( ‘slug’ => ‘toj’ ),
    );

    register_taxonomy( ‘toj’, array( ‘attachment’ ), $args );
    }
    And an image how it looks in media tab and an image how it looks i the gallery edit media popup
    Hope it helps
    Thanks

  • Hi @fernandoalfaweb

    when I put the method create_field ($ field) I can save just one input field
    – What do you mean? The create_field will render 1 field. What code are you using, what is the result, what are you expecting, what is going wrong?

    how do I save multiple vampos INPUT and then fetch the values ​​of the fields to update?
    – Sorry, I don’t understand this question

    Thanks
    E

  • Hi @gleenk

    Thanks for the link. I’ll have a read over it, but from what I can see, I don’t think ACF can provide a simple API interface for this.

    This is due to the simple nature of the WP_Query object and the meta_query param. Basically, WP only allows for a simple 1 value match, but doesn’t allow you to do much else.

    Custom ordering based on a sub field relationship is just too custom to wrap up into the core. You will need to follow the code provided to re design the array, then sort it.

    If you can think of an easy way to package it into the core, I would love to hear your thoughts.

    Thanks
    E

  • Hi @silverdarling

    When working with sub fields, you will need to use the approach shown in the http://www.advancedcustomfields.com/resources/tutorials/querying-the-database-for-repeater-sub-field-values/ tutorial.

    This is because the field_name saved in the dataabse requires a LIKE lookup due to the changing row number in each name.

    Hope that makes sense mate.

    Thanks
    E

  • Hi @MatsKruger

    Can you post a screenshot of the fieldgroup showing the field in question? What field type is it?

    Thanks
    E

  • Hi @charlie

    Thanks for the feedback. I’ll have a think about how I can add in a simple UI to customize the WP_Query args.

    Thanks
    E

  • I see two ways of doing this:
    1. Rather than using PHP to write directly to CSS files (which could cause cache issues), you could generate separate <style> tags for the media rules and insert these in the <head>. For example:

    <style media="screen and (max-width: 800px)">
    // CSS
    </style>

    2. You could create a PHP script to dynamically create a concatenated CSS file. Chris Coyer’s site WP-Mix has a good code snippet to get you started: http://wp-mix.com/combine-compress-css-files-php/

  • working now thanks.

    Using ACF functions within get_posts (and maybe all functions?) means there has to be an explicit post ID passed to the ACF functions, so above works if $post->ID added

    eg

    if(get_field('values_and_outcomes', $post->ID))
    
    while(has_sub_field('values_and_outcomes', $post->ID))
    
    get_sub_field($fieldname, $post->ID) 

    etc

  • Temporary solution:

    add_action( 'admin_init', 'wpuxss_admin_scripts' );
    function wpuxss_admin_scripts() 
    {	
    	global $pagenow;
    	
    	if (( $pagenow == 'admin.php' ) && ($_GET['page'] == 'acf-options') ) 
    	{		
    		wp_enqueue_script( 'wplink', home_url('/wp-includes/js/wplink.js') );
    		wp_enqueue_script( 'popup', home_url('/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.js') );	
    	}
    }
  • This:

    $other_page = 'user_' . $current_user->ID;
    var_dump($other_page);
    $values = get_field('favourite_movie', $other_page);
    var_dump($values);

    Gave me this:

    string(6) "user_3" bool(false)

  • @albox7 There is no settings page for the Flex Content Field. It’s just another field option here: http://d.pr/i/ozaq

    Also note that if you need to add a new layout, you add it here: http://d.pr/i/FIPU took me a few to figure that out.

  • Good Day, I will summarize, I am developing a PLUGIN for the ACF, when I put the method create_field ($ field) I can save just one input field, how do I save multiple vampos INPUT and then fetch the values ​​of the fields to update?

  • @elliot

    This works very well!

    add_action("admin_menu", "setup_menu");  
    function setup_menu() {  
    add_menu_page('Page Title', 'Title', 'manage_options', 'acf-acf-page-slug', 'some_function');
    }

    Is there a way to hide options subpage? I tried with:

    add_action( 'admin_menu', 'remove_menus', 999 );
    function remove_menus() {
    	remove_submenu_page( 'admin.php', 'acf-acf-page-slug' );
    }

    but no luck

  • Happy that it works now, that’s something you would have to ask Elliot. I’m just a coder how loves this plugin and therefore I try to help out in the forum ;-).

    Here is the link to the Feature Request page: http://support.advancedcustomfields.com/forums/forum/feature-requests/

  • Thanks for replying, I have a problem with AJAX to interact with field of type CHOICE ACF, created the plugin for ACF but in time to interact with AJAX and JSON it’s a 500 error (Internal Server Error)

  • I look in the code source page and the order seems right :

    <ul>
    <li>
    <a class="fancybox" href="http://localhost:8888/moyat/wp-content/uploads/2013/07/MM01.jpg" rel="marianne" >
    <a class="fancybox" href="http://localhost:8888/moyat/wp-content/uploads/2013/07/MM02.jpg" rel="marianne" >
    <img src="http://localhost:8888/moyat/wp-content/uploads/2013/07/marianne_maion.png" alt="" /></a>
    </li>
    </ul>
    
  • actually one other quick question – using this hook could I also change or add to the error message?

    currently it displays: “Validation Failed. One or more fields below are required.”

    I’d like to add something like – “Your email addresses do not match”

  • awesome – thanks .. I’m able to get this to work.

    because this is triggered on every field my solution is a littly wonky for my specific use case (comparing values of 2 fields) – i had to traverse back up to the field’s parent to look for another field’s value

    I’m wondering if in a future version you could add an additional hook that would be triggered after you loop through each required field so that other explicit validation conditions could be checked

    either way I’ve got something working and I love this plugin!!

  • Hi Elliot,

    I get mails like this:

    A new trackback on the post "Can't edit repeater field, [] operator not supported for strings in repeater.php" is waiting for your approval
    http://support.advancedcustomfields.com/forums/topic/cant-edit-repeater-field-operator-not-supported-for-strings-in-repeater-php/
    
    Website : moncler marseille (IP: 116.21.64.55 , 116.21.64.55)
    URL    : http://duodoune-moncler-prix.ommf.net
    Trackback excerpt: 
    <strong>moncler marseille...</strong>
    
    Hi there, i consider i discovered you frequented my very own site as a result i stumbled on ???return the particular favor????.I'm attempting to discover things to improve my individual world wide web website!I guess the alright to use a quantity of y...
    
    Approve it: http://support.advancedcustomfields.com-admin/comment.php?action=approve&c=122
    Trash it: http://support.advancedcustomfields.com-admin/comment.php?action=trash&c=122
    Spam it: http://support.advancedcustomfields.com-admin/comment.php?action=spam&c=122
    Currently 117 comments are waiting for approval. Please visit the moderation panel:
    http://support.advancedcustomfields.com-admin/edit-comments.php?comment_status=moderated

    This “Can't edit repeater field, [] operator not supported for strings in repeater.php” is my support topic here. Linkspammers are trying to create a trackback/pingback on their spamsite and I am asked to approve it so that it can be placed in this older topic, where it is supposed to link to their site, raise pagerank etc.

    You probably have “Allow linknotifications from other blogs (pingbacks and trackbacks) checked?

    (I messed up the URL of the spammer,so that it does not work)

  • filter the list of pages that users can select from by parent – this was exactly the feature I was going to request too!

    I understand @elliot you’ve indicated how this could be done, but a way to do this through the UI would be lovely.

  • Hi @Geoff

    Thanks for the feedback. Post template is a plugin, not a native part of WP.
    That said, someone has written location rules for post_type.

    A quick google search will reveal the github url for it.

    Thanks
    E

  • Hi @rlocke

    I think the issue is that the value ‘Cherry’ is not correct. ACF saves the term ID as the value, not the term name.

    Changing this to the ID should work.

    You can check your wp_postmeta for clarification on the value that is actually saved!

    Thanks
    E

  • Hi @silverdarling

    Your code looks fine to me. Have you attempted to debug it to find out why ‘it isnt working’?

    Thanks
    E

  • Hi @marindee

    This sounds like a general ‘how to’ WP theme dev question and is not really related to an issue or bug with ACF.

    I am unable to help out with these kinds of questions due to my workload. If you have any issues with specific bugs / functions, let me know.

    Thanks
    E

Viewing 25 results - 20,401 through 20,425 (of 21,337 total)