stuk88
Forum Replies Created
-
Forum: Plugins
In reply to: [GN Publisher: Google News Compatible RSS Feeds] thumbnail not showingForum: Plugins
In reply to: [GN Publisher: Google News Compatible RSS Feeds] thumbnail not showingSo i’ve tried to remove the fetaured image from the content and add it as a media tag, as google instructing.
Will update if it works.Forum: Plugins
In reply to: [Rackspace CDN] Blank screensame problem here
wp 4.1Forum: Fixing WordPress
In reply to: Enable comments on Custom Post Typesor actually you could change the source code and submit your change to the plugin developers source code within github (most of the e-commerce plugins have a github open project)
so how to find where in the plugin you should change the supports line…
on woocommerce plugin i did that, that way:
while using sublime text editor I’ve searched all the files for the occurrence of the phrase:
'supports'
and that found me a couple of results but on the second result (the first find was a comment) I`ve got the code that declares new custom post type called “product”so the string is in woocommerce/woocommerce.php file (in your plugins directory)
on line 982so just after
, 'page-attributes'
add the following in the same line:
,'comments'
and save the file and upload to the server.
And that is it.you’ve added to the ‘product’ custom post type declaration the option of comments in this custom post type.
<em>a couple of foot notes:</em>
your are changing the source code of the plugin.
the next time the plugin goes for an upgrade all your changes will be deleted, and you will have to do this process again from the start.I think there is a way to re-declare the product custom post type with the new added support option, with calling this function with its attributes:
register_post_type
but i suggest that everybody should check that option only if they already know how to write php arrays and call functions…Forum: Plugins
In reply to: [Attachments] field with utf8 lanuguagegot it fixed.
add a line of code:$attachments = str_replace(‘\\’, ‘\\\\’, $attachments);
in the file class.attachments.php line 1556.
Forum: Networking WordPress
In reply to: wp-signup redirect to front page after sub-directory switchokay found it.
in the table wp_sitemeta the siteurl meta have not changed. so i`ve changed it. and its was all okay =]thx for reading while I was thinking. ??
Forum: Networking WordPress
In reply to: wp-signup redirect to front page after sub-directory switchyea firebug given me the aswer again
wp-signup page saysFailed to load source for: https://MYDOMAIN.com/wp-signup.php
without the www.
but after i disabled the www removal the link of the main site is including www
somehow the signup page checks for its own domain link saved somewhere…where should i look for its domain setting?
Forum: Networking WordPress
In reply to: wp-signup redirect to front page after sub-directory switchafter a quick check i noticed that i cant open pages, it just redirects me back to the main front page.
after changing the permalink of the page, I was able to open the page.
But still cant open the wp-signup page…any lead to where i need to search for its permalink? or rewrite rule?
Forum: Networking WordPress
In reply to: wp-signup redirect to front page after sub-directory switchI`ve checked all that…
the file is there…the weird thing is that when i try to open other PHP file that I made, its not redirecting me … but wp-signup does…
well i guess ill recheck the permalinks…could it be an htaccess problem?
Forum: Networking WordPress
In reply to: WordPress make too many unneeded queries in front pageyea i already posted in their forums…
they said its must be a bug…but i say its stupid coding… because the WP_REWRITE->FLUSH is called without an if condition or action hook…
its just there…
very inefficient.thx for the info about the permalinks structure.
Forum: Networking WordPress
In reply to: WordPress make too many unneeded queries in front pagewell its not needed actually…
the third line of the query array containing the function trace that executed the query itself.it says that the function that calls that query is WP_REWRITE
so its now depends on me to find what file or plugin calls the rewrite engine so many times…i have discovered that the members directory plugin have been the reason of 15 unneeded queries that auto shooted every time the page reloads … shame on wpmudev that developed so inefficient plugin code.
trying to find out what other plugins may call the rewrite engine so many times…
Forum: Networking WordPress
In reply to: WordPress make too many unneeded queries in front pageI’m using wordpress in ms state…
And no there isn’t any buddypress plugin in the system…The system is silly because the use of rewrite rules is miss implanted.
the sql query that does INSERT OR UPDATE to the rewrite rules every page refresh is unneeded.if the rewrite rules are changed the INSERT or UPDATE queries should be executed only when the change is being made.
so why does they are being executed every page refresh?moreover the queries of posts printing are made without any loop in the code!
Im using the wordpress ms as i said before, and the home.php template file isnt containing any posts printing loop.
So why the system does all that queries:[8] => Array
(
[0] => SELECT * FROM wp_1_posts WHERE ID = 135 LIMIT 1
[1] => 0.000222206115723
[2] => require, require_once, require_once, require_once, include_once, WP_Rewrite->flush_rules, WP_Rewrite->wp_rewrite_rules, WP_Rewrite->rewrite_rules, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post
)[9] => Array
(
[0] => SELECT ID, post_name, post_parent FROM wp_1_posts WHERE post_type = ‘attachment’ AND post_parent = 135
[1] => 0.000150918960571
[2] => require, require_once, require_once, require_once, include_once, WP_Rewrite->flush_rules, WP_Rewrite->wp_rewrite_rules, WP_Rewrite->rewrite_rules, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index
)[10] => Array
(
[0] => SELECT * FROM wp_1_posts WHERE ID = 33 LIMIT 1
[1] => 0.00022292137146
[2] => require, require_once, require_once, require_once, include_once, WP_Rewrite->flush_rules, WP_Rewrite->wp_rewrite_rules, WP_Rewrite->rewrite_rules, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post
)[11] => Array
(
[0] => SELECT ID, post_name, post_parent FROM wp_1_posts WHERE post_type = ‘attachment’ AND post_parent = 33
[1] => 0.000182867050171
[2] => require, require_once, require_once, require_once, include_once, WP_Rewrite->flush_rules, WP_Rewrite->wp_rewrite_rules, WP_Rewrite->rewrite_rules, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index
)[12] => Array
(
[0] => SELECT * FROM wp_1_posts WHERE ID = 30 LIMIT 1
[1] => 0.000212907791138
[2] => require, require_once, require_once, require_once, include_once, WP_Rewrite->flush_rules, WP_Rewrite->wp_rewrite_rules, WP_Rewrite->rewrite_rules, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post
)[13] => Array
(
[0] => SELECT ID, post_name, post_parent FROM wp_1_posts WHERE post_type = ‘attachment’ AND post_parent = 30
[1] => 0.000151872634888
[2] => require, require_once, require_once, require_once, include_once, WP_Rewrite->flush_rules, WP_Rewrite->wp_rewrite_rules, WP_Rewrite->rewrite_rules, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index
)[14] => Array
(
[0] => SELECT * FROM wp_1_posts WHERE ID = 18 LIMIT 1
[1] => 0.000221014022827
[2] => require, require_once, require_once, require_once, include_once, WP_Rewrite->flush_rules, WP_Rewrite->wp_rewrite_rules, WP_Rewrite->rewrite_rules, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post
)[15] => Array
(
[0] => SELECT ID, post_name, post_parent FROM wp_1_posts WHERE post_type = ‘attachment’ AND post_parent = 18
[1] => 0.000150918960571
[2] => require, require_once, require_once, require_once, include_once, WP_Rewrite->flush_rules, WP_Rewrite->wp_rewrite_rules, WP_Rewrite->rewrite_rules, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index
)[16] => Array
(
[0] => SELECT * FROM wp_1_posts WHERE ID = 2 LIMIT 1
[1] => 0.000205039978027
[2] => require, require_once, require_once, require_once, include_once, WP_Rewrite->flush_rules, WP_Rewrite->wp_rewrite_rules, WP_Rewrite->rewrite_rules, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index, get_page_uri, get_page, get_post
)[17] => Array
(
[0] => SELECT ID, post_name, post_parent FROM wp_1_posts WHERE post_type = ‘attachment’ AND post_parent = 2
[1] => 0.000150918960571
[2] => require, require_once, require_once, require_once, include_once, WP_Rewrite->flush_rules, WP_Rewrite->wp_rewrite_rules, WP_Rewrite->rewrite_rules, WP_Rewrite->page_rewrite_rules, WP_Rewrite->page_uri_index
)Forum: Plugins
In reply to: new post hookyea i know that didnt help me in the first time either..
my quastion was how to check if the saved post was a new post or just an update to an exiting post…I already found a way to check this…
new post doesnt have any id set to it yet.
so the code looks like that:
if($post->post_parent == 0 && $post->post_type == 'post' && !$post->ID)
i had to do some other check on deleted post either, because the “delete_post” hook run whenever a post data deleted… page or post or revision…
Forum: Plugins
In reply to: new post hookThere is any way to hook to a new post creation?
Anyone?Forum: Plugins
In reply to: new post hookyup already checked there…
i didnt able to find any “new_post” like, hook.