Skip to content

Instantly share code, notes, and snippets.

Mohsin Alam mohsinworld

Block or report user

Report or block mohsinworld

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Country Code Shortcode for GeoTargeting Lite - WordPress Geolocation
<center>
<strong>Some Radio Station from Your Country</strong>
[geot country="AF"][ess_grid alias="Afghanistan"][/geot]
[geot country="AL"][ess_grid alias="Albania"][/geot]
[geot country="DZ"][ess_grid alias="Algeria"][/geot]
[geot country="AD"][ess_grid alias="Andorra"][/geot]
[geot country="AO"][ess_grid alias="Angola"][/geot]
[geot country="AG"][ess_grid alias="Antigua and Barbuda"][/geot]
[geot country="AR"][ess_grid alias="Argentina"][/geot]
[geot country="AM"][ess_grid alias="Armenia"][/geot]
@mohsinworld
mohsinworld / Remove Media, Featured Image When Post Delete (uploaded to this post only)
Last active Jun 6, 2019
Need to paste this code inside of functions.php file (themes File)
View Remove Media, Featured Image When Post Delete (uploaded to this post only)
add_action( 'before_delete_post', 'wps_remove_attachment_with_post', 10 );
function wps_remove_attachment_with_post( $post_id ) {
/** @var WP_Post[] $images */
$images = get_attached_media( 'image', $post_id );
foreach ( $images as $image ) {
wp_delete_attachment( $image->ID, true );
}
}
@mohsinworld
mohsinworld / Remove Only Featured Image When Delete Post
Last active Jun 6, 2019
This code need to use in functions.php file (themes files)
View Remove Only Featured Image When Delete Post
add_action( 'before_delete_post', 'wps_remove_attachment_with_post', 10 );
function wps_remove_attachment_with_post($post_id)
{
if(has_post_thumbnail( $post_id ))
{
$attachment_id = get_post_thumbnail_id( $post_id );
wp_delete_attachment($attachment_id, true);
}
@mohsinworld
mohsinworld / Include File in Themes Header
Created Mar 4, 2019
Use popads.net Ads Code by PHP File
View Include File in Themes Header
<?php include (dirname(__FILE__) . '/popads.php');?>
View Responsive Code Structure
/* start of desktop styles */
@media screen and (max-width: 991px) {
/* start of large tablet styles */
}
@media screen and (max-width: 767px) {
/* start of medium tablet styles */
@mohsinworld
mohsinworld / Disable Gutenberg Editor
Created Dec 11, 2018
Use this cde inside functions.php
View Disable Gutenberg Editor
// Gutenberg disable for posts
add_filter('use_block_editor_for_post', '__return_false', 10);
View Indiaiptv.m3u
#EXTINF:0, group-title="English",& Flix
http://z5ams.akamaized.net/andflix/tracks-v1a1/index.m3u8
#EXTINF:0, group-title="Hindi",& Pictures
#EXTINF:0, group-title="Hindi",& Pictures HD
http://z5ams.akamaized.net/andpicshd/tracks-v1a1/index.m3u8
#EXTINF:0, group-title="Punjabi",5aab TV
http://158.69.124.9:1935/5aabtv/5aabtv/playlist.m3u8
#EXTINF:0, group-title="Tamil",??
http://mhms9.airtel.tv/wh7f454c46tw4163224253_611767333/PLTV/88888888/224/3221226313/index.m3u8
#EXTINF:0, group-title="Telugu",10 TV
View php: Dynamic Menu for WordPress Themes
/* Dynamic Navigation */
<?php
wp_nav_menu(array(
'menu' => 'main_menu',
'theme_location' => 'main_menu',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'navbar-collapse-1',
'menu_class' => 'nav',
'depth' => '3',
You can’t perform that action at this time.