Skip to content
  • home
  • portfolio
  • web design journal
  • blog
    • adventure
    • san diego
    • projects
    • website design

wordpress

WordPress: Attempt to assign property “post_content” on null

October 14, 2023   |   Web Dev

I’ve hit this error a few times. The issue is with the wp_posts table, where for some reason when exporting/importing the database/table causes some issue with multiple posts having the same IDs for multiple posts. To resolve, re-import the database, or possibly delete out all of the rows that have duplicate post Ids.

Read More

WordPress Order Posts by a Meta Value

December 8, 2022   |   Quickbits

$args = array(    ‘post_type’ => ‘sessions’,    ‘post_status’ => ‘publish’,    ‘posts_per_page’ => -1,    ‘orderby’ => ‘meta_value’,    ‘meta_key’ => ‘session_date’,    ‘order’ => ‘ASC’ );

Read More

wordpress caption tag is appearing in text

November 8, 2022   |   Quickbits

I hit an odd issue where the wordpress caption tag text (actually the shortcode text for the caption) was appearing around the image. I’m gathering the data from a wysiwyg field from ACF.   Apparently you need to apply shortcodes to this. Also, my text didn’t have line breaks, so doing something like this solved those issues: […]

Read More

WordPress Meta Query Mix Relation

September 21, 2022   |   Quickbits

Using a mix of ‘And’ and ‘Or’ operators in the meta_query portion of wordpress get posts query. Specifically with this one, I was looking for an event that had a tag specified by the $show variable, and where the date to see if it was current was either the start or end date of the […]

Read More
September 13, 2022
Wordpress Set Image Upload Size There are four sizes of images that get created in wordpress when an admin user uploads an image to the media section. You can add more though. To do so, just add the following to the functions.php file: add_image_size('custom_size_name',600,600); In the above, the first number represents the maximum width, and the second is the maximum height. Basically the newly created image will fit within a box of those dimensions.

WordPress Set Image Upload Size

September 13, 2022   |   Quickbits

There are four sizes of images that get created in wordpress when an admin user uploads an image to the media section. You can add more though. To do so, just add the following to the functions.php file: add_image_size(‘custom_size_name’,600,600); In the above, the first number represents the maximum width, and the second is the maximum […]

Read More

Standard WordPress Image Sizes

August 22, 2022   |   Quickbits

thumbnail = Thumbnail (default 150px x 150px max) medium = Medium resolution (default 300px x 300px max) large = Large resolution (default 1024px x 1024px max) full = Full resolution (original size uploaded)

Read More

Get Featured Image URL By Size

June 23, 2022   |   Quickbits

get_the_post_thumbnail_url(get_the_ID(), ‘thumbnail’); get_the_post_thumbnail_url(get_the_ID(), ‘medium’); get_the_post_thumbnail_url(get_the_ID(), ‘large’);

Read More

Displaying Future Posts

June 20, 2022   |   Quickbits

To display future posts, just include the ‘post_status’ as part of the query: $args = array(      ‘post_status’ => array(‘publish’,’future’),     ‘post_type’ =>  ‘blog’,     ‘posts_per_page’ => 21,     ‘paged’ => $paged    );

Read More

WordPress – Category Page Not Showing Posts With Custom Post Type

May 25, 2022   |   Web Dev

I had created a post type for news articles. Unfortunately, when categorizing the pages, and trying to view the category from the front end, those posts weren’t appearing.   Apparently that doesn’t work for cusotm post types by default. To get them to show, add this to the functions.php file: function namespace_add_custom_types( $query ) {    if( (is_category() || is_tag()) && $query->is_archive() && empty( $query->query_vars[‘suppress_filters’] ) ) {       $query->set( ‘post_type’, array(        ‘post’, ‘news’       ));    } } […]

Read More

Posts navigation

Older posts
  • Adventure

    • adventure
    • gravelgrinding
    • hiking
    • running
  • The Built Environment

    • architecture
    • urbanity
  • Locations

    • san diego
    • portland
  • Freelance Life

    • freelancing
    • productivity
  • Web Dev

    • css
    • entrepreneurship
    • git
    • handlebars
    • html
    • inkscape
    • photoshop
    • php
    • sass
    • web design
    • web development
    • saphire

drempd | san diego, ca


home contact

adventures san diego urbanity and architecture projects stream website design

portfolio resume san diego web design freelance web designer

custom web design responsive web design website maintenance