How do I edit this code so that it also adds specific meta data into the user and subsequent CPT being created?

You would use these functions for adding meta: add_user_meta adds user meta add_post_meta adds post meta Notice that wp_insert_post will also return the post ID of the post created ( or a WP_Error object if it failed ). You can then use that in add_post_meta. See https://developer.wordpress.org/reference/functions/wp_insert_post/ Note though that tags/categories are not meta, they … Read more

Remove from

try this add_filter( ‘the_content’, ‘remove_paragraphs_inside_blockquotes’, 9 ); function remove_paragraphs_inside_blockquotes( $content ) { $dom = new DOMDocument(); libxml_use_internal_errors(true); $dom->loadHTML(‘<?xml encoding=”utf-8″ ?>’ . $content, LIBXML_HTML_NODEFDTD | LIBXML_HTML_NOIMPLIED); libxml_clear_errors(); $blockquotes = $dom->getElementsByTagName(‘blockquote’); foreach ( $blockquotes as $blockquote ) { foreach ( $blockquote->childNodes as $child ) { if ( $child->nodeName === ‘p’ ) { while ( $child->firstChild ) { … Read more

How to add ‘nofollow’ flag to all Tag archive hyperlinks?

I already had this challenge before and here is my personal solution for you: 1. For the tag cloud widget you can use this approach: add_filter(‘wp_tag_cloud’, ‘add_nofollow_to_tag_cloud’); function add_nofollow_to_tag_cloud($content) { // Add ‘nofollow’ to the links $content = str_replace(‘<a href=”‘, ‘<a rel=”nofollow” href=”‘, $content); return $content; } I already tested this locally and it works … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)