Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi

    I am integrating html site into WordPress using blank theme.
    I am trying to pull categories I created using custom fields. but wordpress doesn’t seem to run the query_posts(); part of php file.

    <?php
    
    		$categoriesCF = get_post_meta($post->ID, "categories", true);
    		// example value = "Sprockets|92,Sprunklers|94"
    
    		$allCategories = explode(",", $categoriesCF);
    		// $allCategories[0] = "Sprockets|92"
    		// $allCategories[1] = "Sprunklers|94"
    
    		foreach ($allCategories as $category) {
    
    			$pieces = explode("|", $category);
    			// $pieces[0] = "Sprockets"
    			// $pieces[1] = 92
    
    			$link = get_permalink($pieces[1]);
    			echo "<div class='product-group group'>";
    			echo "<h3><a href='$link'>" . $pieces[0] . "</a></h3>";
    
    			query_posts("posts_per_page=-1&post_type=page&post_parent=$pieces[1]");
    
    			while (have_posts()) : the_post(); ?>
    
    			 <a href="<?php the_permalink(); ?>" class="product-jump" title="<?php echo get_post_meta($post->ID, "product_price", true); ?>" data-large="<?php get_post_meta($post->ID, "product_image", true); ?>">
    
    			     <?php echo "<img src='" . get_post_meta($post->ID, "product_regular", true) . "' />"; ?>
    			     <span class="product-title"><?php the_title(); ?></span>
    			     <span class="product-code"><?php echo get_post_meta($post->ID, "product_code", true); ?></span>
    
    			 </a>
    
    			<?php endwhile; wp_reset_query();
    
    			echo "</div>";
    
    		};
    	?>

    pleae any idea , i am new to WP ..
    the site :
    widgetcorp.webprotech.info/widgetcorp/

    Thread Starter fatenwp

    (@fatenwp)

    I don’t know why , when i installed it , they come like that .
    I moved them to theme folder but after that I can’t style anything .
    this theme uses HTML5 and it is version 4.0

    fatenwp

    (@fatenwp)

    I am trying to use starkers nude theme version 4.0
    and the problem I am facing my home page tends to use the header from the wordpress theme under wp-content/twentythirteen/header.php .
    in starkers theme the header/footer are created under sub directory
    parts/shared …..
    i tried the move footer and header to my theme directory but then whatever styles I add to style.css is not applied to my home page ..
    please help

    Thread Starter fatenwp

    (@fatenwp)

    yes I did , there was colon that is not supposed to be ….
    deleted it and it worked thanks

    Thread Starter fatenwp

    (@fatenwp)

    hi just to let you know I updated to wp 3.7 and things are working fine …

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