WordPress Page Slug with URL custom template

Eventually I found out a solution. Below is how I have achieved this. In my functions.php file, I have put below code. add_filter(‘query_vars’, ‘add_user_var’, 0, 1); function add_user_var($vars){ $vars[] = ‘user’; return $vars; } add_rewrite_rule(‘^user/([^/]+)/?$’,’index.php?pagename=user&user=$matches[1]’,’top’); This generally adds a rewrite rule if it finds user in the URL. Now I have added a page template … Read more

I’m building a WordPress theme and noticed that the 404 page template runs along with the corresponding templates for each page. Any idea why?

I used the following function to retrieve the URLs of each page. function template_debug($filename = null) { $url = home_url($_SERVER[‘REQUEST_URI’]); debug(“Called from: $filename using URL $url \n”); } Then I inspected the front page which triggered the 404 template along with the front-page template. The Network Monitor tab showed the error, which was an incorrect … Read more

Create Page with Template File from Plugin Folder

It is probably wp_insert_post can’t recognize your template. You need to include it in the list of the templates. function wpse410645_add_plugin_template( $page_templates ) { $page_templates[plugin_dir_path( __FILE__ ) . ‘/templates/mytemplate.php] = ‘My Template Name’; return $page_templates; } add_filter( ‘theme_page_templates’, ‘wpse410645_add_plugin_template’ );

Animation as shown in the link

Checking out the source code on the page I see the cards are svg and are run by css transitions like this: .svg-cards { display: inline-block; position: absolute; width: 20vmin; overflow: hidden; min-width: 100px; border-radius: 15px; box-shadow: -30px -30px 40px 15px rgba(0, 0, 0, 0.9); line-height: 0; } .svg-cards.rotation { box-shadow: -1px 1px 6px rgba(0, … Read more