Category: WordPress

Change the author of a post in WordPress

To change the author of a post first go to and open a post. Now open the “Screen options” that you find right at the top of the post edit page.   Now click the author check box:   You should now be able to see the Author row appear…

Read More

Get post ID’s

Use the following code to get the post ID of a WordPress page

Read More

WordPress Dash incons

Can be used with your custom post types Link reference: Dashicons

Read More

Adding custom post types (CPT) without a plugin

Very simply try adding this to your wpt_cpt.php file and explore what this does for your WordPress site. In a nutshell, this adds a new post type that you can now define in WordPress.

Read More

WordPress disable admin navigation bar

To disable the admin navigation bar. Apply the following script to the function.php file. /* Disable the Admin Bar. */ add_filter( ‘show_admin_bar’, ‘__return_false’ );  

Read More

WordPress import Google fonts done the right way

Load fonts into your templates using Functions method as shown below: <?php function load_fonts() { wp_register_style(‘googleFonts’, ‘https://fonts.googleapis.com/css?family=Play:400,700|Roboto:400,700,900’); wp_enqueue_style( ‘googleFonts’); } add_action(‘wp_print_styles’, ‘load_fonts’); ?> This way the fonts are embedded for child themes and can be used when pages are printed to PDF.

Read More

Get featured image thumbnail as image or URL

the following code will return a featured image with <img> tags in a medium size. the_post_thumbnail(‘medium’); the following code will give you the URL of the featured image thumbnail (small) only. $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); if you want to get the medium size thumbnail using the same code use:…

Read More

Including part of a template get_template_part()

If you would like to include a part of a template like frontpage-services.php in the main front-page.php template file you will need to add it in the following format.

Read More

Top websites using wordpress

I often get asked if WordPress is scalable, ie. can you add a large proportion of articles to it. The answer is yes it is and to prove it here are a few big named websites that are currently using wordpress. http://techcrunch.com/ http://www.newyorker.com/ http://www.mtv.com/news/ http://fortune.com/ http://www.gv.com/ http://www.newyorker.com/ http://blogs.reuters.com/us/ http://www.bbcamerica.com/ http://www.starwars.com/news…

Read More

Trim text using wp_trim_words( )

User the following to trim display text. The following example is using a text field. wp_trim_words( get_field(‘intro_text’), 20 );

Read More

Adding Meta Tags to your WordPress site using ACF

An awesome way to set up convenient and easy to use meta tags using the very famous ACF Pro.

Read More

Add a new widget position

Follow these couple of steps to add a new widget position that new widgets can easily be dropped into in WordPress.

Read More