Why I Love WordPress
In the early days (2003), WordPress was essentially a blogging tool and...
15.Apr.2015 | Code Snippets, Wordpress
Handy bit of code you can use in your custom templates that grabs the all the page or post data by ID:
<?php
$post = get_post(/* your ID here */);
setup_postdata($post);
?>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<?php rewind_posts(); ?>
Useful Links:
https://codex.wordpress.org/Function_Reference/setup_postdata
Coding Tips, Wordpress Function, WordPress Tips
Share
In the early days (2003), WordPress was essentially a blogging tool and...
To allow the editor user role to have full access to Gravity...
Add this code to your functions.php file to add the dimensions to...
A quick snipped of code filter parameters into YouTube oEmbed requests. Handy to remove suggested videos, YouTube contols and info....
How to use an ACF field to filter a loop with multiple post types There are other ways to do this,...
Add this code to your functions.php file to add the dimensions to the image object array for svgs. add_filter( 'wp_get_attachment_image_src',...