• 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

Move shortcode output on page

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 › Design Tips and Tricks › Move shortcode output on page

This topic is: not resolved

Tagged: functions, output, shortcodes

  • This topic has 1 reply, 1 voice, and was last updated 10 years, 6 months ago by colleengreene.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • December 2, 2014 at 12:49 pm #133432
    colleengreene
    Member

    Hello,

    I use a custom shortcode to display custom taxonomy lists on Pages in the sample theme. One custom taxonomy list per page. But, when I enter text above the shortcode in the page visual editor, the text (all page "content" including Jetpack social sharing buttons), get displayed below the shortcode output on the page. How can I change this in my functions.php?

    You can see what is happening on this page. If you scroll to the very bottom of the ul, you can see my text gets displayed underneath the taxonomy items being output from the shortcode, as well as the share this jetpack items that are supposed to be displayed above the content.

    Here is a screenshot of my page edit screen.

    Here is the code I use in my functions.php to create the shortcode:

    // Create a category-type list for custom taxonomies
    // Source: http://www.wpbeginner.com/plugins/how-to-display-custom-taxonomy-terms-in-wordpress-sidebar-widgets/
    function list_terms_custom_taxonomy( $atts ) {
    // Inside the function we extract custom taxonomy parameter of our shortcode
    	extract( shortcode_atts( array(
    		'custom_taxonomy' => '',
    	), $atts ) );
    // arguments for function wp_list_categories
    $args = array( 
    taxonomy => $custom_taxonomy,
    title_li => ''
    );
    // We wrap it in unordered list 
    echo '<ul>'; 
    echo wp_list_categories($args);
    echo '</ul>';
    }
    // Add a shortcode that executes our function
    add_shortcode( 'ct_terms', 'list_terms_custom_taxonomy' );
    //Allow Text widgets to execute shortcodes
    add_filter('widget_text', 'do_shortcode');

    Here is what I tried to add after the above function to move it, but this does not work.

    //Trying to display custom taxonomy shortcode after content area on pages.
    remove_action( 'genesis_before_entry', 'list_terms_custom_taxonomy' );
    add_action ( 'genesis_after_entry', 'list_terms_custom_taxonomy' );

    Thank you.

    http://www.cjroots.com/people/
    December 3, 2014 at 1:34 pm #133522
    colleengreene
    Member

    Sorry, somehow I created a duplicate post. I can't delete...can an admin do so? This has been resolved on the original post.
    Thanks.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ 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

© 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