Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8275557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:06:49+00:00 2026-06-08T08:06:49+00:00

Unfortunately I can’t point you to a live example. But I’ve got a form

  • 0

Unfortunately I can’t point you to a live example. But I’ve got a form that submits a bunch of data to the database.

I retrieve the ‘date’ field with

genesis_custom_field('date')

and the output date is “mm/dd/yyyy” e.g., 02/19/2012

so shouldn’t

echo substr(genesis_custom_field('date'), 0, 2) . '<-M<br />'

output “02”

instead, it’s outputting the full date format, “02/19/2012”.

INTENTS AND PURPOSES

for intents and purposes, here’s the code sample.

// The Query
$reviews_query = new WP_Query('showposts=1');

// The Loop
while ( $reviews_query->have_posts() ) : $reviews_query->the_post();

echo substr(genesis_custom_field('date'), 0, 2) . '<-M<br />';

endwhile;
// Reset Post Data
wp_reset_postdata();

with the intended output of

02<-M

but I’m getting

02/19/2012<-M
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:06:51+00:00Added an answer on June 8, 2026 at 8:06 am

    The function genesis_custom_field actually echoes the value rather than return it which is why substr isn’t working. You are basically calling substr on a null value.

    Instead use the function genesis_get_custom_field if you want the value returned so you can modify it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can successfully add a calendar, but unfortunately I can't embed that calendar on
I herd about RED5, but unfortunately I can't find any examples for feeding it
I have some files that need to be sorted by name, unfortunately I can't
I've got a problem concerning combinatorics. Unfortunately, I can't describe it abstractly so I
I am trying to create a C++ wrapper for OpenCV, but unfortunately can't get
I really like git but unfortunately only can submit to a subversion repository. Is
I had an implementation that encrypts an input string using mcrypt. Unfortunately I can't
I'm trying to get Jquery to read a json file, But unfortunately I can
Unfortunately I can't post link here to which post request is made to. But
I want to use an H2 database in my Java project, but unfortunately I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.