Codeless
  • Support Home
  • Themes
  • Support
  • WordPress Tutorials
    • How to Start a Blog
    • Best Website Builders
    • Best Small Business Hosting
    • Email Marketing Services
    • Cheap WordPress Hosting
  • Video Tutorials

Community Forums

  • Profile
  • Topics Started
  • Replies Created
  • Favorites

Forum Replies Created

  • 8 years, 7 months ago vmg-developer
    Participant

    Expired

    in reply to: Exclude categories from the Full Blog widget?

    Thanks for the reply.

     

    I was actually looking to exclude certain categories from the Full Blog element of visual composer. I have 20 categories of posts, but I only want 19 to display.

    I figured out how to this in code, however. I ported over /specular/vc_templates/home_blog.php to my child theme and then edited this line:

     

          if($dynamic_from_where == 'all_cat')
              query_posts('posts_per_page='.(int)$posts_per_page.'&paged='.get_query_var( 'paged' ) ); 
            else
              query_posts('posts_per_page='.(int)$posts_per_page.'&cat='.$dynamic_cat.'&paged='.get_query_var( 'paged' ) );
            
    
    

    And you change it to this:

    
          if($dynamic_from_where == 'all_cat')
              query_posts( array( 'posts_per_page='.(int)$posts_per_page.'&paged='.get_query_var( 'paged' ), 'cat'=>'-244' ) ); 
            else
              query_posts('posts_per_page='.(int)$posts_per_page.'&cat='.$dynamic_cat.'&paged='.get_query_var( 'paged' ) );
            
    

    ‘244’ is the category ID of the category you’re looking to exclude.

    8 years, 10 months ago vmg-developer
    Participant

    Expired

    in reply to: Problems after upgrading to newest version of Specular

    Thanks for the reply. It looks like the culprit was the child theme itself — specifically, the white space after the closing php tag in the functions.php of the child theme.

     

    Appreciate your help!

Viewing 2 posts - 1 through 2 (of 2 total)

Site Links

  • Support Policy
  • Specular Support Forum
  • Video Tutorials
  • Knowledge Base
  • Guides and Reviews

Useful Articles

  • Build a Website
  • Web Design & Development
  • Hosting
  • WordPress

Login

Log In
Register Lost Password