Forum Replies Created

Viewing 15 replies - 16 through 30 (of 33 total)
  • Thread Starter cailean

    (@cailean)

    As I’ve already mentioned to Ken, one post per page is default WP behaviour. I suspect that the permalinks are, in fact, breaking the plugin.

    I’m currently trying to refactor the plugin for WP2.0, during which time I should be able to add support for permalinks.

    Thread Starter cailean

    (@cailean)

    this issue has mysteriously disappeared…

    Thread Starter cailean

    (@cailean)

    k, just lettin you folks know…

    Thread Starter cailean

    (@cailean)

    well, I could do that, but code was downloaded about half an hour before I found the error and posted…

    Thread Starter cailean

    (@cailean)

    One zip file en-route to New Mexico…

    For the rest of you, if Ken gets it working, I’ll assume it’s good enough for the masses and release it. ??

    Thread Starter cailean

    (@cailean)

    it’s coming… I haven’t had a chance to test it with the 2.0 beta, yet and I don’t see much point in releasing a plugin that will break with 2.0. It does work, though, which is cool!

    Forum: Plugins
    In reply to: Write post in pages

    I have written a plugin that does exactly what you want… it uses the built-in ‘post_parent’ field and applies it to posts… basically, every post has a ‘parent’ which is the appropriate page. This allows you to use categories across pages. The plug-in has not been released yet… very soon, I promise…

    Forum: Plugins
    In reply to: Shwing posts by post_parent
    Thread Starter cailean

    (@cailean)

    any help here, folks?

    Forum: Plugins
    In reply to: Shwing posts by post_parent
    Thread Starter cailean

    (@cailean)

    okay, ignore the code snippet above… I see the error of my ways!

    I am 99% there I just have one little issue – the most recent post is not being shown!

    Here is all the relevant plugin code:

    function p2p_parentSelect() {
    global $post_ID, $wpdb;
    $post_parent = $wpdb->get_var("SELECT post_parent FROM $wpdb->posts WHERE ID = $post_ID ");

    echo '<fieldset id="postparent" rel="'.$post_parent.' - '.$post_ID.'">';
    echo '<legend>Assign to Page</legend> ';
    echo '<div><select name="parent_id">';
    parent_dropdown($post_parent);
    echo '</select></div></fieldset>';
    }
    add_action('simple_edit_form', 'p2p_parentSelect');
    add_action('edit_form_advanced', 'p2p_parentSelect');

    function p2p_query($where) {
    if(is_page())
    {
    $where = " AND post_parent=".$_GET['page_id'];
    }

    return $where;
    }
    function p2p_func(){
    add_filter('posts_where', 'p2p_query', 11);
    query_posts('');
    }

    the first loop in the page runs normally and then p2p_func() is called immediately before the second loop… works except most recent post is always missing!
    `

    Forum: Plugins
    In reply to: Shwing posts by post_parent
    Thread Starter cailean

    (@cailean)

    Here’s the filter I’m using…


    function p2p_query($where) {
    global $post_id, $wpdb;
    $where = " AND post_parent=$post_id";
    return $where;
    }
    add_filter('posts_where', 'p2p_query');

    Thread Starter cailean

    (@cailean)

    K, quick question…
    I’m using the post_parent field for assigning the posts to pages (essentially a post becomes a child of a page…)

    Anyway, how would the custom query for the posts go? The first query (loop) on the page would be the page’s post content… (it can stay as is)

    The second loop would pull all the posts where the value of post_parent is the current page’s ID… I guess there isn’t a simple query_posts() method?

    Thread Starter cailean

    (@cailean)

    Sorry, folks, holiday weekend here in Canada means lots of family and little coding…

    The plug-in is coming and I do have some questions for you all… I will be diving back into the plug-in tonight.

    Thread Starter cailean

    (@cailean)

    I’m in the process now of converting my ‘hack’ into a proper plug-in… how soon is ASAP?

    Forum: Fixing WordPress
    In reply to: GUID for posts

    I have the same problem…

    k, so I altered the siteurl in the DB as suggested at tamba2.org… the only link that seems to fix is the login link now points to the correct URL all links to posts and pages point to https://www.oldurl.com/?p=x which is the value of the GUID… Please tell me I don’t have to go through and manually change all the GUIDs…

    Thread Starter cailean

    (@cailean)

    I’ve got it now… I had to make a custom query_posts() parameter to filter by page_id. Everythings good now!

    I suppose I should figure out how to make this a plugin…

Viewing 15 replies - 16 through 30 (of 33 total)