WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. RobertHarm
    Member
    Posted 1 year ago #

    Hi,

    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();
    ...
    endwhile

    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();
    ...
    endwhile

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

    http://wordpress.org/extend/plugins/types/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.