The Definitive Guide to Setting Up WordPress in 2024: A Bristol Freelance Web Developer’s Essential Setup
In the ever-evolving landscape of website development, staying ahead of the curve...
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 ever-evolving landscape of website development, staying ahead of the curve...
In the digital realm, your website serves as the cornerstone of your...
In the ever-evolving world of e-commerce, having a robust and flexible platform...
If you’re a start up business, a sole trader or a small business, it is inevitable that you are going...
A recent freelance project has given me a chance to work with the Vebra and Dezrez API’s to create a...
How to use an ACF field to filter a loop with multiple post types There are other ways to do this,...