Featured Content Gallery | WordPress Plugin | iePlexus

Where should i put the code exactly ? Please help me.

Downloading, installing, upgrading, and configuring the FCG plugin

Re: Where should i put the code exactly ? Please help me.

PostBy psivait on Mon Jan 25, 2010 10:00 pm

Hi. I am a novice user. I am really fascinated towards this beautiful theme. I am looking forward to see it in my web page. I went through the steps properly. But still I am facing problems in it.
The page shows a complete plain blank square window in the featured-content-galley plugin area!
what could be the problem?

For your information, I am using Gemer theme. Kindly go through it here..
http://demo.dannci.com/gemer/ as I am upgrading my page in the meantime.
It has "Featured News" at the top where I have pasted the plugin code to be visible.

I have included it in my index.php as I want it to appear on my home page alone. The code goes like this...
/************************ INDEX.PHP ****************************************************/
<?php get_header(); ?>

<!-- BEGIN content -->
<div id="content">

<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
<!-- begin featured news -->

<div class="featured">
<h2>Featured News</h2>

<div id="featured">
<?php
$tmp_query = $wp_query;
query_posts('showposts=3&cat=' . get_cat_ID(dp_settings('featured')));
if (have_posts()) :
while (have_posts()) : the_post();
?>
<!-- begin post -->
<div class="fpost">
<a href="<?php the_permalink(); ?>"><?php dp_attachment_image($post->ID, 'thumbnail', 'alt="' . $post->post_title . '"'); ?></a>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<p class="details"></p>
<p><?php echo dp_clean($post->post_content, 300); ?></p>

</div>
<!-- end post -->
<?php endwhile; endif; ?>
</div>



</div>

<!-- end featured news -->



<?php
$wp_query = $tmp_query;
if (have_posts()) :
$odd = false;
while (have_posts()) : the_post();
$odd = !$odd;
?>

<!-- begin post -->
<div class="<?php if ($odd) echo 'uneven '; ?>post">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<a href="<?php the_permalink(); ?>"></a>
<?php $screen = get_post_meta($post->ID,'screen', true); ?>
<img src="<?php echo ($screen); ?>" width="181" height="100" alt="" />

<p><?php echo dp_clean($post->post_content, 150); ?></p>


<div class="postmeta">
<p class="category"><?php the_category(', '); ?></p>
<p class="comments"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>
</div>
</div>
<!-- end post -->

<?php endwhile; ?>

<div class="postnav">
<div class="navigation">
<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
</div>
</div>

<?php else : ?>
<div class="notfound">
<h2>Not Found</h2>
<p>Sorry, but you are looking for something that is not here.</p>
</div>
<?php endif; ?>

</div>
<!-- END content -->

<?php get_sidebar(); get_footer(); ?>


/****************************************************************************/

All I need is why a blank square appears instead of this galley plugin? What could be the problem?
psivait
 
Posts: 1
Joined: Mon Jan 25, 2010 9:52 pm

Re: Re: Where should i put the code exactly ? Please help me.

Thank you for using the Featured Content Gallery Forum
 

Re: Where should i put the code exactly ? Please help me.

PostBy admin on Tue Jan 26, 2010 7:56 am

since you do not have gallery on the site right now, I can only guess, that your theme slider causes the conflict
Yelena Khamidullina
Web Applications Developer, iePlexus

1. Check settings to exclude fcg-YOU conflict
2. Try to turn off all your plugins at once to exclude fcg-other plugin conflict
3. Try default theme to exclude fcg-theme conflict
4. Post in this forum to involve me in your troubleshooting. URL is required
User avatar
admin
Site Admin
 
Posts: 4738
Joined: Fri Jan 16, 2009 9:29 am
Location: Seattle, WA

Re: Where should i put the code exactly ? Please help me.

PostBy maitravelsite on Thu Jan 28, 2010 9:23 am

Hi

Second time i type this cause I got booted from the forum for some unknown reason. So, to make it short I need to know where to place the code in my template. I have the Nice Stars theme which has the plugin already but it only appears in the posts page, not in the static landing page which is where i want it. I have thus deactivated that part of the theme and intalled the plugin and activated it- it offers more display options anyhow. Here is the code of my index.php file. Many thanks in advance


<?php get_header(); ?> <div class="span-24" id="contentwrap">
<div class="span-16">
<div id="content">
<?php if(is_home()) { include (TEMPLATEPATH . '/featured.php'); } ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>

<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div class="postdate"><img src="<?php bloginfo('template_url'); ?>/images/date.png" /> <?php the_time('F jS, Y') ?> <img src="<?php bloginfo('template_url'); ?>/images/user.png" /> <?php the_author() ?> <?php if (current_user_can('edit_post', $post->ID)) { ?> <img src="<?php bloginfo('template_url'); ?>/images/edit.png" /> <?php edit_post_link('Edit', '', ''); } ?></div>

