Urltopostid

Get post / page ID from ACF Link field

Get post / page ID from ACF Link field

You can get a post's ID from a URL with url_to_postid() . Just pass it the URL to get the ID back: $link = get_sub_field( 'offer_link' ); $id = url_to_postid( $link['url'] );

Manage roles and capabilities without loads of code
How do I manage roles in WordPress? How do you add capability in user role editor? What do the different WordPress roles mean? How do I add user roles...
Wordpress slow query
WordPress can be prone to slower queries on the wp_posts table, if you have a large amount of data, and many different custom post types. If you are f...
Woocommerce DIsplay regular price for 0 priced products
How do I display normal price in WooCommerce? How do you show variable product price in WooCommerce? Can I use WooCommerce without prices? How do I se...