WordPress.org

Ready to get started?Download WordPress

Forums

CIMY user extra Field (2 posts)

  1. backspace_
    Member
    Posted 2 years ago #

    Im not an expert with php but i dont get this:S

    Whe i do this<?php the_author_ID() ?> i get the value 10

    When i type this

    <?php
    $value = get_cimyFieldValue(10, 'BEDRIJFSNAAM');
    echo cimy_uef_sanitize_content($value);
    ?>
    I get what i want the value of bedrijfsnaam

    <?php
    $value = get_cimyFieldValue(<strong>the_author_ID()</strong>, 'BEDRIJFSNAAM');
    echo cimy_uef_sanitize_content($value);
    ?>
    it gives me the me the value 10 and not the value of bedrijfsnaam:S

    i dont get how this happen:S

  2. vtxyzzy
    Member
    Posted 2 years ago #

    Take out the strong tags. They are interfering with the function call.

    Edit: Spoke too soon. the_author_ID() echoes the author ID, it does not return it for use in the function. Try using this instead:

    <?php
    $value = get_cimyFieldValue(get_the_author_meta('ID'), 'BEDRIJFSNAAM');
    echo cimy_uef_sanitize_content($value);
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags