Jump to content

Search the Community

Showing results for tags 'word press'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hello! My name is Razvan and I work as a (front-end) web developer in Bucharest, Romania. I am using the Simple Staff List Word Press plugin on THIS page. I have used the guidance here to sort staff members by full name. I need to order them by last name. For this, even though I am new to PHP, I have written the code below: <?php $name = "Firstname Middlename Lastname"; $name_parts = explode(' ',$name); $no_of_parts = sizeof($name_parts); $last_name_index = $no_of_parts - 1; $last_name = $name_parts[$last_name_index]; $first_names = chop($name,$last_name); $reverse_name = $last_name . ' ' . $first_names; ?> It is made to move the last name at the beginning of the full name, store the result in the $reverse_name, and then sort by $reverse_name. It does move the last name at the beginning of the full name, but I can't do this 2 things: 1) Use the value of the staff member post title as value for the $name variable; 2) Use $reverse_name for sorting. Can anyone give me a hint on what to change in the plugin files to achieve this goal, please? Thank you! Razvan Zamfir
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.