collaboratorfab
Forum Replies Created
-
Forum: Plugins
In reply to: [Post From Site] [Plugin: Post From Site] Publish on specific pageHi raybanm,
You can use triggers in order to solve this. Just asign a category to a new post (for example, post_images) with a trigger in table wp-posts, and then block this category from your home page adding
<?php query_posts($query_string . ‘&cat=-11’); ?>
just before “if (have_posts()…. ” on your index.php and assuming that 11 is the id of the category that you want to block.
Then create a new item in your main menu and asign it to “post_images” category.
Edited: a trigger like this one could be valid for you. You mast change 11 for the real id of the category “post_images”.
DELIMITER $$
CREATE TRIGGER asigncategory AFTER UPDATE ON
wp_posts
FOR EACH ROW BEGIN
INSERT INTOwp_term_relationshipsVALUES (NEW.ID, ’11’, ‘0’);
END;$$
DELIMITER ;
Hi,
It’s a good idea. I’ve tried to do it but I wasn’t able to. I’ve tried with triggers in the database too, but it wasn’t work properly.
Any way to do it?
Thank you!
Hi all,
I have the same problem exposed above, and it’s a problem because the user doesn’t know if the post has been published. Any way to fix it?
Thank you very much!
Collab