• Resolved AJNetwork

    (@ajnetwork)


    I need to do this for the search engine function on my site that has all posts 301 redirected on front end to zazzle stores with my ref code, but the search still picks up words for each one of the store posts if they are on single.php for that permalink id.

    So the plan is as follows:
    designated posts to syndicate zazzle rss feeds with different categories for each post/store with wp rss multi-importer,
    query those category posts to not show on home or search page,
    then display them on the original store post single.php (behind the scenes for search purpose only), because the shortcode won’t work in the excerpt box from wp-admin.

    so i can’t figure out why this isn’t working cause it seems right to me:

    <?php if ( is_single(‘1’) ) : query_posts(‘cat=22’); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <?php the_content(); ?>
    <?php endwhile; endif; ?>
    <?php wp_reset_query(); ?>

    then of course i would do a ton of elseif’s for each store. i’ve tryed like 12 possible tweaks of this so far and all i get is stinkin 500’s every time,

    anybody know proper way to do this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter AJNetwork

    (@ajnetwork)

    or perhaps the job could be much easier with a related posts plugin showing the excerpt cause all i need are the keywords to be there anyways, seeing if i can get this to work, but if anybody knows what to do here please let me know.

    thanks,
    AJ

    Thread Starter AJNetwork

    (@ajnetwork)

    Got it! I just had things in the wrong order, it works like this:

    <?php query_posts(‘cat=22’); ?>
    <?php if ( is_single(‘1’) ); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <?php the_content(); ?>
    <?php endwhile; endif; ?>
    <?php wp_reset_query(); ?>

    ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘trying to set if conditionals for single post to display post from select cat-id’ is closed to new replies.