Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

functions

How to add if statement on WordPress shortcode output

You can use buffer, so instead of storing your markup in the $output variable and then print that variable inside your wrapper, you can store everything in buffer, save it all in a variable and return that variable function byn_recent_resources_shortcode($atts, $content = null) { //…Put the same logic as in your question code //…Change, for … Read more

Categories functions Tags functions, media-library, shortcode

Bulk updating a group of WordPress Pages every 10 minutes

I will recommend to not use wp cron since will require someone to visit the website. Read more here about cron jobs. In case you want with wp-cron here is what you need: Create 10 minutes interval in your schedules if you dont have one. add_filter( ‘cron_schedules’, function ( $schedules ) { $schedules[‘every_ten_minutes’] = array( … Read more

Categories functions Tags automation, bulk, cron, functions, wp-cron

Custom function that re-writes page title breaks when the Yoast plugin is activated

Well .. for those of you who might be interested, this is how I succeeded at overriding the Yoast plugin conflict with my 404 page titles: I added a simple custom method to my mu-plugin file that retrieves the property address: function get_property_address() { global $parsed_address; return $parsed_address; } I added this custom method for … Read more

Categories PHP Tags functions, php, plugin-wp-seo-yoast

Change Page Title

If your template is using the_title you can override it by adding this filter to your function add_filter( ‘the_title’, ‘change_my_property_title’ );

Categories functions Tags functions, json, title, variables

How do I make the comment disappear after deleting from the database?

How do I make the comment disappear after deleting from the database?

Categories functions Tags comment-form, comments, comments-template, functions, post-type

Load templates, pass arguments, and render output from functions.php

Load templates, pass arguments, and render output from functions.php

Categories functions Tags functions, get-template-part, shortcode, templates

Pass URL to iframe in WordPress Block

Pass URL to iframe in WordPress Block

Categories functions Tags block-editor, functions, iframe

Display Visual Composer shortcode if a post belongs in specific categories

Sounds like you’re looking for has_category(), which Checks if the current post has any of given category. You would use it, for example in single.php, like so, <?php if ( has_category( array( ‘cat-a’, ‘cat-b’, ‘cat-c’ ) ) ) : ?> <div> <?php echo do_shortcode( ‘some_shortcode’ ); ?> </div> <?php endif; ?>

Categories PHP Tags categories, functions, php, shortcode

how to replace h1 entry title with h2 in category pages only

how to replace h1 entry title with h2 in category pages only

Categories PHP Tags functions, get-template-part, php, theme-development, title

Trying to update Woocommerce meta values

Trying to update Woocommerce meta values

Categories PHP Tags custom-field, customization, forms, functions, php
Older posts
Newer posts
← Previous Page1 … Page212 Page213 Page214 … Page600 Next →
+ More

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
Next Page »
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress