SlideShare a Scribd company logo
Mastering the Art of
WordPress: 13 Years of
Advanced Tips and Tricks
Stanko Metodiev
WordCamp Sofia, 2024
Stanko Metodiev
About Stanko
● CTO @ DevriX
● WordPress Core and community contributor
● (Co) Leader of the first WordPress meetup in
Bulgaria - WordPress Sofia (WPBGUG)
● WordCamp Organizer and Lead Organizer of
WordCamp Sofia 2023
● More than 13 years in developing complex
SaaS platforms and multisite solutions
● Proud dad and a husband of princesses
Table of
Contents
● A little bit of a backstory
● Some code snippets here and there
● Some WordPress tips and tricks
● Some tools
● Some personal thoughts and my journey so
far
● And I hope you'll learn something new today
The personal growth
From simply the blog owner to becoming a CTO
The personal growth
★ Started university as both a joke and an experiment
Stanko Metodiev
The personal growth
★ Started university as both a joke and an experiment
★ Met some amazing people and made connections
Stanko Metodiev
The personal growth
★ Started university as both a joke and an experiment
★ Met some amazing people and made connections
★ Demonstrated organizational skills
Stanko Metodiev
The personal growth
★ Started university as both a joke and an experiment
★ Met some amazing people and made connections
★ Demonstrated organizational skills
★ Wasn't the best student :D (not an actual advice)
Stanko Metodiev
The personal growth
★ Started university as both a joke and an experiment
★ Met some amazing people and made connections
★ Demonstrated organizational skills
★ Wasn't the best student :D (not an actual advice)
★ Started as an intern
Stanko Metodiev
The personal growth
★ Started university as both a joke and an experiment
★ Met some amazing people and made connections
★ Demonstrated organizational skills
★ Wasn't the best student :D (not an actual advice)
★ Started as an intern
★ Worked hard and learned daily
Stanko Metodiev
The personal growth
★ Started university as both a joke and an experiment
★ Met some amazing people and made connections
★ Demonstrated organizational skills
★ Wasn't the best student :D (not an actual advice)
★ Started as an intern
★ Worked hard and learned daily
★ Made mistakes and improved by doing them
Stanko Metodiev
The personal growth
★ Started university as both a joke and an experiment
★ Met some amazing people and made connections
★ Demonstrated organizational skills
★ Wasn't the best student :D (not an actual advice)
★ Started as an intern
★ Worked hard and learned daily
★ Made mistakes and improved by doing them
★ Didn't give up Stanko Metodiev
Beyond the Code:
Professional Growth Path
Open Source Community
● Build and share
● Write (technical)
articles and share
knowledge
● Mentor others
● Contribute to
WordPress and
Open-Source
● Speak at
WordCamps and
conferences
● Organize local
meetups
Technical Excellence
● Master your craft
● Technical expertise
● Balance perfection
with pragmatism
● Strategic thinking
● Learning routine
● Time management
● Develop leadership
skills
● Write maintainable,
scalable code
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
Let’s get some (actual) advice,
shall we?
Stanko Metodiev
wp_enqueue* and Asset
Optimizations
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
The query_posts() trap
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
★ Performance impact - replaces the primary query, query_posts results in
two queries—one for the original and one for the override—leading to
unnecessary database load
★ Risk of unexpected behavior - accidentally alter the main query in ways
that interfere with themes and plugins expecting the default query
structure, causing compatibility issues
★ Limited control: unlike pre_get_posts, query_posts doesn’t allow
developers to refine or manipulate the existing query
★ Best practice: WordPress recommends using pre_get_posts or custom
WP_Query instances for safe and effective query modifications
Why NOT query_posts()?
Stanko Metodiev
pre_get_posts()
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
Why pre_get_posts()?
Stanko Metodiev
★ Improves performance
★ Reduce unnecessary queries
★ Increased efficiency - load only relevant data, improving page speed
★ Tailor query results
★ It’s just nice tool to have
★ There are other pre_get_<something>, check them out
get_posts()
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
Why and when to use get_posts()?
Stanko Metodiev
★ Best for simple queries
★ When you need just the post data
★ Better performance with small queries
★ Simple syntax
★ Always use wp_reset_postdata() after custom queries
WP_Query()
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
Why and when to use WP_Query()?
Stanko Metodiev
★ Full control over queries
★ Built-in compatibility
★ Flexible data retrieval
★ Enhanced performance options
★ Pagination support
★ And many more
★ Always use wp_reset_postdata() after custom queries
Query optimizations
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
Why you should be careful with -1?
Stanko Metodiev
★ Retrieve all posts without limitation
★ Avoids pagination
★ Useful for non-public data *
Caution: be mindful when using -1 on high-traffic,
public-facing pages with a large dataset, as it can impact
performance.
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
WP_Query optimizations
Stanko Metodiev
★ use posts_per_page
★ use post_status when applicable
★ use no_found_rows when you don’t need pagination
★ use update_post_meta_cache argument if you don’t need meta data
★ use update_post_term_cache argument when do don’t need taxonomy
★ use fields when you need just IDs*
Object Cache is your friend
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
Why and when to use Object Cache?
Stanko Metodiev
★ Improves performance - reduces the number of expensive database
queries
★ Scales better with high traffic - caching frequently requested data
prevents database overload during peak traffic
★ Increases user experience - faster response times improve the user
experience
★ Flexible expiration
Transients are your friends
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
★ transients cache expensive data (e.g., API responses) to prevent
repetitive processing
★ Reduces server load
★ Efficient caching control and Ideal for temporary Data
★ Flexible storage - transients can be stored in the database or in-memory
using object caching systems like Redis or Memcached
★ Better user experience - faster load times improve the user experience
Why and when to use Transients?
Stanko Metodiev
REST API to the rescue
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
Why and when to use REST API?
Stanko Metodiev
★ In our example:
○ Building social media cards or creating preview widgets
○ Creating link previews in headless WordPress setups
○ Getting optimized post data for mobile apps
★ Headless applications
★ Data hub applications
★ 3rd party integrations
★ Many, many more
What about security?
Stanko Metodiev
Security 101
Stanko Metodiev
● Use strong and unique passwords. Full stop.
● Use 2FA/Passkeys
● Regular users audit
● Limited login attempts
● Solid hosting provider
● Regular updates
● Do not rely on security plugins *
● Never ever nulled themes/plugins
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
be careful with the items you’ll use here
What about some tools?
Stanko Metodiev
★ Personalized Text Editor/IDE
★ Shortcuts and alias
★ Trusted plugins
★ Templates for anything
★ Code snippets, libraries, and templates
★ Bash/SSH/Terminal
★ WP-CLI and Query Monitor
★ Chrome dev tools *
★ Git/Version Control
Tools
Stanko Metodiev
AI Tools
★ ChatGPT / Claude / Gemini
★ AI changes the way we work
★ AI can be your friend if you
★ know how to use it
★ AI website / WordPress builders
★ Make sure to check some of the AI-related talks today!
Stanko Metodiev
Thank you!
Get in
Touch
@metodiew
Twitter
metodiew
WordPress.org metodiew.com
Stanko Metodiev
LinkedIn
Stanko Metodiev

