Pagename: general - General
Category:Array
Post Count: 5Category:General
Pagename: general - General

Frydenberg is an evil fucker

He shows it time and time again. Zero fucks given to anything that doesn’t have a dollar value attached.

Case in point:
https://www.theguardian.com/environment/2020/dec/03/frydenberg-proposed-delisting-wetland-to-allow-queenslands-toondah-harbour-development
These wetlands are critical for immigrating birds and he gives them zero value in the face of helping out his developer mate. This happened while he was the environment minister. It makes my blood curdle. What a piece of shit.

Leave a Reply

Your email address will not be published. Required fields are marked *

Category:General
Pagename: general - General

WordPress – Add Custom Content Plugin

Editing posts directly within the wordpress editor can be a nuisance when wordpress inserts ‘p’ tags and the like. Sometimes I want to edit HTML in actual HTML editor which allows me greater control over the presentation of the content.

To facilitate this I have added a plugin which inserts HTML from a custom file based on the post id.

Content is added a file within the ‘custom’ folder:
“twentyfifteen-child\Custom\Content\Custom-Content-82.php

This file can be edited and viewed in a standard HTML editor. The number within the file name is the post id which can be found from url’s and other ways. When the content is shown, the content within the wordpress editor is shown first followed by the content within the file.

Here is the plugin code as to date:

<?php
/**
 * Plugin Name:       Include Custom Content
 * Plugin URI:        https://dalestake.com/2019/11/26/wordpress-add-custom-content-plugin/
 * Description:       Inserts files stored in 'Custom/Content/' into the content section (ie within the body of the post)
 * Version:           0.1
 * Author:            Dale Anderson
 * Author URI:        NA
 * License:           GPL v2 or later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain:       include-custom-content
 */

// Check if a custom content file exists... 

add_filter('the_content', 'InsertCustomContent');
function InsertCustomContent($content)
{
    $CurID = get_the_ID();
    $FilePath = get_stylesheet_directory()."\Custom\Content\Custom-Content-".$CurID.".php";

    if(file_exists ( $FilePath))
    {
        $content = $content.file_get_contents($FilePath);
    }
    else
    {
        $content = $content;
    }
    return $content;
}

My intent is to make adjustments to allow similar files to be included such as scripts and css.

Leave a Reply

Your email address will not be published. Required fields are marked *

Category:General
Pagename: general - General

WordPress – Add Custom Content Plugin

Editing posts directly within the wordpress editor can be a nuisance when wordpress inserts ‘p’ tags and the like. Sometimes I want to edit HTML in actual HTML editor which allows me greater control over the presentation of the content.

To facilitate this I have added a plugin which inserts HTML from a custom file based on the post id.

Content is added a file within the ‘custom’ folder:
“twentyfifteen-child\Custom\Content\Custom-Content-82.php

This file can be edited and viewed in a standard HTML editor. The number within the file name is the post id which can be found from url’s and other ways. When the content is shown, the content within the wordpress editor is shown first followed by the content within the file.

Here is the plugin code as to date:

<?php
/**
 * Plugin Name:       Include Custom Content
 * Plugin URI:        https://dalestake.com/2019/11/26/wordpress-add-custom-content-plugin/
 * Description:       Inserts files stored in 'Custom/Content/' into the content section (ie within the body of the post)
 * Version:           0.1
 * Author:            Dale Anderson
 * Author URI:        NA
 * License:           GPL v2 or later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain:       include-custom-content
 */

// Check if a custom content file exists... 

add_filter('the_content', 'InsertCustomContent');
function InsertCustomContent($content)
{
    $CurID = get_the_ID();
    $FilePath = get_stylesheet_directory()."\Custom\Content\Custom-Content-".$CurID.".php";

    if(file_exists ( $FilePath))
    {
        $content = $content.file_get_contents($FilePath);
    }
    else
    {
        $content = $content;
    }
    return $content;
}

My intent is to make adjustments to allow similar files to be included such as scripts and css.

Leave a Reply

Your email address will not be published. Required fields are marked *

Category:General
Pagename: general - General

WordPress – Useful links – Reference info

WordPress template hierarchy – How wordpress decides which template to show based on user selections. Thumbnail goes to flowchart, link goes to ‘basics’ page.
wpdb – wpdb class controls the connection and information to and from the wordpress DB (or other connected DB’s).
WP_Query – WordPress wp_query class allows manipulation of the DB query (ie change categories, authors etc)

Leave a Reply

Your email address will not be published. Required fields are marked *

Category:General
Pagename: general - General

WordPress – Useful links – Reference info

WordPress template hierarchy – How wordpress decides which template to show based on user selections. Thumbnail goes to flowchart, link goes to ‘basics’ page.
wpdb – wpdb class controls the connection and information to and from the wordpress DB (or other connected DB’s).
WP_Query – WordPress wp_query class allows manipulation of the DB query (ie change categories, authors etc)

Leave a Reply

Your email address will not be published. Required fields are marked *