[Solved] What is this theme code doing? [closed]

Clearly mentioned – get_terms() retrieve the terms in taxonomy or list of taxonomies. You need to learn more for action hooks in wordpress. The question is, can this code be somewhere useful ? You actually need to look in you theme whether it is providing any functionality/option on the basis of this hook. 3 solved … Read more

[Solved] Expand div full height [closed]

You can use the viewport units vh and vw (viewport-height and viewport-width) in your case: #column-content { height: 100vh; box-sizing: border-box; /* change width, since we use border-box old width + padding */ width: 480px; } As you see, this will make your column content box-sizing:border-box this will prevent the container from becoming bigger than … Read more

[Solved] how make duplicate of an specific file in wordpress media library programatically [closed]

finally solved my problem by this code: require_once( ABSPATH . ‘wp-admin/includes/image.php’ ); $wp_upload_dir = wp_upload_dir(); $imgMeta = wp_get_attachment_metadata( $wordpress_media_attachment_id ); $imgMime = $imgMeta[‘sizes’][‘thumbnail’][‘mime-type’]; $absolutePath = “$wp_upload_dir[basedir]/$imgMeta[file]”; $name = basename($imgMeta[‘file’]); do{ $rnd = mt_rand(); $name2 = “_$rnd$name”; $path2 = “$wp_upload_dir[path]/$name2”; } while (file_exists($path2)); @copy($absolutePath,$path2); $attachment = array( ‘guid’=> “$wp_upload_dir[url]/$name2”, ‘post_mime_type’ => $imgMime, ‘post_title’ => $name2, ‘post_content’ … Read more

[Solved] Delete the last part of the menu [closed]

Since you haven’t included any proper code and the website link which you’ve included opens up a coming soon page, I am not quite sure what you’re referring to but from what I understand, you’d like to remove the last <li> present inside your menu. If yes, you can do that by setting the display … Read more

[Solved] Notice: is_main_query was called incorrectly

the solution is given in your error itself “use the WP_Query->is_main_query() method”– try this – if($query->is_main_query() && !empty($selected_sort_types) && empty($orderby)) { $_sort_types = array_keys($selected_sort_types); $orderby = $_sort_types[0]; $query->set(‘orderby’, $orderby); } instead of this – if(is_main_query() && !empty($selected_sort_types) && empty($orderby)) { $_sort_types = array_keys($selected_sort_types); $orderby = $_sort_types[0]; $query->set(‘orderby’, $orderby); } 2 solved Notice: is_main_query was called … Read more