Print Dashboard menu name and link

Not sure what you are trying to accomplish precisely, since you don’t cover that part. Looking at the data I would guess you can filter out separators and such by checking for proper title: global $menu; foreach ( $menu as $group => $item ) { if ( ! empty( $item[0] ) ) { echo $item[0] … Read more

Automatically add author’s name to post_tag

Check get_the_author() (Note:This tag must be used within The Loop.) you code may be like this In functions.php: add_action( ‘save_post’, ‘add_authors_name’); function add_authors_name( $post_id ) { global $post; $post_author = $post->post_author; // returns the Author ID // get the author’s WP_User object so we can get the Author Name $post_author_obj = get_userdata( $post_author ); $post_author_name … Read more

Run Product Filter Javascript On Page Template

In WordPress, you should use wp_enqueue_script() to load JavaScript files, and wp_enqueue_style() to load CSS files, and the functions should be called using the wp_enqueue_scripts action hook. Additionally, the theme needs to call wp_head() (in header.php) and wp_footer(). And to enqueue a script only on specific pages, you would use a conditional tag like is_page() … Read more

get excerpt without images

Use the_excerpt(); wordpress function to show only text. That function will filter out some html tags such as <img> , <a>. A useful alternative to show only plain text. Note – The the_excerpt() function internally uses get_the_excerpt() to get excerpt and return a new string by filtering tags such as <img>, <a> tags. It also … Read more