This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//epfarki.com //Gereksiz .css ve .js dosyalarını kaldırma | |
function stil_sil() { | |
if(!is_page('İletişim')){ | |
wp_deregister_style( 'contact-form-7' ); | |
} | |
wp_deregister_style( 'cptchStylesheet' ); | |
wp_deregister_style( 'codecolorer' ); | |
wp_deregister_script( 'wp-recentcomments-jquery' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.sag {float:left; width:45%} | |
.sol {float:left; width:45%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args=array( | |
'orderby' => 'name', | |
'order' => 'ASC' | |
); | |
$categories=get_categories($args); | |
$cat_count = 0; | |
foreach($categories as $c) { | |
$cat_count++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php wp_list_cats('sort_column=name&hierarchical=0'); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Options -Indexes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function yazi_yonlendir() { | |
global $wpdb; | |
$query = "SELECT ID FROM $wpdb->posts WHERE post_type = 'post' AND post_password = '' AND post_status = 'publish' ORDER BY RAND() LIMIT 1"; | |
if ( isset( $_GET['random_cat_id'] ) ) { | |
$random_cat_id = (int) $_GET['random_cat_id']; | |
$query = "SELECT DISTINCT ID FROM $wpdb->posts AS p INNER JOIN $wpdb->term_relationships AS tr ON (p.ID = tr.object_id AND tr.term_taxonomy_id = $random_cat_id) INNER JOIN $wpdb->term_taxonomy AS tt ON(tr.term_taxonomy_id = tt.term_taxonomy_id AND taxonomy = 'category') WHERE post_type = 'post' AND post_password = '' AND post_status = 'publish' ORDER BY RAND() LIMIT 1"; | |
} | |
if ( isset( $_GET['random_post_type'] ) ) { | |
$post_type = preg_replace( '|[^a-z]|i', '', $_GET['random_post_type'] ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$saatfarki = "3"; //server ile aradaki saat farkı | |
$tarih_arr = getdate((time()+3600*$saatfarki)); | |
$tarih = $tarih_arr["mday"]; | |
echo "$tarih"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
$meta = get_meta_tags('http://epfarki.com/'); | |
echo "<b>Site Açıklaması:</b> ".$meta['description']."<br /><br />"; | |
echo "<b>Site Anahtar Kelimeleri:</b> ".$meta['keywords']."<br /><br />"; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
function TitleOku($url){ | |
$icerik = file_get_contents($url); | |
$kalip = "|<[s]*title[s]*>([^<]+)<[s]*/[s]*title[s]*>|Ui"; | |
if(preg_match($kalip, $icerik, $match)) | |
{ | |
return $match[1]; | |
} | |
else | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php the_modified_date('j F Y'); ?> // "15 Mayıs 2012" şeklinde | |
<?php the_modified_date('d.m.Y'); ?> // "15.05.2012" şeklinde | |
<?php the_modified_date('d.m.y'); ?> // "15.05.12" şeklinde | |
<?php the_modified_time('H:i'); ?> // "10:51" şeklinde |