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
// Kod ?>'ın hemen üstüne eklenecek. | |
function foo_modify_query_order( $query ) { | |
if ( $query->is_category() && $query->is_main_query() ) { | |
$query->set( 'orderby', 'title' ); | |
$query->set( 'order', 'ASC' ); | |
} | |
} | |
add_action( 'pre_get_posts', 'foo_modify_query_order' ); |
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
/* | |
$tUp: Beğenenler | |
$tDown: Beğenmeyenler | |
$tTotal: Beğenen ve Beğenmeyenler Toplamı | |
$percentageCalculate: Beğenenlerin yüzde hesaplaması. Ör: % 75 Kişi Beğenmiş | |
*/ | |
$tUp = 50; | |
$tDown = 90; | |
$tTotal= $tUp + $tDown; | |
$percentageCalculate = ($tUp*100) / $tTotal; |
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 | |
/* | |
Template Name: Frontend Edit Profile | |
*/ | |
get_header(); | |
if ( is_user_logged_in() ) : { | |
$user_ID = get_current_user_id(); | |
$user_info = get_userdata($user_ID); |
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
/* Arama Filtresi (4Piksel) */ | |
function dpx_aramafiltre($query) { | |
if ($query->is_search) { | |
$query->set('post_type', 'post'); /* Buraya arama sonuçlarında çıkmasını istediğiniz yazı türünü yazabilirsiniz. Örnek: page ya da kendi yazı türünüz. */ | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts','dpx_aramafiltre'); |
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 top_comment_authors($amount = 5){ | |
global $wpdb; | |
$results = $wpdb->get_results(' | |
SELECT | |
COUNT(comment_author_email) AS comments_count, comment_author_email, comment_author, comment_author_url | |
FROM | |
'.$wpdb->comments.' | |
WHERE |
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
jQuery(document).ready(function($) { | |
/** | |
* When user clicks on button... | |
* | |
*/ | |
$('#btn-new-user').on("click",function() { | |
/** | |
* Prevent default action, so when user clicks button he doesn't navigate away from page |
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 | |
/* | |
** Template Name: Registo | |
** Este template foi criado pela miukimiu.com | |
** É um formulário de regsto costumizado para um site wordpress. | |
*/ | |
get_header(); ?> | |
<div class="block-9 no-mar content-with-sidebar"> |
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
<!-- Custom Login/Register/Password Code @ http://digwp.com/2010/12/login-register-password-code/ --> | |
<!-- Theme Template Code --> | |
<div id="login-register-password"> | |
<?php global $user_ID, $user_identity; get_currentuserinfo(); if (!$user_ID) { ?> | |
<ul class="tabs_login"> | |
<li class="active_login"><a href="#tab1_login">Login</a></li> | |
<li><a href="#tab2_login">Register</a></li> |
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
<!-- Custom Login/Register/Password Code @ http://digwp.com/2010/12/login-register-password-code/ --> | |
<!-- Theme Template Code --> | |
<div id="login-register-password"> | |
<?php global $user_ID, $user_identity; get_currentuserinfo(); if (!$user_ID) { ?> | |
<ul class="tabs_login"> | |
<li class="active_login"><a href="#tab1_login">Login</a></li> | |
<li><a href="#tab2_login">Register</a></li> |
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
/* | |
Navicat MySQL Data Transfer | |
Source Server : localhost_3306 | |
Source Server Version : 50505 | |
Source Host : localhost:3306 | |
Source Database : test | |
Target Server Type : MYSQL | |
Target Server Version : 50505 |
NewerOlder