Forum Replies Created

Viewing 3 replies - 91 through 93 (of 93 total)
  • Thread Starter faeronsayn

    (@faeronsayn)

    Any help would be appreciated, I am sure this isn’t that hard :'(

    [No bumping, thank you.]

    Thread Starter faeronsayn

    (@faeronsayn)

    The following code I was able to actually use to show those link posts but it is displaying all posts. It is not displaying link posts specific to the post that I am currently on.

    <?php
    $cat_id = get_cat_ID('Links'); //<--your category here
    $args=array(
      'cat' => $cat_id,
      'meta_key'=>'parentId',
      'post_type' => 'post',
      'post_status' => 'publish',
      'posts_per_page' => -1,
      'caller_get_posts'=> 1
    );
    $my_query = null;
    $my_query = new WP_Query($args);
    if( $my_query->have_posts() ) {
      echo 'List of Posts';
      while ($my_query->have_posts()) : $my_query->the_post(); ?>
        <p><a href="<?php the_permalink() ?>"rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
        <?php
      endwhile;
    }
    wp_reset_query();  // Restore global post data stomped by the_post().
    ?>
    Thread Starter faeronsayn

    (@faeronsayn)

    When I am querying them I want them to have prefixes. I just want them to have two different prefixes. Like for all posts there are only two different prefixes that I want in the post title when querying. Its mainly the way it is displayed and arranged. Thats the only reason I want the post title prefixes.

    So for example if we had two posts with the same names like the following.

    Complete Playstation 3
    Resolved Playstation 3

    Now without the prefixes, meaning the Complete and Resolved were actually in the post titles, when I would query these posts on a page, these two posts will end up at different places because of the “C” and the “R” … but if Complete and Resolved were prefixes when querying post to display both of these posts will end up beside each other and thats because of the “P”.

Viewing 3 replies - 91 through 93 (of 93 total)