• Resolved FrankKellyPro

    (@frankkellypro)


    Hi,

    Thanks for a great plug-in,

    I’m struggling a bit to implement an author specific tag-cloud based upon a custom field value.

    I’ve set the field: “profile_author” to “Webmaster”

    then I run the script:

    $pro_auth = get_field( “profile_author” );
    $args = array( “title” => ‘ ‘, “order” => count, “max” => 12, “authors” => $pro_auth );
    do_utcw( $args );

    …but it only shows all fields and not that specific Authors tags.

    I would be grateful if you could help me out on what I’ve done wrong.

    Many thanks,

    //Tommy

    https://www.ads-software.com/plugins/ultimate-tag-cloud-widget/

Viewing 1 replies (of 1 total)
  • Hi Tommy

    The authors configuration value should be an array of IDs of the authors whose posts should affect the cloud.

    You need to find the ID of the author “Webmaster” somehow. If you know how to do that programmatically I would recommend that, otherwise try going to the Users page in the WordPress admin area and edit a user.

    There you will se the ID appear in the URL like this: user_id=21 – the ID in this case is 21.

    So the code would then look something like this:

    $args = array( "title" => ' ', "order" => count, "max" => 12, "authors" => array(21) );
    do_utcw( $args );
Viewing 1 replies (of 1 total)
  • The topic ‘Set author from a custom field…’ is closed to new replies.