Home Forums General Issues Archive / Listing as selectable 'Page'


Archive / Listing as selectable 'Page'

  • Hi there,

    The new version of ACF is even better than ever before. Nice one & thanks!

    I have set my site up to allow users to select content blocks (flexible content) and then pages (page select) which are served as links – but some of these are supposed to be archive pages or listing pages. I’m using Events Calendar Pro, for example, and the page i need to link to is /events. It’s an archive/taxonomy page tho – so no ‘page’ for that appears in the page select field.

    I had a search and found this:

    Is it something that exists just now? Any tips other than adding a bunch of extra fields to the flexible content rows? Thanks!

  • I guess you can create pages with individual templates with WP_Query custom loop inside for your taxonomies ( {template_dir}/page-{pageID}.php )

  • thanks for the input!

    ummm, ok so yeah – i guess i could make a template for, say, archive-events.php but would have to name page something other than ‘events’ (wouldn’t i? i’ll test this) because that’s the base/archive url for that custom post type. plus – this events plugin i’m using uses it’s own sub-templates to render it’s listing. that all might be a bit of a big mess.

    select a taxonomy landing page would be better! 🙂

  • Yeah, making a page template works. The permalink for the post type takes over the page. I guess using a listing template will be OK for search engine results but I’m wary of having pages on the site that aren’t ‘real’ .. not sure if those worries are well founded but.

    as above – select a taxonomy landing page would be better! haha

  • you can add custom post type where wp will create posts when you create taxonomies and than create template for this post type but its a very long way =)))

    function taxpostcreate( $a,$b,$c )
    $post = array(
      'post_name'      => 'term'.$b,
      'post_title'     => 'term'.$b,
      'post_status'    => 'publish',
      'post_type'      => 'terms_scrapyard',
      'post_excerpt'   => $b,
    wp_insert_post( $post, $wp_error );
    return $a;
    add_filter('created_term', 'taxpostcreate', 10, 3);

    something like that

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

The topic ‘Archive / Listing as selectable 'Page'’ is closed to new replies.