All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
2k views

Access Child Class of Plugin Main Class Instance

In a WordPress plugin where the author has defined a parent class and uses a standard instance method for other plugin authors to access the plugin example: function WP_Plugin() { return ...
0 votes
0 answers
15 views

How to change the Wordpress email icon?

When emails go out from a WordPress site, there is a site icon that goes with them and appears in email clients. This icon is taken from the WordPress favicon that is set under Appearance > ...
0 votes
1 answer
1k views

Add multiple sections, settings and controls at once to the Customizer

I am trying to make a slider configurable via the customizer. In order to let the user decide how many sliders he wants, I added a setting where the user can enter a number. Based on this number I ...
0 votes
1 answer
17 views

Is there a way to make it so that I don’t get a hamburger menu, but rather a desktop style nav, when resizing to a mobile size

I only have a few menus in my nav, and I don’t think a hamburger menu has the appropriate look for my mobile site. Anyway to force it to look like it does on the desktop?
0 votes
1 answer
768 views

WordPress does not load jQuery

I'd like to use WordPress with Bootstrap but WordPress does not load jQuery properly so I get this error message: Uncaught TypeError: Bootstrap's JavaScript requires jQuery. jQuery must be included ...
0 votes
0 answers
4 views

How to include a php file in 404.php file?

I have created a log to track some attacks on a website. At the moment I have included it directly in the 404 file like this: <?php get_header(); global $porto_settings; require_once(ABSPATH.'...
0 votes
0 answers
3 views

How to get enqueued files included directly in the result of get_template_part

I am caching a footer - I call get_template_part and cache the contents. But the footer has a script file enqueued in functions.php. That script does not get included in the cached content. Here is ...
0 votes
1 answer
628 views

Delete Term via edit-tags.php

I might get rep'ed down on this - but is there suppose to be a "Delete" link on the edit-tags.php page? Note: not the WP-List-Table, but the actual page where you specifically view the terms ...
0 votes
0 answers
10 views

wp cron does not run when i am not logged in to wp admin

I create a cronjob with my plugin but it is very very strange when I am not logged in to wp admin dashboard the cronjob is not running and when i am not logged in to wp admin dashboard it is running ...
2 votes
1 answer
871 views

Saving data from block editor to the database

I'm developing a wordpress plugin and looking to save data entered in a block to a mySQL table. That's it. But how can data be sent from the block editor to the server side? I've spent two weeks ...
0 votes
0 answers
5 views

WPforo How register or login also with mobile number in WPforo Forum

I want to Allow users to log in or sign up also with a mobile number if they want.
0 votes
0 answers
6 views

Disappearing plugins

I've had a problem with disappearing plugins lately. Several of my plugins are installed and are working, but you can't see them in the admin plugin interface, only WP-CLI. The plugins are "...
0 votes
1 answer
15 views

Block Gutenberg Editor manually by User Roles with a Filter with code

This is working perfectly for me but, is this an acceptable WP way to do it? Just trying to check that based on user role that the Gutenberg Editor blocked from showing up, like when creating a post, ...
0 votes
1 answer
782 views

How to redirect a Link to a new tab in contact form 7?

I was trying to redirect my contact form 7 to specific pdf link. But I m not sure how to open it in new tab can someone help me up with the same ? Below is my code... add_action( 'wp_footer', '...
3 votes
3 answers
2k views

Moved to new server, all pages work EXCEPT home page (page not found)

I've got the opposite problem a lot of people can when switching servers. All the pages work fine, EXCEPT the home page, which is generating a 404. It's just the blog URL by itself (mysite.com/...
0 votes
0 answers
8 views

Permalink Listing Wordpress

I am trying to do a personal project, unfortunately I am not an expert. Specifically, I am creating a classifieds site. For each ad, I would like the relative page to have a url containing the ...
0 votes
2 answers
1k views

Remove base category gives 404 error

I tried to remove /category/ base from permalink structure, keeping parent category, but Wordpress gives me back 404 error page. I'm not using any particular plugin to do that, only using . in ...
0 votes
1 answer
9 views

Custom template is not showing up in templates dropdown list after re-naming it

I have a bunch of templates that I have in folders in my main folder. I know wanted to move all of these into a "templates" folder to make my code base more clean and easy to navigate. I ...
0 votes
0 answers
8 views

Google search result is showing url twice [closed]

I have a WordPress website, which when searched in Google Search, displays the site URL on top of the page URL. whereas I check other websites and in theirs, it is showing the title of the website, ...
0 votes
2 answers
1k views

Using post title in an array

I want to use the the_title() function to get the title of a post and then reference that title in an array. Code is as follows: <?php $title = array( the_title() ...
0 votes
1 answer
624 views

Make sticky post with FacetWP

I have WordPress posts in combination with Advanced Custom Fields and FacetWP for filtering. WordPress has an option to make a post sticky, I did this and nothing happenend so I tried to change my ...
0 votes
1 answer
647 views

Next / previous posts link doesn't show up with Posts 2 Posts

I am working on a Wordpress project where I use the Posts 2 Posts plugin to show posts from one post type to posts from another post type. This works great but for some reason my next_posts_link() ...
1 vote
1 answer
619 views

Sanitize Custom Field Value in Meta Query

I'm using the pre_get_posts hook with meta_query args to filter an archive loop by dates. Basically, there is a custom post type of "events", and my users type in a date as a custom field for the ...
1 vote
1 answer
787 views

How to use buttons elements for tgetWordPress menu items?

How do I mix HTML element types for a two-menu navbar? I am building a WordPress theme with Bootstrap 4. WordPress' menu contents should be sourced from the Menus options, output in to a Bootstrap 4 ...
0 votes
1 answer
859 views

Make pagination work as a carousel (custom query)

I'm using a custom query on my static front page in order to show my posts, but I would like my pagination to work kinda like a carousel (instead of loading an entire new url). So, basically I want ...
1 vote
3 answers
13k views

PHP Warning: chmod(): Operation not permitted in class-wp-filesystem-direct.php on line 173

I running an instance of Wordpress on my web server but I'm getting this error in the logs PHP Warning: chmod(): Operation not permitted in /home/webserver/html/wp-admin/includes/class-wp-filesystem-...
0 votes
0 answers
5 views

Redirection after Category Change for Custom Structure

My website's current permalink structure is: /%category%/%postname%/ I moved an article recently from Primary_Category_A to Primary_Cateogry_B. However, Wordpress isn't redirecting the old slug with ...
1 vote
1 answer
619 views

querying data via $wpdb and get_row

I am using the Contact Form 7 Plugin to keep data of a form and I would like to query a table to show the results in a template. So this is what my query is: global $wpdb; $query = "SELECT count(*) ...
0 votes
1 answer
1k views

Upload buddy press profile picture from custom page template

I want to make a page template from where the user can upload the custom profile picture for their buddypress profile.
0 votes
1 answer
3k views

All links redirecting to homepage

All the link on my website redirects to homepage with this text after the domain name /?redirect_to=https%3A%2F%2F%20%2F%20%2F So is /cart /checkout Domain name is nikah.io I have tried changing ...
1 vote
1 answer
2k views

Custom permalink structure: /%custom-taxonomy%/%post-name%/ (without CPT slug)

I'm trying to create a custom permalink structure that will allow me to accomplish the following. I have a custom post type called "products" I have a custom taxonomy called "catalogs" that is ...
0 votes
1 answer
2k views

WP Ajax Function Always Returning undefined

What is the deal here? JS FUNCTION 'custom.js' function validate() { var email = jQuery("#billingemail").val(); if (isValidEmailAddress(email)) { jQuery.ajax({ ...
0 votes
2 answers
841 views

WordPress not showing the latest articles in RSS feed

I use the FD feedburner plugin to redirect all feeds of my self hosted WP site to Feedburner. That has worked fine until December 2013. Since then the redirection doesn't work anymore. The feed ...
0 votes
1 answer
11 views

Customize the new comment notifications sent to the post author after the comment is approved

I use the code below to customize the email notifications of new comments sent to the post author. This works fine for unmoderated comments, but not for moderated ones. In general, all comments are ...
0 votes
0 answers
6 views

How can I chanage the user for the composer container in wp-env?

I run composer using wp-env: wp-env run composer install and it performs the action as the root user. Can I create a user as in dockerfiles, and run the composer by that user?
0 votes
2 answers
722 views

Elementor Custom Query to get Posts by ACF (Post Object Field

I have two custom post type Author and Book. The book cpt have an ACF Object Field (authors_object_field) that is related to authors. On the author single page i want to display all books that have ...
1 vote
1 answer
1k views

How to set up redirects for category paginated pages after adding /category/ to permalink

We have a site using WPML and the category archives like /categoryname/page/2 weren't working in the secondary language. I added /category/ to the permalink and now the pagination works, but I need ...
0 votes
0 answers
6 views

Post Timing Out Updating ACF Image Gallery

I have a page with multiple ACF Gallery fields in a Repeater field. All of the Gallery fields have images with no problem. My user is adding a new repeater row and then adding hundreds of images to ...
0 votes
0 answers
16 views

Code in the excerpt of the search page

I am having problems with the search page. In this page I get the title and the excerpt of each page/article in the complete web. In the last page that the search engine places the following appears ...
1 vote
1 answer
2k views

Make slug as ID Number for custom post types

I want to make the slug for each of my custom post types to be the post ID number. How do I do this? None of my posts accept post title, content, or anything else - they require different data which ...
0 votes
1 answer
646 views

Filter media library by custom postmeta

I am using ACF plugin. I created a select field custom_select on ACF that is included to every attachment. ACF writes these values in the postmeta table. I now want to filter my attachments in my ...
0 votes
0 answers
14 views

PHP - Having $_SESSION as an array and adding $_SESSION to array

Originally, I wanted to have a $_SESSION that is linked to a button that when clicked, adds +1 to the $_SESSION. I was able to that, but could not find a way to display all of the clicks. It would ...
0 votes
2 answers
1k views

Wordpress white screen

I have big problem with white screen in WordPress. I would like to migrate site from live to localhost, I don't have credentials for hosting, and I've migrated site using All In One Import Plugin. ...
0 votes
0 answers
7 views

Where would I attempt to update a user status while importing custom data to a custom table

I have a custom csv importer that's working well. Code below <?php global $wpdb; // Table name $tablename = $wpdb->prefix."datafeed"; // Import CSV if(isset($_POST['butimport'])){ ...
10 votes
1 answer
845 views

Custom Taxonomy Endpoint Pagination using paginate_links()

The Setup I have 2 taxonomies and 1 post type: Post Type: products Hierarchical Taxonomy: product_cat Nonhierarchical Taxonomy: product_type The product-category has a defined endpoint: ...
0 votes
1 answer
27 views

How do I exclude the current post from the upcoming post query

Summary: I have a page template with 3 queries. Current Exhibition Upcoming Exhibition Past Exhibition The dates are custom fields. The problem I'm having is, how do I dynamically exclude the ...
0 votes
1 answer
722 views

Permalink Rewrite to include Custom Taxonomy Term

I've created a custom taxonomy for posts using register_taxonomy( 'discipline', array('post'), /* if you change the name of register_post_type( 'custom_type', then you have to change this */...
4 votes
1 answer
23k views

How execute shortcode with javascript

Suppose to have this shortcode: [spu-close class="" text="" align=""] I want to show this short code when I click on a button this is my html: <input class="button b" onclick="openFile(link);" ...
0 votes
0 answers
24 views

How to get dimension of Logo and Crest

I want know width and height from (images) Logo and Crest, current I use standard PHP function getimagesize in my theme /** * Get dimensions for image */ if (!function_exists('get_image_dimensions'...
4 votes
5 answers
5k views

Is there a way to disable the sticky posts feature?

I want to turn this off as I have a custom ordering process using custom fields.

15 30 50 per page
1
2 3 4 5
2287