Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • dcritic

    (@dcritic)

    The Thesis theme is AWESOME!!!

    The reason you guys hate it is because it’s a DIY theme, not change options only theme… Almost all of my websites use it!

    Thread Starter dcritic

    (@dcritic)

    thx

    Thread Starter dcritic

    (@dcritic)

    It’s working now. What can I use instead of htmlspecialchars(); to prevent XSS via the form for the widget?

    Forum: Plugins
    In reply to: Category Management

    This helped me a lot. Sorry for necroposting.

    Thread Starter dcritic

    (@dcritic)

    Please help if possible. Thx.

    Thread Starter dcritic

    (@dcritic)

    Okay, for some reason it displays all of my posts on each category. If you go to USA then go to Louisiana, it displays the same: no travel guides (yes I used travel guides and the categories didn’t work) and every food post. Here’s my loops:

    $cat = ",".get_query_var('cat');?>
    
    <?php if (have_posts()) : ?>
    
    <div id='page'>
    <div class="post" id="restaurants">
    			            <fieldset>
    
                <legend class='title'>Restaurants <?php echo $cat; ?></legend>
    
                <div class="entry">
    
    	<table>
    		<tr><td width="200"><b>Restaurant Name</b></td>
    		<td><b>Rating</b></td>
    		<td><b>Price</b></td>
    		<td><b>Ambiance</b></td>
    		<td><b>Service</b></td>
    		<td><b>Taste</b></td>
    		<td><b>Website</b></td>
    		</tr>
        <?php $restaurants = new WP_Query("cat=6".$cat);
    	while ($restaurants->have_posts()) : $restaurants->the_post(); ?>
    			<tr>
               <td><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></td>
    		   <td><?php echo c2c_get_custom('rating', '', '', '--'); ?></td>
    		   <td><?php echo c2c_get_custom('price', '', '', '--'); ?></td>
    		   <td><?php echo c2c_get_custom('ambiance', '', '', '--'); ?></td>
    		   <td><?php echo c2c_get_custom('service', '', '', '--'); ?></td>
    		   <td><?php echo c2c_get_custom('taste', '', '', '--'); ?></td>
    		   <td><a href="https://<?php echo c2c_get_custom('website', '', '', '--'); ?>"><?php echo c2c_get_custom('website', '', '', '--'); ?></a></td>
    		   <td><?php edit_post_link('Edit', '', '&nbsp;'); ?></td>
    			</tr>
        <?php endwhile; ?>
    	</table>
                </div>
    
            </div>
    
    <div class="post" id="travel">
    			            <fieldset>
    
                <legend class='title'>Travel Guides</legend>
    
                <div class="entry">
        <?php $travel = new WP_Query("cat=522".$cat);
    	while ($travel->have_posts()) : $travel->the_post(); ?>
    			<tr>
               <td><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></td>
    		   </tr>
        <?php endwhile; ?>
    	</table>
                </div>
    
            </div>
    </div>
    Thread Starter dcritic

    (@dcritic)

    Never mind; forgot a variable.

    Thread Starter dcritic

    (@dcritic)

    Uh… wait. There’s a little bug. When I use this little piece of code the rows go on and on. Check on https://www.dcritic.com and click on USA.
    Here’s the loop I’m using:

    <?php $restaurants = new WP_Query("cat=6&amp;showposts=1");
    while ($restaurants->have_posts()) : the_post(); ?>
    			<tr>
               <td><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></td>
    		   <td><?php echo c2c_get_custom('rating', '', '', '--'); ?></td>
    		   <td><?php echo c2c_get_custom('price', '', '', '--'); ?></td>
    		   <td><?php echo c2c_get_custom('ambiance', '', '', '--'); ?></td>
    		   <td><?php echo c2c_get_custom('service', '', '', '--'); ?></td>
    		   <td><?php echo c2c_get_custom('taste', '', '', '--'); ?></td>
    		   <td><a href="https://<?php echo c2c_get_custom('website', '', '', '--'); ?>"><?php echo c2c_get_custom('website', '', '', '--'); ?></a></td>
    		   <td><?php edit_post_link('Edit', '', '&nbsp;'); ?></td>
    			</tr>
        <?php endwhile; ?>

    Note that I’m using a custom fields plugin.

    Thread Starter dcritic

    (@dcritic)

    Thank you very much for your support! ??

    Thread Starter dcritic

    (@dcritic)

    If I use this, is there a way to make the used categories not show up on the side?

Viewing 10 replies - 1 through 10 (of 10 total)