Posts (List) Element to external website

Hi!

I am using X and I would like to use the Posts (List) Element to show recent posts. My idea is just to show the picture, headline, date, excerpt and then information source.

So ,my questions:

  1. how can I show dynamically the field “information source”? should I create like a tag or a field?

  2. Is it possible that the element links to an external website instead of to the internal post site?

Thanks!
Oscar

Hello Oscar,

Thanks for writing to us.

You can display the value of the field by using our dynamic content. It not possible to create fields like tag. It would require custom develeopemt. I would suggest you contact a developer who can assists you with your concern. Please note that we don’t provide custom development support. It is out of the support scope.

Alternatively, you can add a custom meta box for the post to add an additional post contant that can be easily accessed by dynamic content.
Front-Page-Content-X (2)

To add a custom meta box you can use our bundled plugin called ACF PRO.

For the external post link, you can select the post format as Link and then you can ad the external link on the “The Link” post meta box.

Hope it helps
Thanks for understanding

Hi, thanks for your reply! one question regarding:

If I do this, when I click the post in the blog, it goes to the permalink of that post. What I want to accomplish is that when I click to the post in the Post List it goes directly to “The Link”, not to the permalink containing the post with the link. :exploding_head:

Hope it makes sense

Hello @opradas,

I am sorry for the confusion, the like format post directly displays the link on the post details page and post list page.

Hello-world-admin

To add the external link or custom link to the post title, would require custom development which is outside the scope of support.

To give you something to start with you can copy the file wp-content\themes\pro\framework\views\{STACK}\content-link.php to your child theme wp-content\themes\pro-child\framework\views\{STACK}\content-link.php

then find the_permalink in the else statement and change it with echo $link.

Go to line number 25 (Example code is bassed on integrity stack and it is only for Post List page or Post Archive Page ) of the file that I mentioned

Replace this code with this code

<div class="x-hgroup center-text">
        <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a></h2>z
        <span class="entry-title-sub"><a href="<?php echo $link; ?>" title="<?php echo esc_attr( sprintf( __( 'Shared link from post: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>" <?php x_output_target_blank(); ?>><?php echo $link; ?></a></span>
      </div>

Replace by this code

      <div class="x-hgroup center-text">
        <?php if($link != ''){ ?>
        <h2 class="entry-title"><a href="<?php echo $link; ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a></h2>
      <?php } else{ ?>
        <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a></h2>
      <?php } ?>
      </div>

Please note that the code provided in the above thread serves as a guide only and is to help you in getting started so implementing it and maintaining the code will be out of our support scope and for further maintenance for new possible versions of the theme that may cause the customization to break, you will need to hire a developer.

Thanks for understanding

Thanks for your help! Much appreciated

You’re welcome. We are delighted to help you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.