What permalinks do I use in the redirection
What permalinks do I use in the redirection
What permalinks do I use in the redirection
if you are familiar with WP-CLI ( WordPress command-line interface ) you can very easily search and replace the wrong uploads// url with uploads/. you will need to install the wp-cli.phar file in the root of your directory. there are many tutorials online that explain how to install it for your relevant system. It is … Read more
How to redirect old permalinks from https://exmaple.com/category/post_id to https://exmaple.com/category/post_id.html
How do I structure my permalinks in WordPress?
flush_rewrite_rules on MultiSite
Cannot Set Custom Permalinks for Multisite Post Migration
Is there a problem with the code? Your code is already properly adding the lang query variable to the homepage URL. But you need to understand these points: On the homepage URL becomes http://localhost/mywebsitename/?lang=en which should be ok $wp->request is empty on the homepage, hence the above URL is expected. And you could use get_queried_object()->post_name … Read more
I’ve found the way to edit the slug’s field. Just simply use: wp.data.dispatch(‘core/editor’).editPost({slug: ‘my-slug-value-here’}); With an event listener like this, I can dynamically change the slug field based on a custom field: jQuery(document).ready(() => { const acfField = ‘field_61f8bacf53dc5’; const inputShortTitle = document.getElementById(‘acf-‘ + acfField); const slugify = (str) => { return str.toLowerCase().replace(/ /g, ‘-‘) … Read more
$post->post_parent returns 0 when there’s no parent associated. You need to check if the value is greater than 0. <?php global $post; if ( $post->post_parent > 0 ) { ?> <a href=”<?php echo get_permalink( $post->post_parent ); ?>” > <?php echo get_the_title( $post->post_parent ); ?> </a> <Br><?php echo get_permalink( $post->post_parent ); ?> <?php } ?> Also, … Read more
Add .html permalink to post if specific category