ThemeForest

Posts by Gareth_Gillman

273 posts
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
  • Microlancer Beta Tester
  • United Kingdom
Gareth_Gillman says

Been modifying the code to my needs but somehow, WP is showing the comments from another post on all the posts.

See here, the meta info says no comments (and shows in the admin area) but comments are being shown:

My code is:
$comments = get_comments($args, $post->ID);
foreach($comments as $comment) :

 echo '<div class="comment margin30"><div class="avatar">';
 echo get_avatar( $comment, 32 );
 echo '</div><div class="comm-text-wrap"><div class="comm-text"><p style="font-family: Verdana;">';
 echo($comment->comment_author);
 echo '</p><div class="bubble"><div class="bubble-bg" /><p>';
 echo($comment->comment_content);
 echo comment_reply_link( $comment );
 echo '</p></div></div></div></div>';

endforeach;
unset($comments);

$num_comments = get_comments_number();

if ( comments_open() ) {
 if ( $num_comments == 0 ) {
  $comments = __('No Comments', 'your_text_domain');
 } elseif ( $num_comments > 1 ) {
  echo '<div class="pagination">';
  paginate_comments_links(); 
  echo '</div>';
 }
}

echoing $num_comments gives me the total of 0 comments

Any help is appreciated

273 posts
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
  • Microlancer Beta Tester
  • United Kingdom
Gareth_Gillman says

Thanks guys, my first time creating comment pagination so on a little learning spree :)

273 posts
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
  • Microlancer Beta Tester
  • United Kingdom
Gareth_Gillman says

I am having issues with the comment pagination, the code below throws an error:

Fatal error: Can’t use function return value in write context in /home/monthlyw/public_html/comments.php on line 30
Line 30 is the one beginning >>
<?php
global $wp_query;
$total = $wp_query->max_num_pages;
// only bother with the rest if we have more than 1 page!
if ( $total > 1 )  {
     // get the current page
     if ( !$current_page = get_query_var('paged') )
          $current_page = 1;
     // structure of "format" depends on whether we're using pretty permalinks
>>     $format = empty( get_option('permalink_structure') ) ? '&page=%#%' : 'page/%#%/';
     echo paginate_links(array(
          'base' => get_pagenum_link(1) . '%_%',
          'format' => $format,
          'current' => $current_page,
          'total' => $total,
          'mid_size' => 4,
          'type' => 'list'
     ));
}
?>

Any help as the codex is a little bare on comment pagination, and Google doesn’t throw up many tuts for the pagination.

I would like my pagination to look the same as my pages pagination which you can see here

273 posts
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
  • Microlancer Beta Tester
  • United Kingdom
Gareth_Gillman says

<?php __( 'Save All Changes', 'your_text_domain' ); ?>

Ha oops, I blame it on tired eyes :D

273 posts
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
  • Microlancer Beta Tester
  • United Kingdom
Gareth_Gillman says

I am having an issue with the WP theme check plugin, it’s saying I should be adding “text domain” to all my inputs (which I know) but I already have them e.g.

Line 43: <?php __( 'Save All Changes' ); ?>

According to the WP codex, that is the code I should be using, so why is the theme check plugin still saying it’s not right?

Any help is appreciated as I would like to remove the message (currently got 65 of them, although I am using the text domain…arghhh).

273 posts
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
  • Microlancer Beta Tester
  • United Kingdom
Gareth_Gillman says
HTML:
<a id="image" href=""><img src="image.png" alt="" />
<div id="video">
 <iframe width="560" height="315" src="http://www.youtube.com/embed/PLgYDq2AMB0?rel=0" frameborder="0" allowfullscreen></iframe>
</div>
</a>
CSS:
#image {
 height:500px;
 position:relative;
 width:500px;
}
#video {
 position:absolute;
 top:75px;
 right:75px;
 height:200px;
 width:200px;
}

Change all the numbers to your needs but the video should overlay the image.

273 posts
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
  • Microlancer Beta Tester
  • United Kingdom
Gareth_Gillman says

firebug will give you js warnings / warnings panel

273 posts
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
  • Microlancer Beta Tester
  • United Kingdom
Gareth_Gillman says

Thanks for the script, it’s useful, it worked for me, I like it a lot. Now I see in the analytics tab, in the referrals tab a line like this:

themeforest.net /item/an-item-I-will-not-name

What it means? Does it mean that an item from themeforest uses my wordpress plugin? I don’t understand how a themeforest item can be referal to a codecanyon item..

check the theme page as it may have a link to your plugin in the theme info or in the comments, someone may have asked for a plugin to do x and yours got referred.

273 posts
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
  • Microlancer Beta Tester
  • United Kingdom
Gareth_Gillman says

you haven’t left any way to contact you, I am interested though – You can email me contact @ garethgillman .co.uk (remove spaces).

273 posts
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
  • Microlancer Beta Tester
  • United Kingdom
Gareth_Gillman says

do you mean the colours of the SMOF panel or the main website?

SMOF has an inbuilt stylesheet changer, just add new styles to the layouts folder, and they should appear in the stylesheet dropdown in the smof panel.

Then just add the smof code to the header.php to call the new stylesheet

by
by
by
by
by