• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

dedsonus

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • December 17, 2017 at 7:35 am in reply to: Is it possible to track and show page views on Genesis without plugin? #214626
    dedsonus
    Member

    Thank you, Victor!

    December 23, 2016 at 8:18 am in reply to: How to Make Embedded YouTube Videos Responsive on Genesis? #198043
    dedsonus
    Member

    Thank you, Victor!
    I'll try this solution.
    Regards,
    Mike

    December 30, 2015 at 10:00 am in reply to: Related posts – how to show only posts of last N. days? #175196
    dedsonus
    Member

    I appreciate it. Just found the solution:

    /** WPT related post widget */
    function related_posts_categories() {
    if ( is_single ( ) ) {
    global $post;
    $count = 0;
    $postIDs = array( $post->ID );
    $related = '';
    $cats = wp_get_post_categories( $post->ID );
    $catIDs = array( );{
    foreach ( $cats as $cat ) {
    $catIDs[] = $cat;
    }
    $args = array(
    'category__in'          => $catIDs,
    'post__not_in'          => $postIDs,
    'showposts'             => 5,
    'ignore_sticky_posts'   => 0,
    'orderby'               => 'rand',
    'date_query' => array(
            'after' => date('Y-m-d', strtotime('-700 days')) 
        ),
    'tax_query'             => array(
    array(
    'taxonomy'  => 'post_format',
    'field'     => 'slug',
    'terms'     => array(
    'post-format-link',
    'post-format-status',
    'post-format-aside',
    'post-format-quote' ),
    'operator' => 'NOT IN'
    )
    )
    );
    $cat_query = new WP_Query( $args );
    if ( $cat_query->have_posts() ) {
    while ( $cat_query->have_posts() ) {
    $cat_query->the_post();
    $related .= '<li><a href="' . get_permalink() . '" rel="bookmark" title="' . get_the_title() . '">' . get_the_title() . '</a></li>';
    }
    }
    }
    if ( $related ) {
    printf( '<div class="related-posts"><h4>Related posts:</h4><ul>%s</ul></div>', $related );
    }
    wp_reset_query();
    }
    }
    add_action( 'genesis_after_entry_content', 'related_posts_categories' );

    I used this code to limit posts to 700 last days:

    'date_query' => array(
            'after' => date('Y-m-d', strtotime('-700 days')) 
        ),
    November 7, 2015 at 1:09 pm in reply to: How to add Google Search? #170419
    dedsonus
    Member

    Should i add something else like <form>...</form>? Code shown above doesn't show search form.
    Thank you.

    October 31, 2015 at 11:07 am in reply to: How to add Google Search? #169732
    dedsonus
    Member

    Thank you, but i've tried it with no result. Nothing shows up. I used this code:

    <script>
      (function() {
        var cx = '005637352947012259361:m-807l9uvfz';
        var gcse = document.createElement('script');
        gcse.type = 'text/javascript';
        gcse.async = true;
        gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
            '//cse.google.com/cse.js?cx=' + cx;
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(gcse, s);
      })();
    </script>
    <gcse:searchresults-only></gcse:searchresults-only>
  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble