One Page or Post, n Slugs
Take a look at this plugin -> http://wordpress.org/extend/plugins/redirection/
Take a look at this plugin -> http://wordpress.org/extend/plugins/redirection/
This is completely untested, but the principles are in place. Get today’s date and built the title, build the slug and then insert the post as a draft. This doesn’t take care of disabling the title field from being edited. I imagine what you’re looking for would be a Javascript solution that just looks for … Read more
After doing some research I found following code, made it a plugin (you have to create a php file and give it a name,copy code below into that file and place it in your plugins folder). It is not my code so therefore I put references to the author and original source-code and links to … Read more
This code is used after <head> and before <body> and is supposed to get current page’s slug. It works great, however it will get the slug of first blog post when on “general” blog page. $post is going to be set to the first post in the Loop when the page loads. On “page” pages … Read more
Disable the WordPress event plugin. Use following code in functions.php to find your theme has events function. if ( post_type_exists( ‘events’ ) ) { echo ‘the Event post type exists’; }else{ echo ‘the Event post type does not exists’; } If you find theme has events custom post type, find where your theme register the … Read more
What you are asking would make those pages NOT be the home page, at least in WordPress’s definition of the homepage. If you want people to go straight to /some-page and not be able to access the root, then you would create a 301 redirect for this (but there will still technically be something on … Read more
The comma separated term link list is available with: the_terms( $post->ID, ‘policytype’, ”, ‘, ‘, ” ); Check the dev docs for more info on this function.
If you’re talking about pages, you can create a parent page with the country code as it’s URL and set all the other pages as children of it. You could even make that page the homepage for that language. If you mean posts, you could create a custom taxonomy and follow these instructions to add … Read more
I don’t think there is a built-in mechanism to write meta tags, no: you have to echo it from a wp_head hook. For example: function slug_meta_tag() { if ( is_single() ) { global $post; if ( $post && $post->post_name ) { echo ‘<meta name=”slug” content=”‘ . esc_html( $post->post_name ) . ‘” />’; } } } … Read more
Going by your link tag and the place you want the slug in, the code would be like this. <link rel=”alternate” hreflang=”fr-BE” href=”https://www.moneytrans.eu/belgium/<?= get_post_field(‘post_name’); ?>” /> You don’t need to add all those spaces in attributes, for example, instead of rel = “alternate” do rel=”alternate”, and so on.