• I need to use the urls applied to the Post Titles from Page-Links-To script on buttons in a “Check It Out” button grid item for each custom post excerpt displayed in separate grid containing boxes. I’m thinking that those urls should be able to be saved as vars that can be called for the referenced button.

    Does anyone know of anyone who has done this already? Been looking for days online for back-end code snippet to create such a function. Suggestions? Anyone?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter nwsunshine

    (@nwsunshine)

    Read in a blog that if I install this plugin, it will change the permalink, so no var needed. Now to install and test if that is accurate information.

    Thread Starter nwsunshine

    (@nwsunshine)

    Update: It did not change the permalink.

    However, this might help someone. If you add a custom link in advanced custom fields, a php if/else statement within template file will enable a custom button to display either the external link or the internal permalink.

    `
    <div class=”nested-grid-right”> <!– Read More Link External or Internal –>
    <?php $link = get_field(‘link’);
    if( $link ): ?>
    <a class=”button” href=”<?php echo $link; ?>”> See! </a>
    <?php else: ?>
    <a class=”button” href=”<?php the_permalink(); ?>”> See! </a>
    <?php endif; ?>
    </div>
    `

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Variable to Store Created URLS’ is closed to new replies.