Title: glennwill's Replies | WordPress.org

---

# glennwill

  [  ](https://wordpress.org/support/users/glennwill/)

 *   [Profile](https://wordpress.org/support/users/glennwill/)
 *   [Topics Started](https://wordpress.org/support/users/glennwill/topics/)
 *   [Replies Created](https://wordpress.org/support/users/glennwill/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/glennwill/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/glennwill/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/glennwill/engagements/)
 *   [Favorites](https://wordpress.org/support/users/glennwill/favorites/)

 Search replies:

## Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

 *   Forum: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
   
   In reply to: [How to use slashes in page URL?](https://wordpress.org/support/topic/how-to-use-slashes-in-page-url/)
 *  [glennwill](https://wordpress.org/support/users/glennwill/)
 * (@glennwill)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/how-to-use-slashes-in-page-url/#post-16392980)
 * Yes, it is possible to change the URL structure of your website to make it more
   structured and easier to understand. One way to do this would be to use WordPress’
   built-in permalink settings to change the structure of your URLs. You can find
   this setting by going to Settings > Permalinks in your WordPress dashboard. From
   there, you can select the “Custom Structure” option and enter the desired structure,
   such as /%category%/%postname%/.
 * It’s important to note that changing the URL structure of your website can have
   an impact on your search engine rankings, so it’s best to do it carefully and
   make sure to redirect all the old URLs to the new ones.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[GeneratePress] How to add hreflang tags in wordpress without plugin for specific pages?](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/)
 *  Thread Starter [glennwill](https://wordpress.org/support/users/glennwill/)
 * (@glennwill)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/page/2/#post-16392240)
 * Yeah that works perfectly.
 * Thank you very much to all who participate in this support forum.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[GeneratePress] How to add hreflang tags in wordpress without plugin for specific pages?](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/)
 *  Thread Starter [glennwill](https://wordpress.org/support/users/glennwill/)
 * (@glennwill)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/#post-16390274)
 * Hi David,
 * Now I have added the below code in functions.php but tags only show up on homepage,
   not on the alternate post.
 *     ```wp-block-code
       function add_hreflang_tags() {
           if (is_front_page() || is_home()) {
               echo '<link rel="alternate" hreflang="hi-IN" href="https://hindivarnamala.in/" /> 
       <link rel="alternate" hreflang="en-IN" href="https://hindivarnamala.in/hindi-alphabet-letters/" />';
           }
           if (is_page('hindi-alphabet-letters')) {
               echo '<link rel="alternate" hreflang="hi-IN" href="https://hindivarnamala.in/" /> 
       <link rel="alternate" hreflang="en-IN" href="https://hindivarnamala.in/hindi-alphabet-letters/" />';
           }
       }
       add_action('wp_head', 'add_hreflang_tags');
       ```
   
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[GeneratePress] How to add hreflang tags in wordpress without plugin for specific pages?](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/)
 *  Thread Starter [glennwill](https://wordpress.org/support/users/glennwill/)
 * (@glennwill)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/#post-16389877)
 * But it does not show up here when I check view-source page
 * Can you let me know please how you can see that and what codes you’re using?
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[GeneratePress] How to add hreflang tags in wordpress without plugin for specific pages?](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/)
 *  Thread Starter [glennwill](https://wordpress.org/support/users/glennwill/)
 * (@glennwill)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/#post-16389858)
 * Hi David,
 * The english post is written manually not translated
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[GeneratePress] How to add hreflang tags in wordpress without plugin for specific pages?](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/)
 *  Thread Starter [glennwill](https://wordpress.org/support/users/glennwill/)
 * (@glennwill)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/#post-16388376)
 * Yeah I have re-added but does not work
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[GeneratePress] How to add hreflang tags in wordpress without plugin for specific pages?](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/)
 *  Thread Starter [glennwill](https://wordpress.org/support/users/glennwill/)
 * (@glennwill)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/#post-16388180)
 * Hi fernandoazarcon2,
 * No this plugin [https://wordpress.org/plugins/insert-headers-and-footers/](https://wordpress.org/plugins/insert-headers-and-footers/)
   does not work at all for specific post or pages. It will display the tags in 
   header for all posts & pages.
 * Anyone can help me to place the mentioned tags via code in the <head> section
   for the above mentioned URLs?
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[GeneratePress] How to add hreflang tags in wordpress without plugin for specific pages?](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/)
 *  Thread Starter [glennwill](https://wordpress.org/support/users/glennwill/)
 * (@glennwill)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/#post-16387887)
 * Yes I only want to add the below tags in the <head> section for both URLs:
 *     ```wp-block-code
       <link rel="alternate" href="https://hindivarnamala.in/" hreflang="hi-IN" />
       <link rel="alternate" href="https://hindivarnamala.in/hindi-alphabet-letters/" hreflang="en-IN" />
       ```
   
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[GeneratePress] How to add hreflang tags in wordpress without plugin for specific pages?](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/)
 *  Thread Starter [glennwill](https://wordpress.org/support/users/glennwill/)
 * (@glennwill)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/#post-16385854)
 * Sure,
 * These are 2 URLs with same content but with different language:
 * [https://hindivarnamala.in/](https://hindivarnamala.in/)
 * [https://hindivarnamala.in/hindi-alphabet-letters/](https://hindivarnamala.in/hindi-alphabet-letters/)
 * Please help me to add the below tags in <head> section for both URLs:
 *     ```wp-block-code
       <link rel="alternate" href="https://hindivarnamala.in/" hreflang="hi-IN" />
       <link rel="alternate" href="https://hindivarnamala.in/hindi-alphabet-letters/" hreflang="en-IN" />
       ```
   
 * Your help will be highly appreciated. 🙂
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[GeneratePress] How to add hreflang tags in wordpress without plugin for specific pages?](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/)
 *  Thread Starter [glennwill](https://wordpress.org/support/users/glennwill/)
 * (@glennwill)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-hreflang-tags-in-wordpress-without-plugin-for-specific-pages/#post-16385053)
 * I have used the below code in funcstions.php but it does not work:
 *     ```wp-block-code
       function add_hreflang_tags() {
           if (is_front_page() || is_home()) {
               echo '<link rel="alternate" hreflang="hi-IN" href="https://example.in/" />';
           }
           if (is_page('hindi-alphabet-letters')) {
               echo '<link rel="alternate" hreflang="en-IN" href="https://example.in/hindi-alphabet-letters/" />';
           }
       }
       add_action('wp_head', 'add_hreflang_tags');
       ```
   
    -  This reply was modified 3 years, 3 months ago by [glennwill](https://wordpress.org/support/users/glennwill/).

Viewing 10 replies - 1 through 10 (of 10 total)