How can I stop access of unregistered user in wp-content/uploads directory without using .htaccess file?

WordPress is engineered not to interfere with existing files, including .htaccess rules it generates to enable use of pretty permalinks. Simply put you cannot make WP process or protect media files without some form of .htaccess or other web server configuration, because typically it handles them completely separately and WP doesn’t interfere with it.

Get Custom Taxonomy Terms by Date

This is the working code: // latest edition $taxonomies = array( ‘jjm_editions’ ); $args = array( ‘orderby’ => ‘ID’, ‘order’ => ‘DESC’, ‘hide_empty’ => false, ‘number’ => ‘1’ ); $terms = get_terms($taxonomies, $args); foreach ( $terms as $term ) { $term_link = get_term_link( $term ); if ( is_wp_error( $term_link ) ) { continue; } echo … Read more

Hide text if not homepage

You can use is_paged() …checks if page being displayed is “paged” and the current page number is greater than one. This is a boolean function, meaning it returns either TRUE or FALSE. You can adjust your code as follows <?php if( is_home() && !is_paged() ) : ?> <p>Some text</p> <?php endif;?>

How to customize

If you want to add your own tags to WordPress pages use the wp_head action. To modify or remove <head> elements being added by Yoast you’ll need to use the filters they provide. As documented in that link you can modify the page title, author, keywords and more.

Customize option – add two image uploader under same section

So, after searching whole i got solution. add a new setting and add a new control. Inside of control, add new add_action( ‘customize_register’, ‘custom_logo_uploader’ ); function custom_logo_uploader($wp_customize) { $wp_customize->add_section( ‘upload_custom_logo’, array( ‘title’ => ‘Logo’, ‘description’ => ‘Display a custom logo?’, ‘priority’ => 25, ) ); $wp_customize->add_setting( ‘custom_logo’, array( ‘default’ => ”, ) ); $wp_customize->add_control( new … Read more