More Related Content

PDF
Do WordPress developers write code?
PPTX
Developing word press professionally
PPTX
Drupal Developer Days Presentation - Open-Source Platform Alliance_ Collabora...
PDF
From WordPress Configurator to WordPress Developer
PPTX
Monster JavaScript Course - 50+ projects and applications
PDF
WordPress - From the Start - WordCamp Sofia 2013
PDF
Seminar: Become a Reliable Web Programmer
PDF
How to become Industry ready engineers.pdf
Do WordPress developers write code?
Developing word press professionally
Drupal Developer Days Presentation - Open-Source Platform Alliance_ Collabora...
From WordPress Configurator to WordPress Developer
Monster JavaScript Course - 50+ projects and applications
WordPress - From the Start - WordCamp Sofia 2013
Seminar: Become a Reliable Web Programmer
How to become Industry ready engineers.pdf

Similar to Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks (20)

PDF
Making websites with WordPress
PPT
How to do b tech be projects or any academic projects
PPTX
How to Build your Career.pptx
PDF
Starting Your First Job in the Software Industry: Tips and Tricks from Nakov
PPTX
Journey to Google
PDF
USG Rock Eagle 2017 - PWP at 1000 Days
PDF
gettingintothetechfieldwhatnext-210526205624.pdf
PDF
Getting into the tech field. what next
PDF
Producing Online Educational Videos
PDF
Should I DIY or BUY a new WordPress website?
PDF
How to Write a Winning Session Submission
PPTX
Kentico Cloud Best Practices
PPT
.Net training in Bhubaneswar
PDF
Build next generation apps with eyes and ears using Google Chrome
PDF
WordPress News and #SaigonWordPress 2015 - Saigon WordPress - Jan 17, 2015
PDF
Virtual #SalesforceSaturday : Salesforce Connect with Cross Org Adaptor
PDF
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
PDF
Oracle APEX for Beginners
PDF
Software craftsmanship
PDF
Ottawa Drupalcamp 2024 Keynote: Chart Your Drupal Journey
Making websites with WordPress
How to do b tech be projects or any academic projects
How to Build your Career.pptx
Starting Your First Job in the Software Industry: Tips and Tricks from Nakov
Journey to Google
USG Rock Eagle 2017 - PWP at 1000 Days
gettingintothetechfieldwhatnext-210526205624.pdf
Getting into the tech field. what next
Producing Online Educational Videos
Should I DIY or BUY a new WordPress website?
How to Write a Winning Session Submission
Kentico Cloud Best Practices
.Net training in Bhubaneswar
Build next generation apps with eyes and ears using Google Chrome
WordPress News and #SaigonWordPress 2015 - Saigon WordPress - Jan 17, 2015
Virtual #SalesforceSaturday : Salesforce Connect with Cross Org Adaptor
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
Oracle APEX for Beginners
Software craftsmanship
Ottawa Drupalcamp 2024 Keynote: Chart Your Drupal Journey
Ad

