Freddy X. Vasquez
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Show Specific Page Content When Specific Category is ViewedI decided to go a different route and the issue is no more. Thanks for all the help.
Forum: Fixing WordPress
In reply to: Show Specific Page Content When Specific Category is ViewedFYI: I’m doing this inside of a custom post type I created, is that what the issue may be?
Forum: Fixing WordPress
In reply to: Show Specific Page Content When Specific Category is ViewedAnyone else have any insight? This is driving me nuts!
Forum: Fixing WordPress
In reply to: Show Specific Page Content When Specific Category is ViewedThat didn’t work either, but thank you.
Forum: Fixing WordPress
In reply to: Show Specific Page Content When Specific Category is ViewedVery weird. I have no idea what the issue is. I went ahead and disabled all plugins and still the same result.
The content I’m pulling into the category page from the specific content page is just not showing up. No errors show up either, so I guess that’s good. Maybe something is cancelling itself out.
Forum: Fixing WordPress
In reply to: Show Specific Page Content When Specific Category is ViewedHey Michael – I went ahead and added your suggestion and the imported content does not appear.
Here is the full code:
<?php if (is_category(‘ac-modules’)) { $the_query = new WP_Query(‘page_id=747’); }
elseif (is_category(‘dc-modules’)) { $the_query = new WP_Query(‘page_id=751’); }
elseif (is_category(‘power-supplies’)) { $the_query = new WP_Query(‘page_id=754’); } ?><?php if( isset($the_query) ) : ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<div class=”cat-desc”>
<div class=”cat-desc-l”>
<div class=”cat-prod-main”>
<?php
if ( has_post_thumbnail()) {
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), ‘large’);
echo ‘‘;
the_post_thumbnail(‘large’);
echo ‘‘;
}
?>
</div><div class=”cat-prod-thumb”>
<?php
if( class_exists(‘Dynamic_Featured_Image’) ) {
global $dynamic_featured_image;
$featured_images = $dynamic_featured_image->get_featured_images( );if( !is_null($featured_images) ){
$links = array();
foreach($featured_images as $images){
$thumb = $images[‘thumb’];
$fullImage = $images[‘full’];
$links[] = “<img src='{$thumb}’ />“;
}echo “<div class=’dfiImages’>”;
foreach($links as $link){
echo $link;
}
echo “</div>”;
}
}
?>
</div></div>
<div class=”cat-desc-r”>
<h1><?php the_title(); ?></h1>
<?php the_content(__(‘Read more’));?><div style=”clear:both;”></div>
</div>
</div>
<?php endwhile;?>
<?php endif; ?>The code above sits inside of another php file that produces the category page you can see below:
<?php get_header(); ?>
<div id=”content”>
<div id=”prodleft”>
<div id=”productnav”>
<h5>Product Categories</h5>
<div class=”productnavcont”>- <?php wp_nav_menu( array( ‘theme_location’ => ‘cat-nav’ ) ); ?>
</div>
</div></div>
<div id=”prodright”>
<?php include(TEMPLATEPATH.”/breadcrumbproduct.php”);?>
<?php include(TEMPLATEPATH.”/category_header.php”);?>
<div class=”prodarea”>
<?php query_posts($query_string . ‘&orderby=menu_order&order=ASC’); ?>
<?php if (have_posts()) : while (have_posts()) : the_post();?>
<div class=”brand-block”>
<div class=”prod-block”>
<table border=”0″ cellpadding=”0″ cellspacing=”0″ width=”100%” height=”100%”>
<tr><td valign=”middle”>
“><?php the_post_thumbnail(); ?>
</td></tr>
</table>
</div><div class=”prod-info”>
<h6>“><?php the_title(); ?></h6>
</div></div>
<?php endwhile; else: ?>
<p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p><?php endif; ?>
<p><?php wp_pagenavi(); ?></p>
</div>
</div>
</div>
<!– The main column ends –>
<?php get_footer(); ?>
Does this make things a bit clearer?
Forum: Fixing WordPress
In reply to: Show Specific Page Content When Specific Category is ViewedHey Michael, thank you for the help. When I replace the code with the code you provided, I get this error:
Fatal error: Call to a member function have_posts() on a non-object in /home/magled/public_html/wp-content/themes/magled/category_header.php on line 5
Right now, the code at the top looks like this:
<?php if (is_category(‘ac-modules’)) { $the_query = new WP_Query(‘page_id=747’); }
elseif (is_category(‘dc-modules’)) { $the_query = new WP_Query(‘page_id=751’); }
elseif (is_category(‘power-supplies’)) { $the_query = new WP_Query(‘page_id=754’); } ?><?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
What am I doing wrong?
Forum: Fixing WordPress
In reply to: Show Specific Page Content When Specific Category is ViewedRight now, here is what I am using to call the specific page’s information:
<?php $the_query = new WP_Query( ‘page_id=747’ ); ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
I’m guessing the first line in the code needs to be setup so that it looks for the category first. Here is what I tried using to no avail:
<?php if (is_category(‘ac-modules’)) { $the_query = new WP_Query(‘page_id=747’); } ?>
Any suggestions?
Forum: Plugins
In reply to: [Dynamic Featured Image] Plugin Just Stopped WorkingHey Ankit,
I deactivated all plugins and I still have the same issue. I didn’t add any new plugins or even any new modifications to the theme. It worked just fine and then all of a sudden it began to stall after I clicked ‘insert into post’.
It happened once before and I went ahead and deleted everything and re-installed and it began to work again. After a bunch of entries it stalled again. I just don’t understand why it would all of a sudden do that when all I was doing was just adding custom post types.
Very weird. Any other ideas?
Thanks! – Fred