How to inject custom url path for page ?
you can use this plugin to generate this kind of permalink https://wordpress.org/plugins/wp-category-permalink/
you can use this plugin to generate this kind of permalink https://wordpress.org/plugins/wp-category-permalink/
Changing the permalink structure is definitely a big deal for an existing site. In order to test the various ways in which changing the permalink structure could break the site, I definitely recommend setting up a test environment. So, my question is, is it ok to leave the internal links “ugly?” I’m not sure from … Read more
I’m not positive I understand the question, but if you’re just trying to get the site URL, you can use the get_site_url() WP function. So, like this: $siteURL = get_site_url(); header(“=Location: $siteURL” . “/myoriginalformpage/?success=”, $success); And you can change the parameters of get_site_url() to specify the path and to display ‘https’ or ‘http’. But if … Read more
http://codex.wordpress.org/Function_Reference/get_author_posts_url
You can do this with a rewrite rule from within WordPress. Take a look at the documentation for add_rewrite_rule. Something like this: <?php add_action(‘init’, ‘wpse65855_rewrite’); function wpse65855_rewrite() { add_rewrite_rule( ‘^photos/?$’, // the rule regex ‘index.php?taxonomy=category&term=photos’, // where you want the rule to go ‘top’ // the priority. Make this one go first ); } You … Read more
Actually WordPress lacks a real function to get posts by slug/post-name. But you can use get_page_by_path() for it so you don’t have to use a custom query: if(function_exists(‘icl_object_id’)) { $post = get_page_by_path(‘your-slug’); $id = icl_object_id($post->ID,’post’,true); $link = get_permalink($id); } The only difference here is that you must use the full path i.e. (‘parent-page/sub-page’) if you … Read more
Caveat: the code examples within this answer are very basic and may or may not need further conditional logic to adapt to your precise needs, this logic is meant as an example to get you on your way. There’s two considerations you need to be aware of: Consideration 1: If you add a new post … Read more
When you register your post type, set the has_archive argument to false. If you change it, don’t forget to flush your rewrite rules to see the change. Now this works fine if, as you asked, you want to show the page and not the archive. What about the situation where you’d like to show the … Read more
I don’t exactly know about the word embed, but by default WordPress reserves & uses these sort of words for internal use. I tried to create a page slug named embed but it wouldn’t work for me either on my localhost or on my live server. Maybe this is reserved for WordPress oEmbed functionality.
Yes cou can change it by accessing the database of your wordpress. It’s located in the wp_options table of your wp’ database. You’ll have to change two values; the siteurl (line 1) and the home (line 37). You can access it through the admin panel of your host and/or sometimes directly by typing in your … Read more