Recently uploaded (20)

PDF
Mushroom cultivation and it's methods.pdf
PDF
August Patch Tuesday
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
A Presentation on Artificial Intelligence
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Spectroscopy.pptx food analysis technology
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Mushroom cultivation and it's methods.pdf
August Patch Tuesday
Group 1 Presentation -Planning and Decision Making .pptx
MIND Revenue Release Quarter 2 2025 Press Release
A Presentation on Artificial Intelligence
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TLE Review Electricity (Electricity).pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectral efficient network and resource selection model in 5G networks
Heart disease approach using modified random forest and particle swarm optimi...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Unlocking AI with Model Context Protocol (MCP)
Spectroscopy.pptx food analysis technology
A comparative study of natural language inference in Swahili using monolingua...
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Per capita expenditure prediction using model stacking based on satellite ima...
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Ad

Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks

  • 1. Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks Stanko Metodiev WordCamp Sofia, 2024
  • 2. Stanko Metodiev About Stanko ● CTO @ DevriX ● WordPress Core and community contributor ● (Co) Leader of the first WordPress meetup in Bulgaria - WordPress Sofia (WPBGUG) ● WordCamp Organizer and Lead Organizer of WordCamp Sofia 2023 ● More than 13 years in developing complex SaaS platforms and multisite solutions ● Proud dad and a husband of princesses
  • 3. Table of Contents ● A little bit of a backstory ● Some code snippets here and there ● Some WordPress tips and tricks ● Some tools ● Some personal thoughts and my journey so far ● And I hope you'll learn something new today
  • 4. The personal growth From simply the blog owner to becoming a CTO
  • 5. The personal growth ★ Started university as both a joke and an experiment Stanko Metodiev
  • 6. The personal growth ★ Started university as both a joke and an experiment ★ Met some amazing people and made connections Stanko Metodiev
  • 7. The personal growth ★ Started university as both a joke and an experiment ★ Met some amazing people and made connections ★ Demonstrated organizational skills Stanko Metodiev
  • 8. The personal growth ★ Started university as both a joke and an experiment ★ Met some amazing people and made connections ★ Demonstrated organizational skills ★ Wasn't the best student :D (not an actual advice) Stanko Metodiev
  • 9. The personal growth ★ Started university as both a joke and an experiment ★ Met some amazing people and made connections ★ Demonstrated organizational skills ★ Wasn't the best student :D (not an actual advice) ★ Started as an intern Stanko Metodiev
  • 10. The personal growth ★ Started university as both a joke and an experiment ★ Met some amazing people and made connections ★ Demonstrated organizational skills ★ Wasn't the best student :D (not an actual advice) ★ Started as an intern ★ Worked hard and learned daily Stanko Metodiev
  • 11. The personal growth ★ Started university as both a joke and an experiment ★ Met some amazing people and made connections ★ Demonstrated organizational skills ★ Wasn't the best student :D (not an actual advice) ★ Started as an intern ★ Worked hard and learned daily ★ Made mistakes and improved by doing them Stanko Metodiev
  • 12. The personal growth ★ Started university as both a joke and an experiment ★ Met some amazing people and made connections ★ Demonstrated organizational skills ★ Wasn't the best student :D (not an actual advice) ★ Started as an intern ★ Worked hard and learned daily ★ Made mistakes and improved by doing them ★ Didn't give up Stanko Metodiev
  • 14. Open Source Community ● Build and share ● Write (technical) articles and share knowledge ● Mentor others ● Contribute to WordPress and Open-Source ● Speak at WordCamps and conferences ● Organize local meetups
  • 15. Technical Excellence ● Master your craft ● Technical expertise ● Balance perfection with pragmatism ● Strategic thinking ● Learning routine ● Time management ● Develop leadership skills ● Write maintainable, scalable code
  • 17. Let’s get some (actual) advice, shall we? Stanko Metodiev
  • 23. ★ Performance impact - replaces the primary query, query_posts results in two queries—one for the original and one for the override—leading to unnecessary database load ★ Risk of unexpected behavior - accidentally alter the main query in ways that interfere with themes and plugins expecting the default query structure, causing compatibility issues ★ Limited control: unlike pre_get_posts, query_posts doesn’t allow developers to refine or manipulate the existing query ★ Best practice: WordPress recommends using pre_get_posts or custom WP_Query instances for safe and effective query modifications Why NOT query_posts()? Stanko Metodiev
  • 26. Why pre_get_posts()? Stanko Metodiev ★ Improves performance ★ Reduce unnecessary queries ★ Increased efficiency - load only relevant data, improving page speed ★ Tailor query results ★ It’s just nice tool to have ★ There are other pre_get_<something>, check them out
  • 29. Why and when to use get_posts()? Stanko Metodiev ★ Best for simple queries ★ When you need just the post data ★ Better performance with small queries ★ Simple syntax ★ Always use wp_reset_postdata() after custom queries
  • 32. Why and when to use WP_Query()? Stanko Metodiev ★ Full control over queries ★ Built-in compatibility ★ Flexible data retrieval ★ Enhanced performance options ★ Pagination support ★ And many more ★ Always use wp_reset_postdata() after custom queries
  • 36. Why you should be careful with -1? Stanko Metodiev ★ Retrieve all posts without limitation ★ Avoids pagination ★ Useful for non-public data * Caution: be mindful when using -1 on high-traffic, public-facing pages with a large dataset, as it can impact performance.
  • 38. WP_Query optimizations Stanko Metodiev ★ use posts_per_page ★ use post_status when applicable ★ use no_found_rows when you don’t need pagination ★ use update_post_meta_cache argument if you don’t need meta data ★ use update_post_term_cache argument when do don’t need taxonomy ★ use fields when you need just IDs*
  • 39. Object Cache is your friend
  • 42. Why and when to use Object Cache? Stanko Metodiev ★ Improves performance - reduces the number of expensive database queries ★ Scales better with high traffic - caching frequently requested data prevents database overload during peak traffic ★ Increases user experience - faster response times improve the user experience ★ Flexible expiration
  • 47. ★ transients cache expensive data (e.g., API responses) to prevent repetitive processing ★ Reduces server load ★ Efficient caching control and Ideal for temporary Data ★ Flexible storage - transients can be stored in the database or in-memory using object caching systems like Redis or Memcached ★ Better user experience - faster load times improve the user experience Why and when to use Transients? Stanko Metodiev
  • 48. REST API to the rescue
  • 52. Why and when to use REST API? Stanko Metodiev ★ In our example: ○ Building social media cards or creating preview widgets ○ Creating link previews in headless WordPress setups ○ Getting optimized post data for mobile apps ★ Headless applications ★ Data hub applications ★ 3rd party integrations ★ Many, many more
  • 54. Security 101 Stanko Metodiev ● Use strong and unique passwords. Full stop. ● Use 2FA/Passkeys ● Regular users audit ● Limited login attempts ● Solid hosting provider ● Regular updates ● Do not rely on security plugins * ● Never ever nulled themes/plugins
  • 56. be careful with the items you’ll use here
  • 57. What about some tools? Stanko Metodiev
  • 58. ★ Personalized Text Editor/IDE ★ Shortcuts and alias ★ Trusted plugins ★ Templates for anything ★ Code snippets, libraries, and templates ★ Bash/SSH/Terminal ★ WP-CLI and Query Monitor ★ Chrome dev tools * ★ Git/Version Control Tools Stanko Metodiev
  • 59. AI Tools ★ ChatGPT / Claude / Gemini ★ AI changes the way we work ★ AI can be your friend if you ★ know how to use it ★ AI website / WordPress builders ★ Make sure to check some of the AI-related talks today! Stanko Metodiev