g10r3
Forum Replies Created
-
Thank u Michael!
No, i don’t have any custom template for the taxonomies. It relys just on index.php
Hi Jeremy,
i was looking at the code of JetPack and found the “featured content” module.
If I re-write my home page in order to use this module, i should not have any more problems with duplicated post, right?
at line 185 is written that
Exclude featured posts from the blog query when the blog is the front-page.
and they will be excluded also from IS queries?
There’s some documentation available? It seems I can’t find anything on jetpack website.
Thank u
Hi Jeremy,
i use this code into my function.php:
function fco_create_taxonomies() { $labels = array( 'name' => _x( 'Piattaforme', 'taxonomy general name' ), 'singular_name' => _x( 'Piattaforma', 'taxonomy singular name' ) ); register_taxonomy( 'piattaforme', array ('post', 'fco_edizioni'), array( 'hierarchical' => true, 'labels' => $labels, 'show_ui' => true, ) ); } add_action( 'init', 'fco_create_taxonomies' );
Forum: Installing WordPress
In reply to: New wp 3.3 installation, impossible to modify widgetok, thanks. i’ll try to tell the admin.
Forum: Installing WordPress
In reply to: New wp 3.3 installation, impossible to modify widgetit works! Thank you.
I’ve read the page linked but i’m not too much into server admininistration so: it’s only a wp bug or it’s related to some error in server configuration? i can tell the admin, if it’s the case…
Forum: Fixing WordPress
In reply to: Show 3 previous posts into a single post pageIf think i’m on the right way.
I’ve found this snippet of code from https://codex.www.ads-software.com/Function_Reference/WP_Query
// Create a new filtering function that will add our where clause to the query
function filter_where( $where = '' ) {
// posts in the last 30 days
$where .= " AND post_date > '" . date('Y-m-d', strtotime('-30 days')) . "'";
return $where;
}
add_filter( 'posts_where', 'filter_where' );$query = new WP_Query( $query_string );
i’ve managed to the the time of the current post with
global $wp_query;
$post_current_date = $wp_query->post->post_date;
but i don’t know how to change the code above…
i think i have to change “date(‘Y-m-d’, strtotime(‘-30 days’))” with “$post_current_date”, but i’m not able to get it without errors…
for example, this one:
function filter_where( $where = '', $post_current_date ) {
// posts più vecchi dell'attuale
$where .= " AND post_date < '" . $post_current_date . "'";
return $where;
}
add_filter( 'posts_where', 'filter_where', 10, 2 );$previous_query = new WP_Query( $query_string . "&posts_per_page=3");
gives “Catchable fatal error: Object of class WP_Query could not be converted to string in sidebar.php on line 21”
Any hint? Thank u
Forum: Fixing WordPress
In reply to: Show 3 previous posts into a single post pagethank u, but it seems that i get only the title of the post. How che i get the date and the excerpt?
It also seems the shows always the lastest 3 post, while i need to show the previous 3 post of the single post shown in the main area of the single.php
Forum: Fixing WordPress
In reply to: year list for custom post typethanks, but i’ve already read that posts.
I don’t have any problem creating the archive page for a year. I have problems getting the linked list of the year archive page.
Forum: Fixing WordPress
In reply to: list of custom taxonomies and number of related postok, now it works!
$myterms = get_terms('tema', 'orderby=name&order=ASC&number=0'); foreach ($myterms as $singleterm) { echo '<a href="' . get_term_link($singleterm, $singleterm->taxonomy ) . '">' . $singleterm->name . '</a> (' . $singleterm->count . ')<br />'; }
Thank u for the hint.
Forum: Fixing WordPress
In reply to: list of custom taxonomies and number of related postSomething like this?
$terms = get_terms('tema', 'orderby=name&order=ASC&number=0'); foreach ($terms as $term) { echo '<a href="' . get_term_link($term->termID) . '">' . $term->name . '</a> (' . $term->count . ')<br />'; }
It doesn’t seem to work….
Forum: Fixing WordPress
In reply to: Failing to import blogger commentsNo news?
I was able to import 250 comments (out of 3k+).
No one know how to resolve this issue?
I’ve found the blogger2wordpress python script but i’m not able to run it locally on my computer to convert the 9mb xml blogger exported file. And with this script is impossible to save the blogger permalink so it’s quite useless if someone wants to preserve the pagerank ??
Forum: Fixing WordPress
In reply to: Failing to import blogger commentsI’ve created a new blog in blogger and imported all the post from the original blog. Then i re-started the importer in wp self-hosted: post imported correctly, but only 9 comments!
??
Forum: Fixing WordPress
In reply to: 2.6 deleted all my WordPress Stats!!I’ve tried your method, but it dosen’t work for my blog ??
Anyone as any news?