How to create TEMPLATES for TAXONOMIES? What I have to change in this code?

I used: $args = array( … ‘rewrite’ => array( ‘slug’ => ‘portfolio-taxonomies’ ), … ); register_taxonomy( ‘portfolio_taxonomies’, array(‘portfolio’), $args ); So my URL is predictable. And you did one thing wrong, URL you are putting is NOT correct. If the rewrite rule is implemented, then they would be: http://localhost/wp-test/portfolio-taxonomies/taxtemp1/ http://localhost/wp-test/portfolio-taxonomies/taxtemp2/ To grab the correct URL, … Read more

How to pass taxonomy terms to WP_Query along with $args?

You can do like following $thiscat = $wp_query->get_queried_object();//put this code $args = array( ‘post_type’ => ‘sports’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘sports_category’, ‘field’ => ‘slug’, ‘terms’ => $thiscat->slug // Pass this to slug ), ), ); $myquery = new WP_Query($args); then you can able to fetch post titles tagged under football and basketball separately … Read more

Changing some of the language within the revision viewer admin page revision.php

I resolved this in the end with some careful jQuery code that is run via a new JS file that is only loaded via the admin system pages. To give an example of the jQuery code… jQuery(‘.wrap a’).each(function() { if ( getCurentFileName()==”revision.php” ){ var text = jQuery(this).text(); jQuery(this).text(text.replace(‘← Return to post editor’, ‘← the new … Read more

Trying to create an iCal file for a single post

Two things. Firstly, don’t load WordPress yourself. Instead of linking directly to your plugin file, use your WordPress home URL: <a href=”https://wordpress.stackexchange.com/questions/183197/<?php echo home_url(“?workshop_id=X’ ) ?>”>Download iCal</a> …and then intercept the request: function wpse_183197_send_ical() { if ( ! empty( $_GET[‘workshop_id’] ) && ! is_admin() ) { // Your code exit; } } add_action( ‘init’, ‘wpse_183197_send_ical’ … Read more