Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress php tough question

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #39280
    cybershot
    Participant

    I am working on making a theme in WordPress. I am using SMOF to code the admin area. here is the documentation. SMOF Documentation The SMOF comes with a way to split up a page into block sections. You can then drag and re arrange these blocks. My problem is that I need to query the database of a specific category to get the posts. That is the easy part. The hard part is putting the query into a switch statement so that each post can be moved using the block features. Here is the code snipped for the options framework


    $layout = $data;

    if ($layout):

    foreach ($layout as $key=>$value) {

    switch($key) {

    case 'block_one':
    ?>


    break;
    case 'block_two':
    ?>


    break;
    //repeat as many times necessary

    }

    }

    endif;
    ?>

    Here is my query


    'homepage', 'posts_per_page' => -1 ) );
    global $more;
    $more= 0;

    while ( have_posts()) : the_post();
    the_excerpt( );


    endwhile;
    wp_reset_query();
    ?>
Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.