Ciprian
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Transferring a WP site to another hostHi,
To simplify the database transfer you can use WP Migrate DB plugin.
Forum: Fixing WordPress
In reply to: Need to Display archive list from one categoryHi,
You can use ‘getarchives_where’ and ‘getarchives_join’ filters from wp_get_archives function.
Do a join on ‘term_relationships’ and ‘term_taxonomy’, then in the where clause filter by the category/term id.
Forum: Themes and Templates
In reply to: adding meta-box to post/page editing pageHi,
Here is an example that adds a metabox to the post and page editing screens:
https://codex.www.ads-software.com/Function_Reference/add_meta_box#Example
Forum: Hacks
In reply to: Combining two small scriptsIf it printed my code, I think that’s because you did a copy/paste and not enclosed the code in <?php …… ?>
Forum: Hacks
In reply to: Combining two small scriptsYou need the page argument too:
if ( is_category() ) { $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $cat = get_query_var('cat'); query_posts( array( 'category__in' => array($cat), 'orderby' => 'title', 'order' => 'ASC', 'posts_per_page' => 10, 'paged' => $paged )); }
Forum: Hacks
In reply to: Insert date in Scroll post excerptHi,
You can use:$spe_post_date = mysql2date('d F, H:i', trim($spe_data->post_date));
The post_date must be in this format: ‘Y-m-d H:i:s’ (it seems that already is)
Forum: Hacks
In reply to: Combining two small scriptsHi,
You can try:<?php if ( is_category() ) { $cat = get_query_var('cat'); query_posts( array( 'category__in' => array($cat), 'orderby' => 'title', 'order' => 'ASC' ) ); } ?>
Forum: Plugins
In reply to: wp_editor() function and tinyMCE buttonsHi,
You can use the teeny_mce_buttons filter for the buttons and the editor_id parameter to identify a particular tinyMCE instance.
For example, to have only the bold, italic and underline buttons for a specific instance you can do :
function mytheme_teeny_mce_buttons( $buttons, $editor_id ) { if ( "my-instance-id" == $editor_id ) { return array( 'bold', 'italic', 'underline' ); } return $buttons; } add_filter( 'teeny_mce_buttons', 'mytheme_teeny_mce_buttons', 10, 2 );