Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1236198
    mariomillions
    Participant

    On my tag page: http://www.celebratingdiversity.tech/article/iot-projects/

    I’d like to display advanced custom fields and the description field. Which template do i need to modify? I have a child them installed and activated.

    #1236406
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! If you want to display a custom content in the tag archive, you can simply use add_action() function. For example, please add the following code in your child theme’s functions.php file

    function add_custom_content() { ?>
      <div class="custom-contents">
        <p>I am a custom content. Please change me or add your custom content here.</p>
      </div>
    <?php }
    add_action('x_after_the_content_end', 'add_custom_content');

    You can use any of these locations:
    – Before the content begins = x_before_the_content_begin
    – After the content begin = x_after_the_content_begin
    – Before the content ends = x_before_the_content_end
    – After the content ends = x_after_the_content_end

    Hope this make sense.

    #1236600
    mariomillions
    Participant

    I added this code;

    function add_custom_content() { ?>
    <?php the_field(‘summary’); ?>
    <?php }
    add_action(‘x_before_the_content_begin’, ‘add_custom_content’);

    Nothing happened to my theme; is there another option? Is this not compatible with advanced custom fields?

    #1236602
    mariomillions
    Participant

    To clarify this code did add content but only on post pages. Is there a way to specify tag / archive pages?

    #1236614
    mariomillions
    Participant

    Is there an index php that i can modify? I have tried to manipulate the function every way and nothing works.

    #1236635
    Christian
    Moderator

    Hey Mario,

    This would require custom development which is outside the scope of our support. Please see https://community.theme.co/kb/customization-best-practices/ for X customization guide or you might want to contact our trusted partners who caters X setup and customization needs. Please see https://community.theme.co/custom-development/

    Thank you for understanding.

    #1236654
    mariomillions
    Participant

    Can you tell me if there is an archive template? What is the name of it?

    #1236679
    Thai
    Moderator

    Hi There,

    Please take a look at this find: x/framework/views/icon/wp-index.php

    Hope it helps 🙂

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