This file contains hidden or 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
$myposts = get_posts($args); | |
foreach ( $myposts as $post ) : | |
if ( ! is_a( $post, 'WP_Post' ) ) { | |
$post->meta_key = get_post_meta( $post->ID, 'meta_key', true ); | |
} | |
echo $post->meta_key; | |
This file contains hidden or 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 echo get_permalink( get_page_by_path( 'page-slug/children' ) ); ?> |
This file contains hidden or 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 echo Loader::helper('concrete/dashboard')->getDashboardPaneHeaderWrapper(t('Single Page Name'), false, false, false, false, false, false); ?> | |
<div class="ccm-pane-body"> | |
<?php | |
// Tab setting using array | |
$tabs = array( | |
// array('tab-id', 'Tag Label', true=active) | |
array('tab-1', 'Tab 1', true), | |
array('tab-2', 'Tab 2'), |
This file contains hidden or 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 | |
/* | |
Plugin Name: Show more-link in single page | |
Plugin URI: http://ja.forums.wordpress.org/topic/13256 | |
Author: Takuro Hishikawa | |
*/ | |
function show_more_in_single_action($post) { | |
global $more; | |
$page_var = get_query_var('page'); |
This file contains hidden or 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 | |
/* | |
Plugin Name: Enable Post Type Search Template | |
Description: you can use search-{$post_type}.php | |
Author: Takuro Hishikawa | |
Version: 0.1 | |
*/ | |
function enable_post_type_search_template($template){ | |
if ( is_search() ) { |
This file contains hidden or 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 my_terms_reverse_filter($terms){ | |
if(is_main_query()) krsort($terms); | |
return $terms; | |
} | |
add_filter('get_the_terms','my_terms_reverse_filter'); |
This file contains hidden or 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 | |
/* | |
Plugin Name: Hardcode theme switcher | |
Plugin URI: http://ja.forums.wordpress.org/topic/13483 | |
Author: Takuro Hishikawa | |
Version: 0.1 | |
*/ | |
function my_theme_switcher($theme){ | |
// yes, it's hardcoded! |
This file contains hidden or 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 defined('C5_EXECUTE') or die("Access Denied."); | |
Loader::model('section', 'multilingual'); | |
$ms = MultilingualSection::getCurrentSection(); | |
if (is_object($ms)) { | |
$lang = $ms->getLanguage(); | |
} else { | |
$lang = LANGUAGE; | |
} | |
?> | |
<!DOCTYPE html> |
This file contains hidden or 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 | |
Loader::model('section', 'multilingual'); | |
$ms = MultilingualSection::getCurrentSection(); | |
if (is_object($ms)) { | |
$lang = $ms->getLanguage(); | |
$search = BlockType::getByHandle('search'); | |
$search->controller->title = t('Site Search'); | |
$search->controller->buttonText = t('Search'); |