Arabic permalink redirect to home page

IIS has a problem with RTL-languages in URLs. Check your database and page encoding is UTF-8. After that try to put into system.webServer tag <globalization requestEncoding=”utf-8″ responseEncoding=”utf-8″ fileEncoding=”utf-8″ /> If it does not help you may use free WordPress plugin Custom Transliteration with Arabic Transliteration

how to get permalink

To get a permalink you need to use get_permalink(). Just pass the ID of the post or leave it blank to get the current page in the Loop. wp_localize_script () will render PHP variables on the page that are consumable by JS through a global object that you define. PHP // Register the script wp_register_script( … Read more

Custom Post Type to replace Woocommerce products – page not found error

I haven’t tried this myself yet – and I would probably always prefer to go with the default ‘products’ for compatibility reasons… However it should be very well possible to add your own CPT to WooCommerce and then “move” all products to that new CPT. First you’ll have to add a CPT to your WordPress installation that … Read more

Post Title to link to a PDF

I recommend using the plugin Advanced Custom Fields (Very popular plugin). It lets you create fields and manage their values very easily. This way you could just create a new field for file upload and then to pull its information like this- <?php $my_file = get_field(‘my_file’); if( $my_file ) { echo $my_file[‘url’]; echo $my_file[‘alt’]; echo … Read more

How can I link to the author’s page

I depends on whether you want the URL to the authors posts: ‘<a href=”‘.get_author_posts_url( $user->ID ).'”>user posts url</a>’ https://codex.wordpress.org/Function_Reference/get_author_posts_url Or the url to edit the user: ‘<a href=”‘.get_edit_user_link( $user->ID ).'”>edit user url</a>’ https://codex.wordpress.org/Function_Reference/get_edit_user_link