Title: help with code
Last modified: August 31, 2016

---

# help with code

 *  [sava94](https://wordpress.org/support/users/sava94/)
 * (@sava94)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/help-with-output/)
 * help with code
 *     ```
       <?php include_once("pars/id.php") ?>
       ```
   
 *  instead id.php was the post ID .
 * for example:
 *     ```
       <?php include_once("pars/100.php") ?>
       <?php include_once("pars/351.php") ?>
       <?php include_once("pars/103.php") ?>
       ```
   
 * the function `get_the_ID();` in the code is not working

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

 *  Moderator [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * (@jcastaneda)
 * THEME COFFEE MONKEY
 * [10 years, 4 months ago](https://wordpress.org/support/topic/help-with-output/#post-6924951)
 * HI sava94!
 * What exactly are you trying to do? `get_the_ID()` works inside of the WordPress
   loop. Are you trying to load a specific template for a post? If that is the case,
   you may want to look into using the template hierarchy to your advantage on this.
   If you are not familiar with this, read:
    [https://developer.wordpress.org/themes/basics/template-hierarchy/](https://developer.wordpress.org/themes/basics/template-hierarchy/)
 *  Thread Starter [sava94](https://wordpress.org/support/users/sava94/)
 * (@sava94)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/help-with-output/#post-6924968)
 * HI Jose Castaneda!
    I’m trying to connect to each individual post grabber , which
   will be located in the right column
 *  Moderator [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * (@jcastaneda)
 * THEME COFFEE MONKEY
 * [10 years, 4 months ago](https://wordpress.org/support/topic/help-with-output/#post-6925069)
 * What do you mean by “post grabber”?
 * Are you talking about using a `WP_Query` and then loading the post’s file?
 * Please, _explain_ as to what you are tying to achieve a little more.
 *  Thread Starter [sava94](https://wordpress.org/support/users/sava94/)
 * (@sava94)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/help-with-output/#post-6925078)
 * Grabber ( parser ) this is the code which pulls any needed information from other
   sites .
 * Here is an example code:
 *     ```
       <?php
       function parse($p1, $p2, $p3) {
       $num1 = strpos($p1, $p2) ;
       if ($num1 === false) return 0;
       $num2 = substr($p1, $num1);
       return strip_tags(substr($num2, 0, strpos($num2, $p3)));
       }
   
       $String = file_get_contents('https://wordpress.org/');
       echo parse($String, '<h5>', '</div>');
       ?>
       ```
   
 * Here is some example output:
 *     ```
       WordPress 4.4.1 Security and Maintenance Release WordPress 4.4.1 is now available. This is a security release for all previous versions and we strongly encourage you to update your sites immediately. WordPress versions 4.4 and earlier are affected by a cross-site scripting vulnerability that could allow a site to be compromised. This was reported by Crtc4L. There were also several non-security bug fixes: Emoji […]
       ```
   
 * can’t make a conclusion in sidebar.php . In each record
 * tried to quote the code shows error.
    tell me how this code worked, using quotes
   I’m sorry I’m writing through a translator

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

The topic ‘help with code’ is closed to new replies.

## Tags

 * [output](https://wordpress.org/support/topic-tag/output/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [sava94](https://wordpress.org/support/users/sava94/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/help-with-output/#post-6925078)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
