Ready to get started?Download WordPress


Types - Custom Fields and Custom Post Types Management
How to use of Types outside of loop (1 post)

  1. RobertHarm
    Posted 1 year ago #


    I searched the docu but didnt find an answer so I am hoping for help here: I created the custom post type "anwendungen" with several text fields, one is types-name.

    I built a custom loop which should only display posts from this custom type if it fits the name I get from another source. So I do the following query in my template file which gets and displays all custom post type posts:

    query_posts( array( 'post_type' => 'anwendungen' ) );
    if (have_posts()) :
    while (have_posts()) : the_post();

    Here is what I would need:

    $name-from-other-source = foo;
    $types-name = DONT KNOW HOW TO GET THIS;
    query_posts( array( 'post_type' => 'anwendungen') );
    if ( have_posts() && ($types-name == $name-from-other-script) ) :
    while (have_posts()) : the_post();

    Does anyone know how to achieve this with types? Any help is really appreciated!!


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.