Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter Kristoff1875

    (@kristoff1875)

    @torres65 Doesn’t work i’m afraid, doesn’t even allow normal numbers.

    @mbrsolution haven’t asked there, will post now. Cheers

    Thread Starter Kristoff1875

    (@kristoff1875)

    Doesn’t work unfortunately.

    Thread Starter Kristoff1875

    (@kristoff1875)

    Ok cheers buddy.

    Thread Starter Kristoff1875

    (@kristoff1875)

    Thanks Barry.

    For now is there a workaround? Could you tell me where the message is currently generated so I can look at modifying it? I would of course share my results with you if it may help in implementing it in future versions.

    Thread Starter Kristoff1875

    (@kristoff1875)

    Ignore that. Success!

    Thread Starter Kristoff1875

    (@kristoff1875)

    I kind of have it working with the following:

    <li id="categories">
    	<h2><?php _e('Categories:'); ?></h2>
    	<form action="<?php bloginfo('url'); ?>" method="post">
    	<div>
    	<?php wp_dropdown_categories($args); ?>
    	<?php wp_dropdown_categories($args1); ?>
    	<input type="submit" name="submit" value="view" />
    	</div>
    	</form>
    </li>

    And then:

    if (($_POST['cat']) !== '-1' && ($_POST['cat2']) !== '-1') {
    $query = new WP_Query(array('category__and'=>array($_POST['cat'], $_POST['cat2'])));
    } else if (($_POST['cat']) == '-1' && ($_POST['cat2']) !== '-1') {
    $query = new WP_Query('cat='.$_POST['cat2']);
    } else if (($_POST['cat']) !== '-1' && ($_POST['cat2']) == '-1') {
    $query = new WP_Query('cat='.$_POST['cat']);
    } else {
    $query = new WP_Query('cat=10');
    }

    I have 2 dropdown boxes and the results get sent through. The only issue that i’ve got at the moment is that this is on the category page, and if you don’t choose the first dropdown, it chucks you to the main post page.

    Ideally, I want this to be on the page that you land on when you click posts. My posts aren’t on the homepage and are on a designated page in the options, homepage is static. Then I have another page i’ve set with a custom template to show posts. However, the code doesn’t seem to be taking affect on this page… Could you maybe point me to where i’m going wrong? From what I can see, i’ve chosen the custom template in the page settings and i’ve chosen the page in reading settings…?

    Thread Starter Kristoff1875

    (@kristoff1875)

    Thanks for this, would that also work if cata wasn’t selected for example? Would it just see it as a null value and search based on catb?

    Thread Starter Kristoff1875

    (@kristoff1875)

    I’ve sussed it, for anyone else who needs it:

    Validation regex = (?=)

    Then both css: “display:none”

    Thread Starter Kristoff1875

    (@kristoff1875)

    Does anybody have a clue about this?! :-/

    Thread Starter Kristoff1875

    (@kristoff1875)

    Sorted with

    if ($cat->name !== 'Blog') {

    Cheers

    Thread Starter Kristoff1875

    (@kristoff1875)

    Right, this is the code i’ve got. Am currently looking at the foreach bit trying to figure out what to change!

    <?php get_header();  /* template name: Portfolio */?>
    
            <div id="container">
                <div id="content">
    
    <?php the_post(); ?>
    
                    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                        <h1 class="entry-title"><?php the_title(); ?></h1>
                        <div class="portfolio-content">
                <?php
                // get all the categories from the database
                $cats = get_categories();
    
                    // loop through the categries
                    foreach ($cats as $cat) {
                        // setup the cateogory ID
                        $cat_id= $cat->term_id;
                        // Make a header for the cateogry
                        echo "<h2>".$cat->name."</h2>";
                        // create a custom wordpress query
                        query_posts("cat=$cat_id&post_per_page=100");
                        // start the wordpress loop!
                        if (have_posts()) : while (have_posts()) : the_post(); ?>
    
                            <?php // create our link now that the post is setup ?>
    
      <div class="portfolioholder">  <a href="<?php the_permalink();?>"><?php if (class_exists('MultiPostThumbnails')) : MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'secondary-image'); endif; ?><br/><?php the_title(); ?></a>
    </div>
    
                        <?php endwhile; endif; // done our wordpress loop. Will start again for each category ?>
                    <?php } // done the foreach statement ?>
      <div class="clear"></div>
                        </div><!-- .entry-content -->
                    </div><!-- #post-<?php the_ID(); ?> -->           
    
    <?php if ( get_post_custom_values('comments') ) comments_template() // Add a custom field with Name and Value of "comments" to enable comments on this page ?>            
    
                </div><!-- #content -->
    
            </div><!-- #container -->
    
    <?php get_footer(); ?>
    Thread Starter Kristoff1875

    (@kristoff1875)

    I’m being a duche sorry. I’ve been trying to edit the wrong bloody file! Will report back when i’ve attempted the right file!!! Fail!

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