Yearly archive page for future year
You need to add future posts to the query. function add_future_posts($query) { $query->set(‘post_status’, array(‘publish’, ‘future’)); } add_action(‘pre_get_posts’, ‘add_future_posts’, 10, 1);
You need to add future posts to the query. function add_future_posts($query) { $query->set(‘post_status’, array(‘publish’, ‘future’)); } add_action(‘pre_get_posts’, ‘add_future_posts’, 10, 1);
Done Successfully from this coding. Inserted wp-includes/function.php function kc_add_taxonomy_filters() { global $typenow; // an array of all the taxonomyies you want to display. Use the taxonomy name or slug $my_taxonomies = array( ‘post_tag’ ); switch($typenow){ case ‘post’: foreach ($my_taxonomies as $tax_slug) { $tax_obj = get_taxonomy($tax_slug); $tax_name = $tax_obj->labels->name; $terms = get_terms($tax_slug); if(count($terms) > 0) { … Read more
add_shortcode( ‘type_portfolio’, function( $atts, $content = null ){ $atts = shortcode_atts( array( ‘column’ => ‘3’, ‘category’ => ‘0’, ‘ppp’ => -1 ), $atts); extract($atts); $args = array( ‘posts_per_page’ => $ppp, ‘post_type’ => ‘fen_portfolio’ ); if( $category > ‘0’ ){ $args[‘tax_query’] = array( array( ‘posts_per_page’ => -1, ‘taxonomy’ => ‘cat_portfolio’, ‘field’ => ‘term_id’, ‘terms’ => $category … Read more
I may be missing something in your code; but: you need to “move” the content of your test div to a JS variable that can then be used in your Ajax (or use the div value directly in your $.post. e.g. var postID = $(‘#test’).val(); then use it to pass the needed info to your … Read more
I’m not away of any expired post status, but you can set the post’s status to draft of trash. First, you need to set up a cron job to run once in a while, and check if the date has come. Finding the proper time is up to you. // Let’s check the scheduled even … Read more
Paste the following code into your functions.php file. The wp_terms_checklist_args filter hook will make sure that one or more category is pre-selected and the op_create_selected_cat_post_link() function will help you to create a new post link with pre-selected category ids. The function takes $cats parameter and it can be a single category id or multiple categories … Read more
There is no ‘undo’ option for this except reverting back to the most recent database export. That’s seems like a no go for this since it’s not ‘crucial’ (imo). The quick fix I can think of is create a new category (with the same name etc.) and assign all posts to that category. The only … Read more
It might be possible, but you can not control what the user has in the DB before activating your theme, so you might have to handle “quotes” which are not reviews in any case. In theory you can try to detect based on the content, or if you use some specific meta values, based on … Read more
You can use the admin_menu hook. You will be able to loop over all menus. add_action( ‘admin_menu’, ‘wpse_306432_edit_post_type_admin_menu’, 11); function wpse_306432_edit_post_type_admin_menu() { global $menu; foreach($menu as $k => $v){ if($v[1] == ‘edit_applications’) // possibly ‘edit_application’, I’m not sure { $menu[$k][2] = ‘edit.php?post_status=all&post_type=application&cat=36&paged=1’; // I modify your query break; } } } Should work for you … Read more
1- Just use jquery on form submit. jQuery(document).ready(function ($) { //default wordpress new post form id = #post $(“#post”).submit(function () { $.ajax({ url: “http://YOUR URL”, success: function (response) { console.log(“CALL OK!”); }, error: function () { console.log(“CALL FAILED!”); } }); }); }); 2- Put this code inside your theme: make new file, put the code … Read more