IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact

How to Move Post Date to the Bottom of an Article in Genesis

Here are a few simple steps to move article post date from the top of the posting to the bottom in Genesis Framework. The first thing you want to do is to alter the default post info on the top by adding the following filter to your child’s theme functions.php

add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if (!is_page()) {
    $post_info = '[[post_comments]] [[post_edit]]';
    return $post_info;
    }
}

The next step is to add a second filter with the [post_date] in the genesis_post_meta.

add_filter( 'genesis_post_meta', 'custom_post_info_filter' );
function custom_post_info_filter($custom_after_post_info) {
  $custom_after_post_info = '[[post_date]] [[post_categories]] [[post_tags]]';
  return $custom_after_post_info;
}

The changes will change the output from the default:

JANUARY 10, 2012 · LEAVE A COMMENT

[Article content]

FILED UNDER: WORDPRESS

To:

LEAVE A COMMENT

[Article content]

JANUARY 10, 2012 ? FILED UNDER: WORDPRESS

January 10, 2012 Filed Under: How To, WordPress Tagged With: Genesis Framework

How to Add WPML “Flags Only” Language Switcher to Your Navigation

The WordPress Multilingual Plugin (WPML) is a really useful plugin to build multilingual websites, however the default language switcher is not always placed neatly on the layout. After searching on WPML’s website, I ran across the page that explains how to customize the language selector with flags only:

Custom Language Switcher WPML

Now I have another problem because I wanted to place the flag language selector on the right side of my navigation menu using StudioPress Theme and I don’t have quite a good grasp of its framework yet. Luckily, Bill Erickson has a very good tutorial on how to customize/add content to its navigation:

How to Add Content to Your Navigation

From the two tutorials above, here are all the combined steps I took. Essentially, I just needed to modify two files from my Genesis child theme.

1. functions.php file:

add_filter( 'genesis_nav_items' , 'flags_selector' , 10 , 2 );
add_filter( 'wp_nav_menu_items' , 'flags_selector' , 10 , 2 );
function flags_selector($menu, $args){
  $args = (array)$args;
  $flags = '';

  if ( $args['theme_location'] != 'primary' )
    return $menu;

  $lang = icl_get_languages('skip_missing=0&orderby=code');
  if( !empty($lang) ) {
    $flags .= '<div id="flags-selector">';
    foreach( $lang as $l ) {
      $flags .= '<div class="flag-item">';
      if( !$l['active'] )
        $flags .= '<a href="' . $l['url']. '">';
      $flags .= '<img src="'. $l['country_flag_url']
                . '" height="12" alt="' . $l['language_code']
                . '" width="18" title="' . $l['translated_name']
                . '" />';
      if ( !$l['active'] )
        $flags .= '</a>';
      $flags .= '</div>';
    }
    $flags .= '</div>';
  }
  return $menu . $flags;
}

2. The CSS:

/***** Flags Only Language Selector *****/
#flags-selector {
  float: right;
  padding-top: 10px;
  }

.flag-item {
  display: inline;
  padding: 4px;
  }

The final result with the flags placed neatly on the right side of the navigation bar, can be seen on the graphic below (Agency Child Theme from Genesis Framework is used for this demo):

WPML Flags Only Language Selector on Genesis Agency Child Theme

December 12, 2011 Filed Under: How To, WordPress Tagged With: Genesis Framework

« Previous Page
Buy me a coffee Support this site
Buy Me a Coffee?

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • Tips and Tricks
  • Uncategorized
  • Use Case
  • WordPress
  • Writing

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Tags

.NET .NET Core AdSense ASP.NET Cdonts Dll Classic ASP Code Editor ETL FSharp Genesis Framework Git Google HP Asset Manager HTML5 Hugo IIS Information Security Internet Internet Information Services iOS JAMStack Linux macOS Microsoft Microsoft SQL Server MVC PHP PowerShell Python Simple Mail Transfer Protocol Smtp Server SQL SQL Server SSIS SSMS SSRS Sublime Text Visual Studio Visual Studio Code VPN Windows Windows 8 Windows 10 Windows 2012 Windows Server

Copyright © 2011-2025 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure