Possible to use /%monthname%/ in my permalink structure without using a plugin?
Possible to use /%monthname%/ in my permalink structure without using a plugin?
Possible to use /%monthname%/ in my permalink structure without using a plugin?
Make Category Base Appear in Posts Permalink (but not tags)
How to show custom taxonomy in the permalink?
You don’t have to mess with .htaccess since WordPress has it’s own rewrite engine builti in. You are looking for this: https://codex.wordpress.org/Rewrite_API/add_rewrite_rule
Try this plugin Custom Post Type Permalinks, it allows you to set permalinks for custom post types. If your client does not want additional plugin then this plugin is also available on GitHub you can fork it or include this functionality in your own plugin or your functions.php. In order to use anything dynamic in … Read more
It can be done by using the request filter. Something like this function alter_the_query($request) { return array(‘page’ => 1, ‘pagename’ => null); } add_filter(‘request’,’alter_the_query’); Here it forces display of post 1, though of course you will want to do a query to determine the ID. For that, it might prove easiest to first parse the … Read more
I use a shortcode: function shortcode_article_list() { $posts_array = get_posts( array(‘posts_per_page’ => -1, ‘orderby’ => ‘date’, ‘order’ => ‘DESC’, ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’) ); $output=”<ul>”; foreach ($posts_array as $post) { $a = explode(‘ ‘, $post->post_date); $output .= ‘<li><a href=”‘ . home_url(“https://wordpress.stackexchange.com/”) . $post->post_name . ‘.html”>’ . $post->post_title . ‘</a> (‘ . $a[0] . … Read more
I’ve found a way to dynamicaly change the slug field with the short title custom field. jQuery(document).ready(() => { const acfField = ‘field_61f8bacf53dc5’; const inputShortTitle = document.getElementById(‘acf-‘ + acfField); const slugify = (str) => { return str.toLowerCase().replace(/ /g, ‘-‘) .replace(/-+/g, ‘-‘).replace(/[^\w-]+/g, ”); } const updateSlug = () => { wp.data.dispatch(‘core/editor’).editPost({slug: slugify(inputShortTitle.value)}); } if (inputShortTitle !== … Read more
the plugin “WDS Multisite Aggregate” store the blog identifier in a meta of the cloned post. then in the template file wich display the cloned posts, you can retrieve the home url of the original website with that : $blogid = $GLOBALS[“post”]->blogid; $blog_details = get_blog_details($blogid); // the home URL is in $blog_details->home I hope this … Read more
Go to Permalink Settings in admin panel and add “blog” as Category base there