• ???????

    (@domingojesusbagalacsa)


    Hi, My name is DJ, i’m developing a wordpress custom page to display a new job lists that is posted no longer than 7 days. i would like to ask if how may i going to output the templated content on a basic loop?

    eg.

    <?php /**
    * Template Name: new jobs listing
    */
    ?>
    <?php get_header(); ?>

    <!– [ #container ] –>
    <div id=”container” class=”innerBox”>
    <!– [ #content ] –>
    <div id=”content” class=”content”>
    <?php
    $argss = array(
    ‘post_type’ => ‘jobman_job’,
    ‘post_status’ => ‘publish’,
    ‘date_query’ => array(
    ‘column’ => ‘post_date’,
    ‘after’ => ‘- 7days’
    ),’order=>ASC’
    );

    ?>
    <?php $jobs = new WP_Query($argss); ?>
    <div id=”post-<?php the_ID(); ?>” class=”entry-content”>
    <h2>New Jobs</h2>
    <?php if ( $jobs->have_posts() ) while ( $jobs->have_posts() ) : $jobs->the_post(); ?>

    <div>‘><?php the_ID(); ?>   <?php the_title(); ?>
    <?php the_content(); ?> <!– i would like to ouput the content but i guess this will not work because its empty inside the jobman db, and i have no idea where data is stored by the plugin. is there any class or function available to output the created template inside display->settings?–>
    </div>

    <?php wp_link_pages( array( ‘before’ => ‘<div class=”page-link”>’ . ‘Pages:’, ‘after’ => ‘</div>’ ) ); ?>
    <!– .entry-content –>

    <?php edit_post_link(__(‘Edit’, ‘biz-vektor’),'<div class=”adminEdit”><span class=”linkBtn linkBtnS linkBtnAdmin”>’,'</span></div>’); ?>

    <?php endwhile; ?>
    </div>

    <?php // Child page list ?>
    <?php
    if($post->ancestors){
    foreach($post->ancestors as $post_anc_id){
    $post_id = $post_anc_id;
    }
    } else {
    $post_id = $post->ID;
    }
    if ($post_id) {
    $children = wp_list_pages(“title_li=&child_of=”.$post_id.”&echo=0″);
    if ($children) { ?>
    <div class=”childPageBox”>
    <h4>“><?php echo get_the_title($post_id); ?></h4>

      <?php echo $children; ?>

    </div>
    <?php } ?>
    <?php } ?>
    <?php // /Child page list ?>

    <?php get_template_part(‘module_mainfoot’); ?>

    <?php do_action(‘biz_vektor_snsBtns’); ?>
    <?php do_action(‘biz_vektor_fbComments’); ?>
    <?php do_action(‘biz_vektor_fbLikeBoxDisplay’); ?>

    </div>
    <!– [ /#content ] –>

    <!– [ #sideTower ] –>
    <div id=”sideTower” class=”sideTower”>
    <?php get_sidebar(‘page’); ?>
    </div>
    <!– [ /#sideTower ] –>
    <?php biz_vektor_sideTower_after();?>
    </div>
    <!– [ /#container ] –>

    <?php get_footer(); ?>

    • This topic was modified 9 years, 8 months ago by ???????.

The topic ‘Display the loop content template’ is closed to new replies.