Trying to get this function to show below the content

If it was me I’d not echo the text I’d make it a variable e.g. $additional_text = “” then at the end of the function return $additional_text;. if (have_posts()) : while (have_posts()) : the_post(); $additional_text=”<div class=”timeline”>”; $additional_text .= ‘<a href=”‘; $additional_text .= the_permalink(); $additional_text .= ‘”><h3>’; $additional_text .= the_title(); $additional_text .= ‘</h3></a>’; $additional_text .= ‘</div>’; … Read more

How to stop WordPress from using utf8mb4_unicode_ci collation

You can filter every database query with the hook query, for example like this: add_filter( ‘query’, function ( $query ) { return str_replace( ‘utf8mb4_unicode_ci’, ‘utf8_unicode_ci’, $query ); }); However, I would strongly recommend not to do this. Update your databases instead. The old utf8_* collations have very annoying limitations, and you will run into plugin … Read more

totally confused about editing wp theme….new guy to wp

Here there are 3 scenarios: 1- You want to customize your current theme. You can do this by heading to Appearance > Customize in the left sidebar. You can customize your theme there, based on the theme’s design. 2- You want to change the theme’s structure. If you are familiar with HTML, CSS and PHP, … Read more

Send email notification when meet the condition

You can use this code to automatically send an email whenever a post of the type one is published. This goes into your theme’s functions.php : <?php function post_published_notification( $ID, $post ) { $type = get_post_type($ID); if ($type == ‘post-type-one’){ $author = $post->post_author; /* Post author ID. */ $name = get_the_author_meta( ‘display_name’, $author ); $email … Read more

Custom Pin it button is not showing over the image instead it shows as block top_left

I assume you want something like the following: An HTML output could help us to understand the issue more clear. However, you can set the position of the parent to relative, using: p.your-p-class { position:relative} Then, position your button as absolute. .pin-it-button{ position: absolute; top:-50%; left:50%} This will set your pin halfway from top and … Read more

DROP TABLE IF EXISTS `wp_options` error?

Check this ref. If you don’t have the database create instruction inside your script: CREATE DATABASE your_db; You need to manually do that. Else if you have the database: use this to select it first before executing the script. USE your_db;