Gloria
Forum Replies Created
-
Forum: Plugins
In reply to: [Ginger - EU Cookie Law] Google AdSense issueI used:
remove_filter( ‘ginger_script_async_tags’, ‘ginger_addsesneremover’ );
copy and paste in functions.php fileForum: Plugins
In reply to: [W3 Total Cache] W3 Cache / WordPress 4.8.1 Compatibility issues?The same problem after updating wordpress version (4.8.1).
I can’t:
– enable/disable plugins (sometimes)
– edit options and widgets (in some websites)Forum: Fixing WordPress
In reply to: Duplicate email addresses in wp_usersThank for your answer.
I had an old database. I had a table with this fields: “id”, “title”, “content”, “email”, ecc…
So I converted the database.
id => ID
title => post_title
content => post_content
email => (I replaced the email address with the id) => post_authorBEFORE (example)
id = 10
title = Hello!
content = It’s ok
email = [email protected]AFTER (example)
ID = 10
post_title = Hello!
post_content = It’s ok
post_author = 10I created the new users with id and email addresses… So I have +5000 duplicated users with different id, but the same email addresses.
So I have a normal database with wp_users and wp_usermeta. The users has different ids, but duplicate email addresses.
I can go in Admin panel > Users > “Attribute all contents to a user” and assign the posts to a user, but I have +5000 users and I try something automatic…
Forum: Hacks
In reply to: Add author dropdown to quick draft (dashboard)I created a new function and added a select with post_author. It’s ok.
There is a problem. When I write the quick draft and click on the “save draft” button, the fields are not cleared…
The same thing happens when I copy the same code from dashboard.php and paste (I rename only the function, so the code is the same…).
Forum: Fixing WordPress
In reply to: Latest posts with same terms of the current postThanks, it works with a small edit.
$terms generate already an array, so this'terms' => array( $terms )
is (without “array”) =>'terms' => $terms
The final code:
$terms = wp_get_post_terms($post->ID, 'ingredients', array("fields" => "ids")); $args = array( 'posts_per_page' => 3, 'post_type' => 'recipe', 'tax_query' => array( array( 'taxonomy' => 'ingredients', 'field' => 'id', 'terms' => $terms ) ) ); $the_query = new WP_Query( $args );
Forum: Fixing WordPress
In reply to: If I've 5.000 posts or pages? WordPress goes down?Ok perfect. Thanks ??
Forum: Fixing WordPress
In reply to: If I've 5.000 posts or pages? WordPress goes down?@wpyogi: In this moment, I use the version 3.7.1
…
Many months/years ago I had the version 2.x.x. My permalink structure was/%category%/%postname%/
and when I wrote ~1.000 posts, the blog crashed (the rules in the database are increased).Now I have the version 3.7.1 and I’d like to use WordPress for my content (~ 5.000 post/page/post-type…) with the same permalink structure.
Will I have some problem?Thanks.
Forum: Fixing WordPress
In reply to: If I've 5.000 posts or pages? WordPress goes down?Thanks for your answers.
This question because in the latest version (2.x.x) of WordPress I had some problem with the blog. I had ~1.000 posts and the permalink was
/%category%/%post-name%
. So, the blog crashed and it was very slow.I know that the structure of the rules has been improved, and I wanted know if now it were possible with the same structure of the permalink.
Forum: Fixing WordPress
In reply to: If I've 5.000 posts or pages? WordPress goes down?The number of posts and pages are an example.
Forum: Fixing WordPress
In reply to: Add rewrite rules with taxonomyNobody?
Forum: Fixing WordPress
In reply to: Custom post type: Archive template doesn't workI resolved. I wrote has_archive => ‘true’ instead has_archive => true
Forum: Fixing WordPress
In reply to: Latest post in home with different styleEDIT.
Sorry, your last code is correct and now it works.
Thanks.Forum: Fixing WordPress
In reply to: Latest post in home with different styleSo, I edit home’s code and changed your code:
<?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_post_thumbnail('thumbnail'); ?><br/><?php the_title(); ?></a> <?php endwhile; endif; ?>
but still doesn’t work… Now the home page isn’t blank, but the thumbanils aren’t alignment…
Forum: Fixing WordPress
In reply to: Latest post in home with different styleHi alchymyth.
When I add that code in functions.php, the home page become blank, so it dowsn’t work.I have this code in home page:
<?php $myposts = get_posts('numberposts=4&category=3'); foreach($myposts as $post) : ?> <?php the_post_thumbnail('thumbnail'); ?> <?php the_excerpt(); ?> <?php setup_postdata($post); ?> <?php endforeach; ?>
Forum: Fixing WordPress
In reply to: Comments number of a single userI tried this function:
function commentCount() { global $wpdb; $count = $wpdb->get_var('SELECT COUNT(comment_ID) FROM ' . $wpdb->comments. ' WHERE comment_author_email = "' . get_comment_author_email() . '"'); echo $count . ' comments'; }
and doesn’t work, because it count only user comments in a post.
Ex:
I’m in a page with ID=5, and I commented 5 time, the function counts 5 comments for me.
I go in a page with ID=8, I commented 2 time, the function counts 2 comments for me.
While, it should count 7 comments…I added this code in a sidebar and it displays when a user is logged.