Viewing 1 replies (of 1 total)
  • Thread Starter whiterider12

    (@whiterider12)

    Ok, I got it in few hours. Here is what I am using as a script on my post templates to show the alias links, I am using alias permalinks for pretty share links since the website is in bulgarian, if there is no custom permalink, than the post is in english:

    <?php
      $custom_fields = get_post_custom();
      $perma_alias = $custom_fields['_custom_permalink_alias'];
    if ($perma_alias) { foreach ( $perma_alias as $key => $value );
    $perma_a_link = home_url( '/' ).$value;
    $lang_a ="bg"; }
    else { $perma_a_link = get_permalink();
    $lang_a ="en"; }
    
    if ($value) { $perma_a_link = home_url( '/' ).$value; } else { $perma_a_link = get_permalink(); }
    ?>
    
    <a hreflang="<?php echo $lang_a; ?>" href="<?php echo $perma_a_link; ?>" title="<?php the_title(); ?>" ><?php echo $perma_a_link; ?></a>
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Permalink Editor] Permalink slug auto add-on on posts’ is closed to new replies.