• Resolved HorrorUK

    (@horroruk)


    I’m trying to create a theme where the user can type in the ID number of a certain category, and it will then load that category into a certain section.

    I have created an option panel in admin with the name:

    fareham_film_category_id

    I usually use this code for tellign it the category:

    <?php $my_query = new WP_Query('showposts=5&offset=0&cat=4'); ?>

    I am trying this, but only get a white screen ??

    <?php $my_query = new WP_Query('showposts=5&offset=0&cat=<?php echo get_option('fareham_film_category_id'); ?>'); ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • MichaelH

    (@michaelh)

    <?php $my_query = new WP_Query('showposts=5&offset=0&cat='.get_option('fareham_film_category_id')); ?>

    Thread Starter HorrorUK

    (@horroruk)

    Thank you :oD

    I was startign to run out of hair to pull out.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using option panel entry for category ID’ is closed to new replies.