481 questions
8
votes
2
answers
30k
views
Warning: strpos(): Empty needle in ......wordpress Plugin [closed]
I get this error :
Warning: strpos(): Empty needle in ......popularity-contest.php on
line 2574
function akpc_is_searcher() {
global $akpc;
$referrer = parse_url($_SERVER['...
5
votes
1
answer
6k
views
WooCommerce pages showing as blank
The cart, my-account and checkout pages are all blank when I try view them. All I get is the header and footer. All I have done so far is download WooCommerce, go through the settings and add theme ...
3
votes
1
answer
1k
views
How to hide products from the products shortcode 'woocommerce_shortcode_products_query' using product ids
I am using the woocommerce products shortcode to show some related products on a product page.
The product shortcode is as follows:
do_shortcode('[products limit="6" columns="6"]');...
3
votes
2
answers
302
views
WordPress Plugin to create a React Public page on activation
I'm building a WordPress plugin that creates an admin menu and stores the value in the WordPress backend and then shows this stored value on a Public page. But the code is not creating a Public page ...
2
votes
2
answers
3k
views
Shortcode always showing at the top of the wordpress (before post)
I'm new to WP plugin development and found out that my shortcode is showing at the top of the page, but I want to include it anywhere in the post (not at the TOP).
My code:
function getLotoSecond() {
...
2
votes
1
answer
309
views
WooCommerce shortcode to ajaxify message that display: "You need to spend to get free shipping"
I modified this script to make a shortcode that shows how much the customer need to spend to get free shipping.
/**
* @author Rodolfo Melogli
* @compatible WooCommerce 3.9
* @donate $9 ...
2
votes
2
answers
415
views
How to get field value in Wordpress shortcode?
I try to get field value in shortcode. But it is not work.
How can I do it?
"audio_url" is field meta name.
<?php
$audio_source = get_post_meta($post->ID, 'audio_url',true);
echo ...
2
votes
3
answers
11k
views
Database Error "One or more database tables are unavailable" on Wordpress site
Error: One or more database tables are unavailable. The database may need to be repaired.
How can i solve this problem?
wp-config.php is correct.
2
votes
1
answer
634
views
Shortcode issue
I am currently creating a shortcode in order to display custom taxonomy terms as a list in my template :
// First we create a function
function list_terms_forme_juridique_taxonomy( $atts ) {
// ...
2
votes
3
answers
831
views
Wordpress Shortcode for keywords?
So, I know you can put:
function page_title_sc( ){
return get_the_title();
}
add_shortcode( 'page_title', 'page_title_sc' );
Into function.php to fetch the page title and get a [page_title] ...
2
votes
0
answers
374
views
how to add image using custom field in wordpress plugin?
I am looking for how to add images in a custom database table using WordPress code
I am new in WordPress plugin development. I've created code for a plugin named store plugin. I've taken fields like ...
2
votes
0
answers
73
views
$wpdb SELECT query errors
I have created a table on a wordpress database, This database table should have 2 columns.
One for postcode and one for a URL
If the postcode is found in the database, redirect to the corresponding ...
2
votes
1
answer
296
views
Gutenberg having conflict with my plugin short code and seems to be displaying on editor page
I have made my first plugin and it all works on the front end but I am having some weird backend conflict with the gutenberg. I have done two things, made my plugin automatically add the pages / ...
2
votes
1
answer
1k
views
How to have the same shortcode multiple times on a page with different attribute values
So I basically need to have the same shortcode multiple times on the same page with different attribute values.
So on my page, I have the following shortcode:
[sponsors type="Platinum"]
[sponsors ...
1
vote
3
answers
2k
views
How to add two javascript files in a shortcode in WordPress?
I am creating a shortcode in the functions.php WordPress, So that I can add my javaScript file in shortcode to call it on my website page.
1
vote
2
answers
1k
views
Woocommerce - how to display only on-hold orders using a shortcode
By default Woocommerce orders table displays all available order status on the My Account page which is not sortable by customer, therefore I need to have a separate table for every unique order ...
1
vote
1
answer
3k
views
strpos(): Empty needle WordPress Plugin
I've just finished building my first plugin and have tested it with various plugins on my personal site with no errors. However some users are saying the plugin is causing the following errors for ...
1
vote
1
answer
106
views
Problem in displaying the WordPress shortcode function randomly
I have a shortcode function similar to the following code:
function my_shortcode() {
$arr = array(
'1' => '<a href="https://google.com"> <img src="img_1.jpg&...
1
vote
2
answers
922
views
Wordpress - How to get device type and last login location with php
I wrote this function that allows the user to view the date of the last login (not the current login). Now I would also like to show the location and device with which the login was made. I tried to ...
1
vote
1
answer
645
views
How can I call a shortcode in a shortcode?
I wanted to call the following shortcode in the wordpress page editor:
[pdfjs-viewer url=/wp-content/uploads/pdfs/[wpcf7_session_id]/vertrag.pdf viewer_width=100% viewer_height=1500px fullscreen=true ...
1
vote
3
answers
3k
views
There has been a critical error on this website for xampp localhost
I was trying to build a website on WordPress using xampp localhost, but I got the message saying that there has been a critical error on this website. I didn't even open the website.
can anyone help ...
1
vote
1
answer
390
views
Shortcode Appearing at top of content
I am currently trying to add a shortcode to my Wordpress site but at the moment it is showing at the top of the page instead of the position I placed it at.
Everything is working well apart from this ...
1
vote
2
answers
180
views
When Tweeting my Wordpress post, how to get shortcode output to appear instead of shortcode text?
I use shortcodes on my WordPress site to help display reference information from my articles from a BibTeX file. For example, the article information at the top of my post is generated this way, using ...
1
vote
1
answer
2k
views
Redirect to a specific page when WooCommerce product search returns "no product found"
In Woocommerce I am trying to use the following code snippet to redirect to a specific page of my site instead of showing "no result found" on an empty product search.
Now the shortcode [insert page ...
1
vote
1
answer
2k
views
Wordpress: use PHP script to insert shortcode into div with class
I have this PHP-script that ads a shortcode at the top of my wooCommerce shop-page.
add_action( 'woocommerce_archive_description',
'woocommerce_archive_description', 15 );
function ...