WebTechGlobal
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Post Shows (No Title) But Has Title On OpeningSorry folks this is fixed, I was causing it somewhere in my code, can’t say where and how it is top secret lol
Basically intercepting the posts loop and editing $posts but some sort of variable miscount was skipping first record.
Forum: Fixing WordPress
In reply to: Post Shows (No Title) But Has Title On OpeningWhen I add more posts, the last post always shows ( no title ) and the title suddenly appear for others however the actual page is still blank.
Forum: Fixing WordPress
In reply to: How do I intercept Post/Page and edit before it is viewed?I done it, I think. I must be tired, I know well that if you edit an array it’s no different and can just return it, I was thinking I had to make my own array and re-build it after looking at someones example.
function eci_updatethepost( $posts )
{
global $wpdb;//loop through all the post objects
foreach( $posts as $post )
{
// get post meta – custom fields
$postupdated = get_post_meta($post->ID, ‘eci_lastupdate’, true);
$recordid = get_post_meta($post->ID, ‘eci_recordid’, true);
$tablename = get_post_meta($post->ID, ‘eci_tablename’, true);// get record date from database table
$table_name = $wpdb->prefix . $tablename;// build full tablename
$query = “SELECT updated FROM" . $table_name . "WHERE postid =". $post->ID ."“;
$recordupdated = $wpdb->get_var(‘query’);
}return $posts;
}Forum: Fixing WordPress
In reply to: How do I intercept Post/Page and edit before it is viewed?I can’t do something like this, its not just the content I need to update its custom fields/meta also.
http://www.fahlstad.se/2006/08/using-wordpress-filters-a-tutorial/
Whatever I do I’ll need the post ID so I think I need the entire post object.
Forum: Fixing WordPress
In reply to: How do I intercept Post/Page and edit before it is viewed?Problem I have is that using it results in no posts on the page and I think it may be because I need to return the posts that go into this function.
Anyway thats how far I got since yesterday but still not perfect.
Thanks
Forum: Fixing WordPress
In reply to: How do I intercept Post/Page and edit before it is viewed?I’m coding a plugin so it must be an action hook/filter much like this…
// intercept all posts and review content, do any editing to data and current values
function eci_updatethepost( $posts )
{
global $wpdb;$allposts = array();
//loop through all the post objects
foreach( $posts as $post )
{
//var_dump($post);
//echo $post->ID.’Post ID’;// get post meta – custom fields
$postupdated = get_post_meta($post->ID, ‘eci_lastupdate’, true);
$recordid = get_post_meta($post->ID, ‘eci_recordid’, true);
$tablename = get_post_meta($post->ID, ‘eci_tablename’, true);// get record date from database table
$table_name = $wpdb->prefix . $tablename;// build full tablename
$query = “SELECT updated FROM" . $table_name . "WHERE postid =". $post->ID ."“;
$recordupdated = $wpdb->get_var(‘query’);//echo $postupdated;
//echo $recordupdated;}
return $
}Forum: Fixing WordPress
In reply to: Import data from a text file as posts?Best plugin on the market for this task is Easy CSV Importer but its meant for professional use, lots of data and lots of blogs.
http://www.webtechglobal.co.uk/services/wordpress-support/premium-plugins/easy-csv-importer
Get WordPress Easy CSV Import for only £29.99 now before it increases too £99.99 later in April, it’s worth £99.99 maybe more check it out and see.
Forum: Fixing WordPress
In reply to: WordPress Loading slowMy wordpress won’t even load half the time since that upgrade. Been like that for months now. Just hangs there constantly, other sites on my hosting are fine, none wordpress that is.
Forum: Plugins
In reply to: WYSIWYG Content Messed Up On SubmissionFIXED
Realised I was missing this…
$_POST = stripslashes_deep($_POST);
Forum: Plugins
In reply to: WYSIWYG Content Messed Up On SubmissionI should have said that the content includes an image but is being reduced to that above and the actual post created has no content at all, that shown above doesnt even end up in the content!
Forum: Fixing WordPress
In reply to: Are POT Files Created Automatically?Another good page, after reading it I think the page here on wordpress could be improved…
http://weblogtoolscollection.com/archives/2007/08/27/localizing-a-wordpress-plugin-using-poedit/
Miss this link for anyone else…
I’ve never seen translation used in that way.
Are you using the POT and MO files?
The whole point of the __() and putting text in it is to tell wordpress that string should be translated. It then looks into the MO files for the alternative doesnt it?
If your way works then great but it looks like far too much work.
WebTechGlobal
Forum: Fixing WordPress
In reply to: Cannot Avoid Creating Duplicate CategoriesI can’t believe I just fixed it after debugging for another entire day and coming here for help!
Replace wp_insert_category with wp_create_category and it works better. I’m not going to look into why right now, but ye why would one cause the child of a parent to not be detected and so a duplicate is created BUT when that duplicate is created the initial child gets used for the new posts!
Forum: Fixing WordPress
In reply to: Grand Child Categories Missing in AdminI’ve went through all of those links and cannot find a solution to this in 2.8.6!
Someone must have a reason why this is happening.
Could it be that half way through creating categories there is a failure and only part of the data is saved which then throws off the rest of the blogs categories forever?!