Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1053559
    Pyanfar
    Participant

    I’ve been through examples in other posts (for example https://community.theme.co/forums/topic/portfolio-items-link-straight-through-to-live-website/ ), and I can’t figure out why this isn’t working. If anyone can give it a quick glance maybe you can spot an obvious error?

    On a portfolio-item I’ve created custom field ‘pub-year’ and provided data of “2016”. Now I want to see that data on the portfolio-item output in response to function <?php boom_pub_year(); ?>

    I have created the function in my child theme functions.php
    <?php
    // Get custom meta pub-year and assign icon
    // =============================================================================

    if ( ! function_exists( ‘boom_pub_year’ ) ) :
    function boom_pub_year() {

    $terms = get_post_meta( get_the_ID(), ‘pub-year’ );

    echo ‘<p class=”x-icons”>’;
    foreach( $terms as $term ) {
    echo ‘<class=”x-icon”><i class=”x-icon-copyright” data-x-icon=”  “></i>’ . $term . ”;
    };
    echo ‘</p>’;

    }
    endif;
    ?>

    #1053894
    Paul R
    Moderator

    Hi,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1059218
    Pyanfar
    Participant

    I have found my mistake, so you can close this one. Thank you!

    #1059223
    Nabeel A
    Moderator

    Glad you’ve sorted it out.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1053559 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>