Create dashboard widget for custom theme support

Yes, you can link directly from the dashboard to files within a plugin or theme directory. There are PHP and WP functions you can use to make sure you’re targeting the correct directory: Themes: Let’s say you have example.com/wp-content/themes/wpse-theme/example.html, and “wpse-theme” is either the only theme, or the parent theme. You can link to this … Read more

Get gallery images description not work for some images id

Instead of using get_post_gallery_images() and attachment_url_to_postid(), you can just use get_post_gallery() which when the second parameter is false, gives you an array with two items/keys: 1) src — an array of image URLs, and 2) ids — the attachment IDs (comma-separated). So you can do $images_gallery = get_post_gallery( $section_content, false ); and then: <div class=”swiper-container … Read more

How to display only author’s name for the current post?

You may use the the_author_meta function: the_author_meta( string $field = ”, int|false $user_id = false ) You may provide $field which is of these values: admin_color aim comment_shortcuts description display_name first_name ID jabber last_name nickname plugins_last_view plugins_per_page rich_editing syntax_highlighting user_activation_key user_description user_email user_firstname user_lastname user_level user_login user_nicename user_pass user_registered user_status user_url yim and is well … Read more