All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

Now can't access Wordpress

I got a little excited near launch and installed Sucuri and sorted out a number of generic security tags (taken screenshots) and then adjusted the directory privacy of wp-admin etc etc so people can't ...
0
votes
0answers
15 views

create custom page builder

I want to create a custom and simple page builder as an exercise to improve my wordpress coding skills. I want to integrate bootstrap 4 inside it, and as tutorial I was reading this article. It's very ...
1
vote
0answers
10 views

How to add a custom REST field to limit data when fetching?

Images don't show by default in REST API so I have added a featured image url manually and this works ok https://i.imgur.com/l5R7XKl.png add_action('rest_api_init', 'register_rest_images' ); function ...
0
votes
1answer
20 views

Why isn't comment validation working?

I am trying to add Jquery validation to the comments page in WordPress. Everything works except it won't post the fields. May someone help? Comments page: <?php foreach (get_comments() as $...
1
vote
1answer
32 views

How to show post views on single.php page?

how to show post views on single.php? What I tried: function getPostViews($postID){ $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ ...
0
votes
0answers
24 views

Mindblowing scenario with functions and scopes

Background: Yesterday I updated a plugin called WP Security Audit Log to their latest version 4.0.0 (from 3.5.2.1). After the upgrade, the site was completely blown up. After some research I found ...
0
votes
0answers
19 views

When developing WordPress plugin, is it a good idea to create my class object by hooking to existing class constructor?

I want to create my object when another object is made. Is it a good idea to create my object by hooking to existing class constructor? for example if the main class is class WordPress_Class { /** ...
0
votes
1answer
21 views

What is the best way to host a site with many images without it being too slow?

I have a friend that wants me to help them with their WordPress website that has about 150 images for their gallery. Their site is quite slow even after I optimized the images using the ImageOptim app....
0
votes
1answer
11 views

Create Post Types from a XML url (Real Estate website)

I have a URL provided by my Real Estate service that lists, in a XML file, every apartment and house that I have to sell. The XML url lists every detail of every apartment, things like images, year ...
0
votes
1answer
16 views

How to customize the title from comments form?

I want to change the string on comments that is: n thoughts on post title is here I want to change that string from functions.php Please check the screenshot
0
votes
0answers
8 views

Connect XML-RPC, REST or other endpoint to some BI tool or dump raw blog data

I am trying feed data generated by my Wordpress.org blog network into: Microsoft Power BI Desktop or other business intelligence or reporting tool or to at least be able to actually see some data ...
0
votes
1answer
19 views

How to declare a variable at the bottom of the page and use its value at the top?

It maybe easy to do but I am new to php. I really need to know how to solve it. $first = $second; $second = 4; I need to pass the value of $second to $first dynamically whenever it changes. please ...
1
vote
0answers
13 views

Custom dynamic Gutenberg block not rendering

I am creating a dynamic Block to display a widget area inside post. I coded the following in ES5. The block was registered successfully, but it has failed to render the I want. I have looked up a ...
0
votes
1answer
17 views

add custom metabox to media library custom widget

I'm implementing a custom widget to create a logos slider. The initial code works well, but when I have added a metabox to the attachment screen to let the user add an external link to the images, I ...
1
vote
1answer
16 views

Avoid loading css from parent theme

In a parent theme (Foodica Pro) functions.php I have function foodica_scripts(), where css and js are loaded in page header, including: wp_enqueue_style( 'media-queries', get_template_directory_uri() ...
0
votes
0answers
18 views

How to pass the values of an array to another from bottom of the page to the top?

I know this is very simple and easy, but I am new to wordpress, php, and js. $classes = array(); array_push($classes, $match); foreach($classes as $names => $text ) { preg_match('/<strong ...
0
votes
2answers
26 views

using filter and hook inside class

I'm going deep with oop to create wordpress plugins. I've found an interesting article about the hooks and how to use them inside a class. After reading I have some doubt: is correct to use the hooks ...
2
votes
1answer
34 views

What version of Gutenberg is included with WordPress?

Gutenberg is developed separately https://github.com/WordPress/gutenberg and the latest version currently is 7.2.0. How to find out which version of Gutenberg is included in my WordPress installation?...
1
vote
3answers
25 views

How to use a variable as a className inside preg_match_all parameters?

I am using regular expression to get the text inside a single p tag targeting its class. the problem is I want to use a php variable as class name and use a loop to change the class name each time. $...
0
votes
1answer
22 views

WordPress inserting ?q= in URLs

When I try to switch from editing a page or post to the actual post, WordPress inserts "?q=" after the root URL (and changes slashes to "%2F"). I've not seen this before, and Google is not pulling up ...
0
votes
1answer
18 views

Use WP_query to match post types based on custom field values

i'm trying to query posts from the post type Product that match with the current post in the loop from the post type Item, based on the custom fields product-ean and item-ean. For example: i have a ...
0
votes
1answer
17 views

wordpress-theme 2017: featured image behaviour: where to set the height of the featured image?

good day dear community, after having nailed down several issues with the set up of the theme twentyseventeen - the question today is: wordpress-theme 2017: featured image behaviour: where to set the ...
0
votes
0answers
18 views

Site logo option missing from Customizer

I've recently updated my theme to Divi and my site logo has gone missing. Now I don't seem to have the option to upload it any more. When I go to Appearance > Customise > General Settings > Site ...
0
votes
2answers
17 views

Static Page, need Last and Next links at the bottom

I am new here, I do not have a ton of experience with PHP but if I have a correct block I can work the different functions. I have a static page, currently, I have it set to display 5 snippets of ...
1
vote
2answers
36 views

Gutenberg Additional CSS Class without modifying theme?

The "Advanced" option to add Additional CSS Classes to a Gutenberg block looks useful. But is there any way to define a CSS class for use on that post option other than to go and add a theme-wide ...
0
votes
1answer
20 views

Wordpress nav_menu items from another menu appearing

In my website i'm using two separate nav_menus, one to the legal pages and other for the main navbar... For some reason some items of the main menu are appearing in the secondary menu, even though in ...
0
votes
0answers
19 views

How to use Azure AD for authentication?

What is the best method to authenticate users against Azure AD when trying to access WP? Doing some search I have come across sites like: https://wordpress.org/plugins/sso-with-azure-ad/ . https://...
0
votes
2answers
14 views

How to add locations input to user profile?

I want to display user's locations which they travelled on author box so how can I add this kind of input area to users profile? To more explain, If a user add "Londra,Paris" to own profile, these ...
0
votes
1answer
12 views

Parent page shows no child content

I just installed a fresh copy of Wordpress and tried to create one parent page, but the page shows no content, regardless of which Official WP theme I use or if I use this new parent page as the ...
0
votes
1answer
28 views

Blocking wp-login in HTACCESS has also blocked password protected pages

We recently blocked all IP addresses except mine and the company owner's from getting to /wp-login.php except today we discovered this has inadvertently blocked any other password protected page. By ...
0
votes
0answers
20 views

$.ajax results in 403 forbidden

I am trying to fetch debug information from a piece of javascript, to make it easier to copy the debug information code (if find my self often doing this). However, when I send a request to a page, ...
0
votes
0answers
10 views

Nestling Posts Under Page & Justify Text

I've recently come returned to blogging. I'm currently using Wordpress and I have a few personal initiatives. For the life of me I can't figure out how to have some posts go in one of the initiatives, ...
0
votes
1answer
32 views

Accessing private posts through REST API, same code that works in remote doesn't in local

I am capable of fetching private posts through the wp rest api by calling mydomain/wp-json/wp/v2/posts?status=private&slug=whatever I am authenticating well and receiving a valid token, no ...
0
votes
1answer
28 views

How to redirect my custom template page to content-none.php if no posts found?

I am trying to redirect from my custom template file to template-parts/content-none.php if my template has no posts in it. I want to add an if condition after while loop checks for posts. Here is my ...
0
votes
0answers
33 views

Stuck with WooCommerece Payment Method Plugin (custom coded)

I am development a plugin for custom payment method for WOoCommerce, where in "public function result()" function I want to access/get product id which is bought. Below is my code so far but it is ...
0
votes
1answer
50 views

Using a template file for a specific custom URL

I was trying to use a custom URL to load a page template for single-events.php without rewriting the default URL format. I am using filter template_include to load the template like this: add_filter('...
0
votes
0answers
21 views

How to set up dynamic purchase pixel in Woocommerce?

my website has products with different prices so I need to configure the facebook pixel to track the total of the purchase. I don't know how to make the code works in my functions.php. I used the code ...
0
votes
3answers
47 views

WordPress localhost site always redirect to live site [closed]

I know that there is already a similar question like this. But I have already done all these suggested solution and nothing works for me. If there are caching plugins installed like W3 total cache. ...
0
votes
0answers
15 views

How to remove year page from wordpress

I have tried to add page with permalink 2020 but unfortunately it is taken by some build in wordpress year archive page. How can I reclaim such permalink? : http://localhost/wp/2020/ I have used ...
0
votes
1answer
23 views

Is it possible to use words as starting and ending points of excerpt parameters?

I want to find a way for excerpt function to display exactly what i want inside a single post. the excerpt itself has starting and ending point as parameters to go and fetch the data. but what if i ...
0
votes
0answers
13 views

Load Taxonomy terms based on Post Type selection

I am creating a widget.I want to get Taxonomy Terms with the selection of Post Type in dropdown list. When a Post Type is selected from dropdown list, the related Terms/categories of that Post type ...
0
votes
0answers
23 views

How to show total comments count of the current logged in user?

I'm creating a custom user status page for my members. I need to show the comments count of the wp_get_current_user(). I looked at WP_Comment_Query but unable to understand anything. My conditions ...
0
votes
0answers
16 views

error: n.imagesLoaded is not a function

I have converted a template to wordpress format. and added styles and scripts in functions.php. but i keep getting error snow.min.js:11 Uncaught TypeError: n.imagesLoaded is not a function at ...
0
votes
1answer
13 views

There is no “Language Switching Buttons” on Adding New Post

I installed the plugin qTranslate‑XT. There exists "Language Switching Buttons" on Categories, Tags and etc, as shown below: However, on "Adding New Post", there is no "Language Switching Buttons",...
0
votes
1answer
11 views

Get original value in save_post action hooka

I'd like to get the original value of the $post on the save_post action. This way I can detect changes, and only do specific actions if the post content/title was changed. Is this possible?
-1
votes
0answers
11 views

How to Receive and Process Paypal IPN on a WordPress Page

I have created a WordPress Page template(listener.php) and then created a WP page using that template.The Page url is like: mysite.com/thank-you. Here is the code i have place in the template(listener....
0
votes
1answer
20 views

Unit Testing action hook

I want to perform unit tests on a Class, my goal is: I want to check if the plugin is activated or not by using the function: is_plugin_active class WC_Custom_Variable_Products_Dependencies { ...
0
votes
1answer
44 views

disable (read only) a field if within a custom post type name

I have two bidirectional fields 'album_band' in two different custom post types 'album' and 'band'. This field allow multiple selection and is mandatory in 'album' I've been trying to disable or set ...
-1
votes
0answers
30 views

WordPress.com REST endpoint for /wp-json/wp/v2

The REST endpoint /wp-json/wp/v2 is available for self-hosted WP blogs. Where do I find this endpoint for blogs that run on WordPress.com? I tried https://public-api.wordpress.com/wp/v2/sites/example....
-1
votes
0answers
17 views

Hierarchical Menu for Catalog Site

I'm new to Wordpress and want to make a catalog site with a menu system like HomeDepot.com, Target.com, Walmart.com, etc. but without the option to purchase items. I have created a Custom Post Type ...

15 30 50 per page