Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter K.O

    (@ko-1)

    My site needed a full re-install anyway, so i re-installed the site on a brand new database and then imported all my posts/categories again..
    Im now having the same problem as before, the category widget is only picking up on a select few categories.

    I presume this could be related to my old installation, where maybe for some reason the categories may have been placed within the wrong table.

    Other than that doesnt look like any proper solution, i will end up re-adding the categories over time…

    Thread Starter K.O

    (@ko-1)

    Yea, but how then is the category plugin not picking up on the categories, if they are already within the proper table?

    Any new categories i add are being displayed within the category widget.

    Confusing stuff!

    Thanks!
    K.O

    Thread Starter K.O

    (@ko-1)

    If i could find the table the category plugin is looking for, and then add in the categories, in theory that would work?

    Thread Starter K.O

    (@ko-1)

    Thanks for the links, that wont make a difference unfortunately.
    I have already set the upload size limit to 128mb, but after about 300 imports the import returns and error something along the lines of “fatal error maximum memory allocation exhausted”

    Re-adding the categories works though, i do have a list of all my categories in a textfile, is there anyway to manually add them into the database?

    Thread Starter K.O

    (@ko-1)

    Might try repairing your database tables.

    How can i do this?

    I cant re-import, using the .xml generated by wordpress. Thats just not an option, there are just way to many posts. (It fails after importing 300posts so i need to split the xml file into seperate parts, and re-import each one.)

    Thread Starter K.O

    (@ko-1)

    Are the categories in your terms tables? Use phpMyAdmin to look at that.

    Yes, all my categories are within the terms table.

    If you visit Posts->Categories do you see your categories?

    Just checked and im not seeing any categories there.
    On my dashboard however it reports having my 2000+ categories.

    If you edit a post, does the post reflect that categories are attached?

    Yes if i edit a post, the cateogry is still attached.

    Thread Starter K.O

    (@ko-1)

    Ok heres the code thats displaying before the first two posts. After that the code just gets mixed in with the post itself.

    http://wordpress.pastebin.com/m27c76a35

    Just an update, the drafts are now showing on the dashboard through the widget, it only needs to be amended to display the top ten draft posts and titles of the posts only.

    Seems like a good bit of work in this.
    Thanks for your code snippet t31os_ ill see if i can get that to work.

    K.O

    Thread Starter K.O

    (@ko-1)

    Hey apljdi,
    WP_Query was used.

    Ok so what i gathered from your post was to uncomment the line and add in either query_posts or WP_Query, on the line:
    // $drafts = new WP_Query($args);

    With this done the widget shows on my subscribers dashboard but displays lots of random php code:

    WP_Query Object ( [query_vars] => Array ( [post_status] => drafts [error] => [m] => 0 [p] => 0 [post_parent] => [subpost] => [subpost_id] => [attachment] => [attachment_id] => 0 [name] =>
    this goes on for quite a while

    Then it just lists off the posts on my homepage, images and text included.

    The code im currently using, pretty much the same as what you pasted above:
    `// Create the function to output the contents of our Dashboard Widget

    function example_dashboard_widget_function() {
    // Display whatever it is you want to show
    $args= array(
    ‘post_status’ => ‘drafts’
    );
    $drafts = query_posts($args);
    $drafts = new WP_Query($args);
    print_r($drafts);
    }

    // Create the function use in the action hook

    function example_add_dashboard_widgets() {
    wp_add_dashboard_widget(‘example_dashboard_widget’, ‘Upcoming Posts’, ‘example_dashboard_widget_function’);
    }

    // Hook into the ‘wp_dashboard_setup’ action to register our other functions

    add_action(‘wp_dashboard_setup’, ‘example_add_dashboard_widgets’ );

    Ive absolutely no knowledge of php so please forgive me! :/

    Thanks! 🙂

    Thread Starter K.O

    (@ko-1)

    Great! its now displaying on my dashboard.
    However its not displaying current drafts, its listing the latest posts that are on the first page of my website.

    Any chance you could help me out in setting the output to simply list the current draft titles? Thanks be lost without the help.

    K.O

    Thread Starter K.O

    (@ko-1)

    Hey t31os_,

    I think what K.O is asking, is how to pull a list of draft posts into a dashboard widget for subscribers only…

    Thats exactly what im after!

    If you could help me out, that would really be fantastic. Even with the documentation im still unsure of the files needed to edit and where to place the code within them.

    Thanks!

    Thread Starter K.O

    (@ko-1)

    Setting it up within the themes functions is fine.

    Below is the code in the functions file. Where can i slot in esmi’s code? I’ve tried it on my own which crashed my site.

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
            'before_widget' => '<div class="sidebar-box"><div class="sidebar-box-top"><div class="sidebar-box-bottom">',
            'after_widget' => '</div></div></div>',
            'before_title' => '<h3>',
            'after_title' => '</h3>',
        ));
    
    //GsL98DGtpo0W

    Thanks!

    Thread Starter K.O

    (@ko-1)

    Thanks apljdi,
    Ive read through the documentation but im still unsure as to where the code should be placed within my files.

    Any guidance on where it should be placed would really be appreciated.

    Thanks for your time.
    – K.O

    Thread Starter K.O

    (@ko-1)

    Any ideas anyone?

    Thanks.

    Thread Starter K.O

    (@ko-1)

    Hi esmi,
    Thanks for the reply!
    This works, however its not really what im after.

    What i need is for a list of draft names to appear on the subscribers dashboard, once the subscriber logs in.
    The above code placed all drafts on a page, in their entirity.

    As an example i have made up an image of what it should look like;
    [img]http://i47.tinypic.com/2rxheo1.jpg[/img]

    It needs to movable aswell, so the subscriber can place it anywhere they wish on the dashboard.

    The recent drafts list appears on the administrators dashboard, i would basically like this to show on the subscribers dashboard, minus having the draft links clickable (viewable only)

    Thanks again.

Viewing 14 replies - 1 through 14 (of 14 total)