How to give image source in wordpress page editor?

You can define constant in theme function file as: if( !defined(THEME_IMG_PATH)){ define( ‘THEME_IMG_PATH’, get_stylesheet_directory_uri() . ‘/site/images’ ); } and then you can use img tag as <img src=”https://wordpress.stackexchange.com/questions/252559/<?php echo THEME_IMG_PATH; ?>/footLogo.png” style=”padding: 0px!important; color:white”>

How to make a category page the blog home page?

Update Eliminating all of the other solutions, there is at least one remaining: template_redirect: function wpse121308_redirect_homepage() { // Check for blog posts index // NOT site front page, // which would be is_front_page() if ( is_home() ) { wp_redirect( get_category_link( $id ) ); exit(); } } add_action( ‘template_redirect’, ‘wpse121308_redirect_homepage’ ); You will need to pass … Read more

View homepage in a preview mode

I think you can set your post to private to view it privately on the homepage. Once you change the visibility to private, the post or page status changes to “Privately Published” as shown. Private posts are automatically published but not visible to anyone but those with the appropriate permission levels (Editor or Administrator). See … Read more

Remove the Homepage Query

The posts_request filter Skimming through the WP_Query we find this part of interest: if ( !$q[‘suppress_filters’] ) { /** * Filter the completed SQL query before sending. * * @since 2.0.0 * * @param array $request The complete SQL query. * @param WP_Query &$this The WP_Query instance (passed by reference). */ $this->request = apply_filters_ref_array( ‘posts_request’, … Read more

Style something only on the home page

WordPress body_class($class) is a nice dynamic way to load styles, js for specific body contents. If your theme doesn’t support body class add them very simply: Open the header.php (or the template that contains the <body> tag) Edit the <body> tag and make it to <body <?php body_class(); ?>> — you are Done! 🙂 Now … Read more