M27Lab – Build Your Wordpress Website,Mobile App & Web Application


word press theme Dev basic things

1. get the post categories… //$categories = get_categories(); //all category $categories = get_the_category($post->ID); //post category if($categories !=null){ foreach($categories as $category) { echo ‘<a href=”‘ . get_category_link($category->term_id) . ‘” class=”term-link”>’ . $category->name . ‘</a> ‘; } } 2. get the date …. <?php echo get_the_date(‘j M,Y’); ?> 3.get thumbnail…. <?php echo wp_get_attachment_url(get_post_thumbnail_id());?>  

How to Fix Custom Fields Not Showing in WordPress

REF: https://www.wpbeginner.com/wp-tutorials/how-to-fix-custom-fields-not-showing-in-wordpress/   The Custom Fields option was missing from the WordPress screen options. After some investigation, we were able to find the cause of the issue. If your WordPress site is missing the custom fields option under the ‘Screen Options’ menu, then you need to check if you have the Advanced Custom Fields (ACF) …

How to Fix Custom Fields Not Showing in WordPress Read More »

set Expiration to file (wordpress speed up)

Reference Link: https://stackoverflow.com/questions/4141643/how-do-i-set-expiration-on-css-js-and-images Edit .htaccess file : <FilesMatch “\.(jpg|jpeg|png|gif|swf|css|js)$”> Header set Cache-Control “max-age=604800, public” </FilesMatch> Leverage browser caching for the following cacheable resources