Posts by ThemeChills

106 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+3 more
ThemeChills says

Thanks @KrownThemes!

I ended up doing the following which works great in terms of showing or hiding the callout button when more than 8 photos.


$published_posts = wp_count_posts("photo")->publish;

// Display click through if max posts per page have been set
if (is_front_page() && $published_posts > 7) {
     dynamic_sidebar( 'Gallery Callout' ); // The Wedding Couple Name Widget
} else {
    //do something else
}

One thing though, would you know why my widget would not show directly under my list of items. It’s part of a shortcode…

106 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+3 more
ThemeChills says

Hi everyone,

I was wanting to know, what kind of condition could I use to display a callout button only if there are more than 8 posts on one of the sections that is shown on my front-page.php.

I have limited my ‘posts_per_page’ to 8 as that is the maximum number I wish to show. If the end user was to add more photos I want this button to appear and it will provide the click through to the corresponding page.

Here is the snippet I have so far:


        if (is_front_page()) {

            $html .= '<div class="widget callout">';
            $html .= '<a href="'.home_url().'/'.$section_title.'" class="button radius"><i class="fa fa-film" /><span class="btn-label">More Photos</span></a>';
            $html .= '</div>';
           }

Any ideas, suggestions, comments would be appreciated…

Thanks,

Leo

106 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+3 more
ThemeChills says




Just saw another example…how about the inclusion of premium plugins? E.g. Revolution Slider, WooCommerce or something similar. Wouldn’t these be considered an incentive if the theme actually includes them?
They are included in the theme and to be used within the theme, part of the theme. It’s different. WooCommerce isn’t even a paid plugin.
Ah ok, not WooCommerce, bad example…but would the author have had to buy an extended license to resell in this manner?
Yes, Extended License + written consent from the plugin’s author. These are plugins included and part of the theme. They should not be used without the theme (some themes such as mine even disable the plugins once you deactivate the theme).

Gotcha! Thanks again mate.

Leo

106 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+3 more
ThemeChills says


Just saw another example…how about the inclusion of premium plugins? E.g. Revolution Slider, WooCommerce or something similar. Wouldn’t these be considered an incentive if the theme actually includes them?
They are included in the theme and to be used within the theme, part of the theme. It’s different. WooCommerce isn’t even a paid plugin.

Ah ok, not WooCommerce, bad example…but would the author have had to buy an extended license to resell in this manner?

106 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+3 more
ThemeChills says

Just saw another example…how about the inclusion of premium plugins? E.g. Revolution Slider, WooCommerce or something similar. Wouldn’t these be considered an incentive if the theme actually includes them?

106 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+3 more
ThemeChills says

It’s not allowed.. If you have time, submit a support ticket to Envato – the authors will get noticed to remove these ads.

Ok, thanks for clarifying.

Leo

106 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+3 more
ThemeChills says

Hi everyone,

I just had a quick question that hopefully someone in the community or even Envato Staff could clarify for me.

Is offering incentives for item purchases allowed? I am seeing more and more items being listed that state you get “this free template” once you purchase this theme. Essentially a buy one get one free offer.

I was under the impression this was not allowed in ThemeForest.

Has anyone else seen this? Thoughts? Comments? Clarification?

Thanks guys,

Leo

106 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+3 more
ThemeChills says




Thoughts?
How many posts do you have? It should be more than 8.

I have 8 added, but changed the posts_per_page to 4 just to test if the pagination would show… I updated the permalink structure too.

Pagination works, but as I said in the last reply, goes to a 404…

Does it work, when you reduce the “Blog pages show at most” number to 8 or smaller number? (via Settings -> Reading Settings )

If so, you can add an action to “pre_get_posts” http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts

Something like;

function tax_pagination_fix($query) {  
    $post_per_page = 8 ; 
    $query->set('posts_per_page',  $post_per_page );
    return $query;  
}
add_filter('pre_get_posts','tax_pagination_fix');

Hope it helps!

Tolga

Still no go, even when I set my blog posts to show 3 posts per page. I think the problem lies in the fact that I am trying to setup pagination on a custom post type on my front-page.php.

Thanks for your help anyway.

Leo

106 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+3 more
ThemeChills says


Thoughts?
How many posts do you have? It should be more than 8.

I have 8 added, but changed the posts_per_page to 4 just to test if the pagination would show… I updated the permalink structure too.

Pagination works, but as I said in the last reply, goes to a 404…

106 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $10,000+ on Envato Market
+3 more
ThemeChills says

Now I managed to get the pagination working with the below code (added $photo_query->max_num_pages), though it goes to a 404. Because it is a one page theme, I essentially need for the records to paginate though stay on the same page.


  <div class="navigation">
    <div class="alignleft"><?php next_posts_link('« Older Entries', $photo_query->max_num_pages) ?></div>
    <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
  </div>

by
by
by
by
by
by