Php 显示自定义文章类型标题的列表

Php 显示自定义文章类型标题的列表,php,javascript,jquery,ajax,wordpress,Php,Javascript,Jquery,Ajax,Wordpress,我正在使用以下代码显示自定义帖子类型的列表: <!-- List post types --> <?php $args = array( 'post_type'=>'artworks_post', 'title_li'=> __('') ); wp_list_pages( $args ); ?> 问题是我无法控制该列表,是否有其他方法可以显示自定义文章类型标题的列表,从而控制如何

我正在使用以下代码显示自定义帖子类型的列表:

    <!-- List post types -->
    <?php $args = array(
        'post_type'=>'artworks_post',
        'title_li'=> __('')
    );
    wp_list_pages( $args ); 
    ?> 

问题是我无法控制该列表,是否有其他方法可以显示自定义文章类型标题的列表,从而控制如何进行标记?

使用常规ol'

//查询
$the_query=new WP_query('post_type=artworks_post');
//环路
while($the_query->have_posts()):$the_query->the_post();
回声';
结束时;
//重置Post数据
wp_reset_postdata();
使用常规ol'

//查询
$the_query=new WP_query('post_type=artworks_post');
//环路
while($the_query->have_posts()):$the_query->the_post();
回声';
结束时;
//重置Post数据
wp_reset_postdata();

我希望能够将:rel=“”添加到物品列表的“a”中我希望能够将:rel=“”添加到物品列表的“a”中,我们必须在其中写入此代码。你能说出文件的路径吗?这取决于你的主题。如果你把这段代码放在函数文件中,它不会有多大用处。如果你把它包装在一个函数中,并在你的主题中的某个地方调用这个函数,它就会。如果你把它放在一个页面模板中,它会显示在任何一个有该页面模板的页面上。你能说出文件的路径吗?这取决于你的主题。如果你把这段代码放在函数文件中,它不会有多大用处。如果你把它包装在一个函数中,并在你的主题中的某个地方调用这个函数,它就会。如果将其放入页面模板中,它将显示在具有该页面模板的任何页面上。
// The Query
$the_query = new WP_Query( 'post_type=artworks_post' );

// The Loop
while ( $the_query->have_posts() ) : $the_query->the_post();
    echo '<a rel="' .the_permalink(). '" href="' .the_permalink(). ' ">'. the_title() .'</a>';
endwhile;

// Reset Post Data
wp_reset_postdata();