Forum Replies Created

Viewing 15 replies - 1 through 15 (of 25 total)
  • Thread Starter sputnick3k

    (@sputnick3k)

    We are not the server people so I don’t know the technical details just the functional.

    Thread Starter sputnick3k

    (@sputnick3k)

    The way it is set up is that

    https://www.mydomain.com

    is looking at

    https://subdomain.myseconddomain.com

    Not redirecting. If that makes any sense?

    Thread Starter sputnick3k

    (@sputnick3k)

    FIXED!

    You have to use all LOWER CASE letters when you register!

    For example:

    Bad
    register_taxonomy('Tax_Name'

    Good
    register_taxonomy('tax_name'

    I am having the same exact problem. Any clues?

    Thread Starter sputnick3k

    (@sputnick3k)

    Ok lets try this again. This works:

    <iframe src=”https://pastebin.com/embed_iframe.php?i=f282yWEi&#8221; style=”border:none;width:100%”></iframe>

    Thread Starter sputnick3k

    (@sputnick3k)

    Ok my programmer friend wrote this and it works for me. maybe you can get this to work for you.

    [Code moderated as per the Forum Rules. Please use the pastebin]

    sputnick3k

    (@sputnick3k)

    I would only mention 2 things for this post:

    1) You have to give it the name of the custom post type. Where is says ‘report’

    2) You can actually just add it to you functions.php file. That way you don’t have to worry about it getting erased when you have to upgrade the plugin in the future.

    sputnick3k

    (@sputnick3k)

    My dashboard breaks when I load this in. Any idea why?

    Thread Starter sputnick3k

    (@sputnick3k)

    So I ended up switching the code to:

    <!-- SUNDAY LOOP -->
    <?php $my_query = new WP_Query( array(
    	'post_type' => 'programming',
    	'schedule' => 'sunday',
    	'orderby' => menu_order ));
    if (($my_query->post_count) > 0) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt('...read more'); ?>
    
    <p><?php $key="program_time"; echo get_post_meta($post->ID, $key, true); ?> EST</p>
    
    <?php endwhile; ?>
    <?php else : ?>
    <p>Healthy programming coming soon!</p>
    <?php endif; ?>
    
    <!-- MONDAY LOOP -->
    <?php $my_query = new WP_Query( array(
    	'post_type' => 'programming',
    	'schedule' => 'monday',
    	'orderby' => menu_order ));
    if (($my_query->post_count) > 0) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt('...read more'); ?>
    
    <p><?php $key="program_time"; echo get_post_meta($post->ID, $key, true); ?> EST</p>
    
    <?php endwhile; ?>
    <?php else : ?>
    <p>Healthy programming coming soon!</p>
    <?php endif; ?>
    
    <!-- TUESDAY LOOP -->
    <?php $my_query = new WP_Query( array(
    	'post_type' => 'programming',
    	'schedule' => 'tuesday',
    	'orderby' => menu_order ));
    if (($my_query->post_count) > 0) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt('...read more'); ?>
    
    <p><?php $key="program_time"; echo get_post_meta($post->ID, $key, true); ?> EST</p>
    
    <?php endwhile; ?>
    <?php else : ?>
    <p>Healthy programming coming soon!</p>
    <?php endif; ?>
    
    <!-- WEDNESDAY LOOP -->
    <?php $my_query = new WP_Query( array(
    	'post_type' => 'programming',
    	'schedule' => 'wednesday',
    	'orderby' => menu_order ));
    if (($my_query->post_count) > 0) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt('...read more'); ?>
    
    <p><?php $key="program_time"; echo get_post_meta($post->ID, $key, true); ?> EST</p>
    
    <?php endwhile; ?>
    <?php else : ?>
    <p>Healthy programming coming soon!</p>
    <?php endif; ?>
    
    <!-- THURSDAY LOOP -->
    <?php $my_query = new WP_Query( array(
    	'post_type' => 'programming',
    	'schedule' => 'thursday',
    	'orderby' => menu_order ));
    if (($my_query->post_count) > 0) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt('...read more'); ?>
    
    <p><?php $key="program_time"; echo get_post_meta($post->ID, $key, true); ?> EST</p>
    
    <?php endwhile; ?>
    <?php else : ?>
    <p>Healthy programming coming soon!</p>
    <?php endif; ?>
    
    <!-- FRIDAY LOOP -->
    <?php $my_query = new WP_Query( array(
    	'post_type' => 'programming',
    	'schedule' => 'friday',
    	'orderby' => menu_order ));
    if (($my_query->post_count) > 0) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt('...read more'); ?>
    
    <p><?php $key="program_time"; echo get_post_meta($post->ID, $key, true); ?> EST</p>
    
    <?php endwhile; ?>
    <?php else : ?>
    <p>Healthy programming coming soon!</p>
    <?php endif; ?>
    
    <!-- SATURDAY LOOP -->
    <?php $my_query = new WP_Query( array(
    	'post_type' => 'programming',
    	'schedule' => 'saturday',
    	'orderby' => menu_order ));
    if (($my_query->post_count) > 0) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt('...read more'); ?>
    
    <p><?php $key="program_time"; echo get_post_meta($post->ID, $key, true); ?> EST</p>
    
    <?php endwhile; ?>
    <?php else : ?>
    <p>Healthy programming coming soon!</p>
    <?php endif; ?>

    This seems to be the proper markup but I’m not sure. The documentation on using multiple loops is unclear. There are several ways to use multiple loops in the WP Codex but some of them seem to contradict each other. It is especially unclear if you want to keep the conditional statements intact. Could someone advise?

    Thread Starter sputnick3k

    (@sputnick3k)

    I ended up switching to this:

    <!-- SUNDAY LOOP -->
    <?php $my_query = new WP_Query( array(
    	'post_type' => 'programming',
    	'schedule' => 'sunday',
    	'orderby' => menu_order ));
    if (($my_query->post_count) > 0) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt('...read more'); ?>
    
    <p><?php $key="program_time"; echo get_post_meta($post->ID, $key, true); ?> EST</p>
    
    <?php endwhile; ?>
    <?php else : ?>
    <p>Healthy programming coming soon!</p>
    <?php endif; ?>
    
    <!-- MONDAY LOOP -->
    <?php $my_query = new WP_Query( array(
    	'post_type' => 'programming',
    	'schedule' => 'monday',
    	'orderby' => menu_order ));
    if (($my_query->post_count) > 0) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt('...read more'); ?>
    
    <p><?php $key="program_time"; echo get_post_meta($post->ID, $key, true); ?> EST</p>
    
    <?php endwhile; ?>
    <?php else : ?>
    <p>Healthy programming coming soon!</p>
    <?php endif; ?>
    
    <!-- TUESDAY LOOP -->
    <?php $my_query = new WP_Query( array(
    	'post_type' => 'programming',
    	'schedule' => 'tuesday',
    	'orderby' => menu_order ));
    if (($my_query->post_count) > 0) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt('...read more'); ?>
    
    <p><?php $key="program_time"; echo get_post_meta($post->ID, $key, true); ?> EST</p>
    
    <?php endwhile; ?>
    <?php else : ?>
    <p>Healthy programming coming soon!</p>
    <?php endif; ?>
    
    <!-- WEDNESDAY LOOP -->
    <?php $my_query = new WP_Query( array(
    	'post_type' => 'programming',
    	'schedule' => 'wednesday',
    	'orderby' => menu_order ));
    if (($my_query->post_count) > 0) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt('...read more'); ?>
    
    <p><?php $key="program_time"; echo get_post_meta($post->ID, $key, true); ?> EST</p>
    
    <?php endwhile; ?>
    <?php else : ?>
    <p>Healthy programming coming soon!</p>
    <?php endif; ?>
    
    <!-- THURSDAY LOOP -->
    <?php $my_query = new WP_Query( array(
    	'post_type' => 'programming',
    	'schedule' => 'thursday',
    	'orderby' => menu_order ));
    if (($my_query->post_count) > 0) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt('...read more'); ?>
    
    <p><?php $key="program_time"; echo get_post_meta($post->ID, $key, true); ?> EST</p>
    
    <?php endwhile; ?>
    <?php else : ?>
    <p>Healthy programming coming soon!</p>
    <?php endif; ?>
    
    <!-- FRIDAY LOOP -->
    <?php $my_query = new WP_Query( array(
    	'post_type' => 'programming',
    	'schedule' => 'friday',
    	'orderby' => menu_order ));
    if (($my_query->post_count) > 0) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt('...read more'); ?>
    
    <p><?php $key="program_time"; echo get_post_meta($post->ID, $key, true); ?> EST</p>
    
    <?php endwhile; ?>
    <?php else : ?>
    <p>Healthy programming coming soon!</p>
    <?php endif; ?>
    
    <!-- SATURDAY LOOP -->
    <?php $my_query = new WP_Query( array(
    	'post_type' => 'programming',
    	'schedule' => 'saturday',
    	'orderby' => menu_order ));
    if (($my_query->post_count) > 0) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt('...read more'); ?>
    
    <p><?php $key="program_time"; echo get_post_meta($post->ID, $key, true); ?> EST</p>
    
    <?php endwhile; ?>
    <?php else : ?>
    <p>Healthy programming coming soon!</p>
    <?php endif; ?>

    Both codes were working for me but this second one seems to be the one people suggest. Thoughts if you have them would be great! The documentation isn’t really clear an the proper method for using multiple loops. Especially if you need the conditional statements intact on each loop.

    Thread Starter sputnick3k

    (@sputnick3k)

    That worked! Thanks for everything!

    Forum: Plugins
    In reply to: How to use xml-gallery ?

    Hi, I have a question about this plugin. This is EXACTLY the type of plugin i need but:

    1) I need to change what content is loaded.

    2) I think i may be able to salve this in ( List items ) but when i click on it i get ( You do not have sufficient permissions to access this page. )

    have you have this problem before?

    This is close to MY issue if I could jump in! I am using a nested loop. I want to use the parent post to define a TAG in the custom field that i can use to pull other posts in.

    <?php if (have_posts()) : ?>
                            <?php while (have_posts()) : the_post(); ?>
                                <li>
                                   <?php $my_query = new WP_Query( "tag=CUSTOM_FIELD" );
                                   if ( $my_query->have_posts() ) {
                                       while ( $my_query->have_posts() ) {
                                           $my_query->the_post();
                                           the_content();
                                       }
                                   }
                                   wp_reset_postdata(); ?>
                                </li>
                            <?php endwhile; ?>
                        <?php endif; ?>

    I was thinking if it’s easier i wouldn’t mind using the post title instead. example ( “tag=single_post_title” )

    Any ideas?

    Thread Starter sputnick3k

    (@sputnick3k)

    or if there is a way to pull the post tittle as a tag, that would work too.

    example: ( “tag=single_post_title” )

    Thread Starter sputnick3k

    (@sputnick3k)

Viewing 15 replies - 1 through 15 (of 25 total)