WordPress Plugin

Discussion in 'PHP' started by morency, May 20, 2014.

  1. #1
    Hy!
    I am new with WP and WP plugins !
    I want to make a plugin to help me posting on my site !
    My ideea is simple , I made a small script who grab info from other sites and i want to post in my wp site.
    
    ///[.....] my script who grab infos -> $title & $content
    // example from wp codex
    $my_post = array(
    'post_title' => $title,
    'post_content' => $content,
    'post_status' => 'publish',
    'post_author' => 1,
    'post_category' => array(1,2)
    );
    // Insert the post into the database
    wp_insert_post( $my_post );
    
    PHP:
    I created a plugin (one simple php file ), zipped and uploaded . I activated but somehow is included in all site pages.

    In wp-admin the plugin is just in Plugin Tab . I want to apeear on Settings Tab and be used from there like a normal web page .

    Thank you
     
    morency, May 20, 2014 IP
  2. easyturnkeywebsites

    easyturnkeywebsites Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    If you want a administration plugin to scrape content from other sites and push into wordpress, then you would need to hook on the menu and create a new menu item, a new page that submits and processes everything you need to. when you activate a plugin, it is normally included in every load unless you specify the action, filter...etc.
     
    easyturnkeywebsites, May 20, 2014 IP