Browsing Category

Wordpress functions

Instances Not Updating in WordPress Widget update Method

public function update($new_instance, $old_instance) { $instance = array(); if ( ! empty( $new_instance['title'] ) ) { $instance['title'] = sanitize_text_field( $new_instance['title'] ); } if ( !

Include a php file from functions.php only to homepage

I’m re-developing a wordpress theme using sage them framework. I have this array in functions.php $sage_includes = [ 'lib/assets.php', // Scripts and stylesheets 'lib/theme_options.php', //

Add a class to cancel_comment_reply_link()

The function can be found here, by default only the $text can be edited: <?php cancel_comment_reply_link( $text ); ?> And the default output like below:

Get rid of the widget Item Class="widgettitle"

I want to get rid of this class=”widgettitle” because this is creating extra margin/padding. Please see the image. I want to get rid of this

Get rid of the widget Item Class="widget-item"

I want to get rid of this class=”widget-item” because this is creating extra margin/padding. Please see the image. I want to get rid of this

How to do set post permalinks using 6 digit random unique function?

I need the following: e.g. www.eg.com/hello-world to www.eg.com/9xY52a of course function check 9xY52a inside the databese posts. Read more here: How to do set post

Load custom css in functions.php causing library issue

I’m loading custom css stylesheet in my child theme ‘functions.php’ using this code if (ICL_LANGUAGE_CODE == 'ar') { ?> <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() .

How can disable wordpress emails notifications?

How can disable WordPress emails notifications? Your email change. New user registration email. Password change email. I found many solutions but it’s too old. Read

Add html files as new pages

I am trying to add FTP uploaded html files (*.html) as new pages in WordPress and then extract the html content from the file and

Add html files names and content as new WordPress pages

I am trying to add FTP uploaded html files (*.html) as new pages in WordPress via the wp_posts table and then extract the html content

Can’t get buddypress notifications in front-end; why do I get this error?

Can someone help me with this? This is supposed to go into functions.php: function cg_current_user_notification_count() { $notifications = bp_core_get_notifications_for_user(bp_loggedin_user_id(), 'object'); $count = !empty($notifications) ? count($notifications)

Exclude specific category from variable archive

Am try to exclude a specific category form woocommerce variable page. I have the following code. Any help how can achieved that? add_action( 'pre_get_posts', 'custom_pre_get_posts_query'

how to refresh div on template part?

i’m keep learning about wordpress development and i’ve developed this template-part and loop and i need that entire div#dreams-gallery refresh after a period of time,

Display first post on each page differently than the others

I’m trying to work out how to show posts differently on each page. My wordpress blog will show 4 posts on one page. I want

What is the correct way of updating options on theme activationn?

I’ve added some codes to my theme’s function so when i activated the theme, it will update the category base, permalinks, and post_per_page and they

What is the correct way of updating wordpress options

I’ve added some codes to my theme’s function so when I activated the theme, it will update the category base, permalinks, and post_per_page, and they

Back to Top 145132 wordpress questions, 32 Wordpress answers.
Wordpress related, All rights reserved
Powered by Creative Advertising