• 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

How to show this code at the bottom of the article ?

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

Community Forums › Forums › Archived Forums › General Discussion › How to show this code at the bottom of the article ?

This topic is: not resolved
  • This topic has 4 replies, 2 voices, and was last updated 8 years, 4 months ago by wparrow.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • February 2, 2015 at 12:17 am #139343
    wparrow
    Member

    Hi
    In my previous here, I have asked the question how to set position of the plugins I've installed and I do not find the way. Now I want set position of them by grab all its short code to one code you see below:

    I have a mix of codes

    <div class="pagelink"><?php wp_link_pages('pagelink=trang %'); ?></div><p>
    <div class="fb-like" data-href="https://www.facebook.com/tvvn.net" data-layout="standard" data-action="like" data-show-faces="false" data-share="true"></div><p>
    <?php if(function_exists("kk_star_ratings")) : echo kk_star_ratings($pid); endif; ?><p>
    <?php echo do_shortcode("[kpvc_single]"); ?><p>
    [fbcomments]<p>
    <?php zemanta_related_posts()?>

    And I would like to show it at the bottom of the single article, it includes php code and shortcode, I have used "Genesis Simple Hook" and put it into "genesis_entry_content", it's ok when I view the single post but how to stop it show on Category page ?

    Please see demo here: http://www.tvvn.net/internet/hosting/

    Any suggest solution for my problem please ?

    Thanks for your help!

    February 2, 2015 at 1:37 am #139345
    Genesis Developer
    Member

    You need to add a conditional tag for this. You can try following if statement

    If ( is_single() ) {
    
    ENTER YOUR CODE HERE
    
    }

    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    February 2, 2015 at 2:11 am #139350
    wparrow
    Member

    I tried this

    <?php
    if ( is_single() ) {
    <div class="pagelink"><?php wp_link_pages('pagelink=trang %'); ?></div><p>
    <div class="fb-like" data-href="https://www.facebook.com/tvvn.net" data-layout="standard" data-action="like" data-show-faces="false" data-share="true"></div><p>
    <?php if(function_exists("kk_star_ratings")) : echo kk_star_ratings($pid); endif; ?>
    <?php echo do_shortcode("[kpvc_single]"); ?><p>
    [fbcomments]<p>
    <?php zemanta_related_posts()?>
    } else {}
    ?>

    But no luck
    Can you help ? I am not php programmer

    February 2, 2015 at 2:14 am #139352
    Genesis Developer
    Member

    is_single($post) would be is_single(). Read the Codex for better knowledge


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    February 2, 2015 at 2:23 am #139355
    wparrow
    Member

    ok, I changed to is_single() but still didn't work, could you please help complete the small code ?

    Thanks

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 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