<div class="entry">
<?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) { the_post_thumbnail(array(200,160), array("class" => "alignleft post_thumbnail")); } ?>
<?php the_content(''); ?>
</div>
<div class="readmorecontent">
<a class="readmore" href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">Read More &raquo;</a>
</div>
</div><!--/post-<?php the_ID(); ?>-->

<?php endwhile; ?>
<div class="navigation">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
<?php } ?>
</div>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php get_search_form(); ?>

<?php endif; ?>
</div>
</div>

<?php get_sidebars(); ?>
</div>
<?php get_footer(); ?>
maitravelsite
 
Posts: 1
Joined: Thu Jan 28, 2010 9:06 am

Re: Where should i put the code exactly ? Please help me.

PostBy rlemon on Tue Feb 02, 2010 12:44 pm

I have used FCG on several blogs but I am stumped on this one where to put the code. I have read several of these posts in this topic and tried several things but now I am calling for help.

I am trying to make the FCG show up right under the static welcome on the front page. This theme does not have a home.php
http://vickigtreasures.com/blog/
I read that you could use a code to tell it to only show on home page, instead of all pages?

<?php
if (is_home())
{
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}
?>
Is this correct? How?
so I tried to add the code to page.php but when I inserted it just above <?php get_sidebar(); ?> it messed up the layout. Where ever else I tried, it didn't show up.

this is my page.php

<?php get_header(); ?>

<div id="content">


<?php if (have_posts()) : ?>

<?php while (have_posts()) : the_post(); ?>

<div class="post" id="post-<?php the_ID(); ?>">
<h2><?php the_ttftitle(); ?></h2>

<?php the_content('Read more...'); ?>
<image src="<?php bloginfo('template_directory'); ?>/images/vicki.png">
<p class="postmetadata"><?php edit_post_link('Edit', ' | ', ' | '); ?>

<div class="space"></div>

</div>

<?php endwhile; ?>

<div class="navigation">
<div class="alignleft"><?php next_posts_link('<span class="older">Older Entries</span>') ?></div>
<div class="alignright"><?php previous_posts_link('<span class="newer">Newer Entries</span>') ?></div>
</div>

<?php else : ?>

<h2>Not Found</h2>
<p>Sorry, but you are looking for something that isn't here.</p>

<?php endif; ?>

</div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>
rlemon
 
Posts: 2
Joined: Tue Feb 02, 2010 12:34 pm

Re: Where should i put the code exactly ? Please help me.

PostBy rlemon on Tue Feb 02, 2010 2:35 pm

I figured it out by changing it to the name of the page, which is welcome.
rlemon
 
Posts: 2
Joined: Tue Feb 02, 2010 12:34 pm

Re: Where should i put the code exactly ? Please help me.

PostBy linkedit on Thu Feb 04, 2010 11:07 am

I used this plug in successfully with the Steamline theme but on another site it isn't working right at all. I'm very confused as to where in the header it should go. Everywhere I've put it, it doesn't look right.

Image

I'm trying to place it where the blue box is and to have it push the first blog post down and not interfere with the side bar or top banner ad. Or even in the space between the 1st post and the banner ad.

This is the header file from the site right now the code for the plugin is not in the file. Any ideas?

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

<head profile="http://gmpg.org/xfn/11">
    <title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
    <meta http-equiv="content-type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset') ?>" />
    <meta name="description" content="<?php bloginfo('description') ?>" />
    <?php if(is_search()) { ?>
    <meta name="robots" content="noindex, nofollow" />
    <?php }?>

<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

<?php
   global $options;
   foreach ($options as $value) {
   if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
   }
?>

<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/hoverIntent.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/superfish.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/custom.js"></script>

<link rel="stylesheet" type="text/css" media="screen" href="<?php bloginfo('template_directory'); ?>/<?php echo $color_selection;?>.css" />


<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/<?php echo $location;?>.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style.css" type="text/css" media="screen"/>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/print.css" type="text/css" media="print" />
<!--[if lt IE 8]>

<style type="text/css">
#logo { cursor: pointer; }
#comment_wrap .s { border-top: 5px solid #b0b0b0; }
#all { padding: 40px 0 0; }
</style>
<![endif]-->

<!--[if lt IE 7]>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/unitpngfix.js"></script>
<![endif]-->

<link href="http://gadgetvault.net/favicon.ICO" rel="shortcut icon" />

<style type="text/css">
   a#logo, a#logo2 { background: url(<?php bloginfo('template_directory'); ?>/images/<?php echo $mylogo ?>) no-repeat top left; width: <?php echo $mylogowidth ?>px; height: <?php echo $mylogoheight ?>px; }

</style>

<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>
</head>
<body>

<div class="wrapper" id="header">
   <div class="menu">

    <span class="xdate"><?php echo date('l jS F Y'); ?></span>

       <ul class="sf-menu">
        <li><a href="<?php bloginfo('url'); ?>" title="Home" <?php echo (is_home() ? "class='current'" : "");?>>Home</a></li>
      <?php wp_list_pages('title_li='); ?>
        </ul>
    </div>
   
    <div class="lite"></div>
    <img src="<? bloginfo('template_directory'); ?>/images/<?php echo $mylogo ?>" alt="<?php bloginfo('blogname'); ?>" class="print" />
    <a href="<?php bloginfo('url'); ?>" id="logo"><?php bloginfo('blogname'); ?></a>
    <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
        <input type="text" id="search_input" name="s" onblur="if ( this.value == '' ) { this.value = 'Type and Search'; }" onfocus="if ( this.value == 'Type and Search' ) { this.value = ''; }" value="<?php echo (strlen(get_search_query()) > 2) ? get_search_query() : 'Type and Search'; ?>"  />
        <input type="submit" id="search_submit" value="&nbsp;" />
    </form>
     
   <div id="nav">
       <ul class="sf-menu">
           <?php wp_list_categories('title_li='); ?> 
        </ul>
    </div>

</div>

Thanks
Mark
http://gadgetvault.net
linkedit
 
Posts: 1
Joined: Tue Feb 02, 2010 4:49 pm

Re: Where should i put the code exactly ? Please help me.

PostBy joehark on Tue Feb 09, 2010 2:41 pm

I am using Agent20 with WP2.9.1 and I have the most recent FCG installed and activated.

The site is http://aisvg.com/wp

I have not changed the default settings on the Featured Content Gallery Configuration page. I have not removed any of the default property listings or images that came with the Agent20 installation

I have put the line of code in the home.php file of the Agent20 theme.

The first few lines of the file now read

<?php get_header(); ?>
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>

<div id="content">

<div id="homepage">

<?php /*Check for the 'gallery_styles' function. if it's there, then include it. If not, do nothing*/ ?>
<?php if (function_exists('gallery_styles')) : ?>

<div id="homepagetop">
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
</div>

<?php endif; ?>


But the slide show does not show up. I also tried it in index.php. Same lack of results.

Where are the slide images stored? I'd like to confirm that they are there but don't know where to look.

Any other suggestions as to why the images are not showing up?

The support help is greatly appreciated.
joehark
 
Posts: 8
Joined: Mon Feb 23, 2009 2:44 am

Re: Where should i put the code exactly ? Please help me.

PostBy admin on Tue Feb 09, 2010 3:01 pm

you need to specify height of your gallery
and also in your code you gave you have 2 gallery calls, should be only one...
Yelena Khamidullina
Web Applications Developer, iePlexus

1. Check settings to exclude fcg-YOU conflict
2. Try to turn off all your plugins at once to exclude fcg-other plugin conflict
3. Try default theme to exclude fcg-theme conflict
4. Post in this forum to involve me in your troubleshooting. URL is required
User avatar
admin
Site Admin
 
Posts: 4738
Joined: Fri Jan 16, 2009 9:29 am
Location: Seattle, WA

Re: Where should i put the code exactly ? Please help me.

PostBy joehark on Tue Feb 09, 2010 3:16 pm

Thank for the prompt response. Your help is sincerely appreciated and respected.

Thanks to your help, I am making progress.

Please look again at the site: http://aisvg.com/wp/

I've removed the (arrrgh) second call. I set the config to 600 wide and 300 high. And the text is still at the default 200px high.

But all I am seeing now is the black 'loading" screen". And you will note that the layout breaks the right column down to below the others.

Also, may I ask again, where are these images stored?

Thanks again.
joehark
 
Posts: 8
Joined: Mon Feb 23, 2009 2:44 am

Re: Where should i put the code exactly ? Please help me.

PostBy admin on Tue Feb 09, 2010 3:20 pm

you did not specify articleimg custom fields for each post in gallery,
the images needs to be uploaded, then url should be put in articleimg custom field
Yelena Khamidullina
Web Applications Developer, iePlexus

1. Check settings to exclude fcg-YOU conflict
2. Try to turn off all your plugins at once to exclude fcg-other plugin conflict
3. Try default theme to exclude fcg-theme conflict
4. Post in this forum to involve me in your troubleshooting. URL is required
User avatar
admin
Site Admin
 
Posts: 4738
Joined: Fri Jan 16, 2009 9:29 am
Location: Seattle, WA

PreviousNext

Return to Getting Started

Who is online

Users browsing this forum: No registered users and 0 guests