Title: Custom code
Last modified: December 17, 2016

---

# Custom code

 *  [bbhank](https://wordpress.org/support/users/bbhank/)
 * (@bbhank)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/custom-code-3/)
 * I have a selection menu that selects from 6200 listings in the database. Each
   of these is a WordPress page, not post. There are more pages to the site that
   are not selected by this menu. I am upgrading and the old theme could not be 
   used in the newest versions of WordPress. It has never been upgraded to work 
   with the new WP. I chose Customizr after trying many others.
    Selections from
   this menu need extra code to show some data from the database on each page that
   is specific to the individual page. I was able to accomplish this in the previous
   version by using multiple themes and a theme switcher – much easier than trying
   to deal with child themes. The old theme allowed me to duplicate and rename it
   and add the code to the new theme. With Customizr, this does not work. I tried
   making a child theme and could not get this to work, either partially due to 
   how complex dealing with a child theme is and/or not being able to find where
   to place the code so it would appear where needed. There was no readily available
   succinct information on how to do this with a child theme. Several plugins were
   tried and either the code won’t execute or the plugins didn’t work at all. One
   even puts in the code twice without executing it and even duplicates the graphics,
   but does not execute the php. The code must display its results immediately after
   the title. It contains information related to the particular title and is needed
   on each page selected by the selection menu.
 * Where does this code go in order for it to even show up, and How to get it to
   run as required is the issue. It is to run only on pages selected by the selection
   menu.

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

 *  [chanceduponthis](https://wordpress.org/support/users/chanceduponthis/)
 * (@chanceduponthis)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/custom-code-3/#post-8565832)
 * This forum is for software support and troubleshooting software issue.
    If you
   need custom work, you can hire help from [http://jobs.wordpress.net](http://jobs.wordpress.net)
 *  Thread Starter [bbhank](https://wordpress.org/support/users/bbhank/)
 * (@bbhank)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/custom-code-3/#post-8566297)
 * Not looking for “custom work”.
    Please answer question as asked. I was told by
   Customizr support to post this issue here.
    -  This reply was modified 9 years, 5 months ago by [bbhank](https://wordpress.org/support/users/bbhank/).
 *  [Menaka S.](https://wordpress.org/support/users/menakas/)
 * (@menakas)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/custom-code-3/#post-8570654)
 * Hi [@bbhank](https://wordpress.org/support/users/bbhank/),
    // I tried making
   a child theme and could not get this to work, either partially due to how complex
   dealing with a child theme is and/or not being able to find where to place the
   code so it would appear where needed. There was no readily available succinct
   information on how to do this with a child theme. // You have to add php code
   in the functions.php file of the chidl theme.
 *  Thread Starter [bbhank](https://wordpress.org/support/users/bbhank/)
 * (@bbhank)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/custom-code-3/#post-8579231)
 * Where and what code EXACTLY. Be more specific.
    The reverse of this is also acceptable
   where most pages have the code there are exceptions that don’t have the code.
   There are more pages that have the code than don’t. Out of 6200 pages there are
   around 200 that are required not to have it. The code is not to appear on any
   posts(articles). This site is page oriented, not post oriented. Here Posts are
   articles and pages are pages.
 * This is a website, NOT a blog.
    -  This reply was modified 9 years, 4 months ago by [bbhank](https://wordpress.org/support/users/bbhank/).
    -  This reply was modified 9 years, 4 months ago by [bbhank](https://wordpress.org/support/users/bbhank/).
 *  [Menaka S.](https://wordpress.org/support/users/menakas/)
 * (@menakas)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/custom-code-3/#post-8579885)
 * Hi [@bbhank](https://wordpress.org/support/users/bbhank/),
    You mentioned that
   you already have some code and wanted to put it in the child theme.
 * Create a child theme using this plugin: [https://wordpress.org/plugins/childify-me/](https://wordpress.org/plugins/childify-me/)
 * Place your code in the functions.php file inside the child theme directory. Inside
   the functions.php file, place it anywhere within `<?php` and `?>`

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

The topic ‘Custom code’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/customizr/4.4.24/screenshot.png)
 * Customizr
 * [Support Threads](https://wordpress.org/support/theme/customizr/)
 * [Active Topics](https://wordpress.org/support/theme/customizr/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/customizr/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/customizr/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Menaka S.](https://wordpress.org/support/users/menakas/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/custom-code-3/#post-8579885)
 * Status: not resolved