Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
593 views

How can i list random author?

Im listing current category of all author list but I want to list random author list from current category. I was try 'order' => 'RAND', RAND code its not worked. My Code: function ...
Genxer's user avatar
  • 195
0 votes
1 answer
527 views

Adding a Tag Parameter / Filter to My Shortcode

I have this plugin that displays category featured image thumbnails for each post via shortcodes.. like so, [categorythumbnaillist 3] (3 being the category of course) I would like it to only show ...
I am not a Frog's user avatar
0 votes
1 answer
3k views

More gentle way to hook Wordpress custom url

I have written a plugin named foo, and I want when user typed url /hello and it will display the string world There is an existing post which uses the following code if ($_SERVER["REQUEST_URI"] == '/...
Howard's user avatar
  • 113
0 votes
1 answer
2k views

Call javascript functions from each page

Is there a plugin that supports calling custom functions that you've created? Like, page A -- I want to call function x $(document).ready(function(){ call_function_x() }); page B -- I want to ...
Philip's user avatar
  • 207
0 votes
1 answer
1k views

Add_image_size not generating correct size

I have 2 additional image sizes i've added to my theme and the for some reason when I use the Force Regenerate Thumbnails plugin, my images are created but the files sizes are not exact. Here is the ...
HjalmarCarlson's user avatar
0 votes
1 answer
732 views

How to add custom function to pluggable.php

I am working on a WP plugin and I want to add a custom function to pluggable.php (located in /wp-includes). I am calling that function from admin.php (located in /wp-admin) eg. Consider the function ...
Alex's user avatar
  • 25
0 votes
1 answer
170 views

Adding a pagenavi to function for displaying bookmarks

I have a plugin user bookmarks - see here - and I'm trying to add a to it so the bookmark posts don't pile up like crazy. How can I do it? This is the function that displays the bookmarked posts. ...
jimilesku's user avatar
  • 263
0 votes
1 answer
130 views

grab or load text on demand

What i want to do I want some content (could be stored any where in a post or custom field) to load only when the user clicks for it to load. This content could be any thing (text,images,html etc) ...
phantom.omaga's user avatar
0 votes
1 answer
573 views

Can you echo PHP code from a variable?

Ok this is a stupid question, and I'm not sure I even asked it right, but this is what I'm trying to do. My wordpress theme supports ad placements and I want to use a advertising manager plugin. I ...
Mike's user avatar
  • 13
0 votes
1 answer
83 views

Removing the custom_image_header from wp_head

I am looking to remove the custom_image_header from the wp_head. I would like to use this in a more manual way throughout my theme. I understand the general approach for this is to include CSS in the ...
jnolte's user avatar
  • 223
0 votes
1 answer
167 views

How do I create pages within a Wordpress post?

I run a music blog and I want to do a countdown of our top 50 tracks of 2011 so far. There's no way that I want to add 50+ images and Audio Players into just one post, and I don't want to break the ...
Mark Spivey's user avatar
0 votes
3 answers
910 views

sliding/fading header plugin or approach suggestion

i need advice in implementing rotating header (has fade or slide effect) in my theme. I'm building a theme based on Thematic and I'm looking for a good approach on how to implement the header. I have ...
Pennf0lio's user avatar
  • 167
0 votes
1 answer
57 views

What is the most efficient way of adding additional functionaliy for admin only

I'm trying to figure out the best approach to add additional functionality that will only be utilized by admins via /wp-admin. What's the best way to implement so that resources aren't being wasted. ...
Matt's user avatar
  • 3
0 votes
1 answer
156 views

Defining the value of a variable before a function?

I'm trying to edit a plugin so that it only shows it's submenu if the user is an administrator but I don't know how to define the value of the variable before the function: function load_view( $name, ...
fxfuture's user avatar
  • 1,337
0 votes
1 answer
24 views

How to access a function declared in child theme's functions file in a plugin file?

I have a function declared in my child theme's functions.php file as seen below: function test_fn(){ error_log("Test fn"); } When I am calling this function in a plugin file, I am getting ...
dc09's user avatar
  • 195
0 votes
0 answers
14 views

Remove posts that start with similar words (like a delete duplicate posts plugin)

Can anyone advise on a SQL query or plugin (or any other solution, as I haven't been able to find any) that can delete all posts that start with the same words, except the oldest of them? Or maybe to ...
Johnny Bravo's user avatar
0 votes
1 answer
41 views

Secure way to add JS Script to Wordpress filesystem

EDIT: Because of the answers below i changed the title and explanation for this question. Maybe there are other people who struggle with saftey questions, like me. I am a beginner with Wordpress ...
LovinQuaQua's user avatar
0 votes
0 answers
29 views

add to cart linking to add to cart page

I am making a website in Wordpress and created a custom shortcode for loading the products. That is working fine, however when clicking the add the cart button, if redirects me to the cart page, where ...
Brango's user avatar
  • 1
0 votes
1 answer
26 views

How to call a logging function from a generic utility plugin from another plguin

I want to add some logging to my plugin, and for various reason want to create my own wrapper function around error_log(). And for reusability, I'd like to stick my wrapper function in a separate ...
florismk's user avatar
0 votes
1 answer
27 views

CPU Overloading due to some hooks

I have some functions restricted in some hooks. The purpose of these hooks was to have consistent author name in the DB(which is a product attribute) and also update the display name. I placed this in ...
Varun Muchanapally's user avatar
0 votes
0 answers
208 views

How to disable hover zoom on woocommerce. None of the common methods work

I have tried these codes in child functions and style files. Nothing works. add_action( 'wp', 'divikingdom_disable_wc_zoom', 99 ); function divikingdom_disable_wc_zoom() { remove_theme_support( '...
Raj Arjit's user avatar
  • 103
0 votes
0 answers
56 views

Import posts from a different database with the same old id

I am trying to retrieve data from an old custom programming to a new WordPress site, but I encountered a problem that I cannot retrieve the old id number. I need that to keep the site's archive, the ...
Kami's user avatar
  • 1
0 votes
0 answers
57 views

Why nested REPLY not working in WP Comments?

<section class="postcomments"> <div class="comlist"> <h3><span>—</span>Comments<span class="comcount"><?php echo ...
WordCent's user avatar
  • 1,877
0 votes
1 answer
42 views

I want to allow certain file types on dokan upload files

Before we get started, I have tried alloweding "UPLOAD_UNFILTERED_FILES" thing on config.php and i have tried allow different mime type plugins, none of them worked I want to allow .rbxlx, ....
ItsBenny_'s user avatar
0 votes
0 answers
86 views

Shortcode cannot parse attributes within double quotes. " is becoming ” breaking my shortcode

I made a plugin that creates a shortcode to calculate the time since a particular date in the past. It has two attributes, a date string and units: function timesince_shortcode($atts) { $atts = ...
Sidewinder's user avatar
0 votes
0 answers
51 views

Run a function only once when logging into dashboard

I want the Pro version of my plugin to do a version check once when an Administrator logs into the dashboard. At the moment I am connecting to my API using wp_remote_get() in the main plugin file, but ...
Steve's user avatar
  • 297
0 votes
0 answers
58 views

Product customizing quiz - quiz adding products to the cart

Spend a lot of time on this and my client is getting angry but still no results… Is there any plugin (or solution to use) you know to instantly add product to cart after giving specific answer on a ...
dbamo's user avatar
  • 1
0 votes
0 answers
26 views

Wordpress Convert queries to slashes using function.php

Please check and explain why this wordpress rewrite rule isn't still working. function myplugin_rewrite_rule() { add_rewrite_rule( '^music/record-year/([^/]*)/?', 'music/?record_year=$matches[1]','...
John Ovye Godwin's user avatar
0 votes
0 answers
21 views

How to change all the urls of the WordPress site?

We have created an online store with WordPress on a domain and now that we have finished testing, we must take it to the final domain. I only need a method to change all the URLs of the site I have ...
Estudiante's user avatar
0 votes
0 answers
61 views

WordPress Custom Page Blog Template Pagination Problem (Pagination Not Displaying)

My website doesn't display pagination no matter what I do or try. Can you help me, please? Tried a lot of different codes and Plugins but no dice. Here is the code for test template: <?php /* ...
gfo95's user avatar
  • 25
0 votes
1 answer
187 views

Gravity Forms and Gravity View Permissions

I have a pretty direct question. I am trying to figure out how to programmatically prevent users from being able to view other users' form submissions. Currently, using Gravity View, any logged in ...
MrChoop's user avatar
0 votes
0 answers
13 views

Selected dropdown option is not getting saved in the DB [duplicate]

I am building a function within my plugin where I have the list of available pages being displayed. What I want is for whenever a user selects a page from the dropdown, it should save the slug of the ...
Rajin Sharwar's user avatar
0 votes
1 answer
91 views

PHP Creating a formula from mysql db values and db stored math operator

I am trying to use variables stored in a DB and math operator (e.g. * + - /) to allow users to build formulas e.g. (Night Shift Hours*Night Shift Time Rate)*0.2 The formula string is build from ...
GURU mcewan.marriott's user avatar
0 votes
1 answer
56 views

Create Wordpress category dynamically

I have more than 15 Category , And i have a custom taxonomy "classroom", Is there any way to Create those categories automatically when i activate plugin?
Hello world's user avatar
0 votes
1 answer
296 views

auto activate plugin when theme is active

i have a class to activate the plugins when i set my theme to active but the class auto activate all plugins , how i can modify to activate only the plugins that i choose. if ( ! class_exists( ...
Crash Point's user avatar
0 votes
0 answers
79 views

How can i call a functions.php function, from inside my plugin class?

I have a function get_finance() inside my functions.php file. It is used site wide and I don't want to move it. In my plugin, I can call all the other functions inside my class or other included ...
user221673's user avatar
0 votes
0 answers
25 views

Build a must-use plugin that tracks when other plugins are activated or deactivated

Here I am trying to utilize add_action to add a callback function to the hooked action of 'deactivate_plugin', but my function is not echoing as I expect. $plugin = 'polls_plugin';<br> function ...
Eben's user avatar
  • 1
0 votes
0 answers
318 views

Dynamic URL Rewrite for Custom

I have a custom post type called Hotels which I woud like to link to using the below url structure: /{country}/{state}/{hotel-name} I am fetching and inserting posts dynamically, so I do not know the ...
user2868900's user avatar
0 votes
0 answers
31 views

How to make WooCommerce payment method field optional?

Here is my current code on a plugin. /** * Field Validation. */ public function payment_process() { if ( 'woo_bkash' !== $_POST['payment_method'] ) { return; ...
mdraselkhan's user avatar
0 votes
1 answer
213 views

Checkbox show / hide output result

How can i fix a show / hide function in my plugin. The checkbox called "snup_check" at line 257 should be standard unchecked. If the checkbox is unchecked nothing should happens. If the ...
bjovaar's user avatar
  • 21
0 votes
1 answer
173 views

Custom Logo Link WordPress

I am trying to change the logo link of my wordpress website. But I am unable to achieve it. I am using child theme and using the code. function crunchify_custom_logo_url ( $crunchify_logo_html ) { ...
Arbab Ali's user avatar
0 votes
1 answer
73 views

Wordpress Custom Hook with Class method

The code described below works normally outside of wordpress, but in wordpress I get "warning expects parameter 1 to be valid callback function mycars ($ mycarsclass) not found". If I remove ...
deki0's user avatar
  • 1
0 votes
1 answer
113 views

How to get current cart values using WC_Shortcodes?

I am trying to get current cart items from my own plugin using WC_Shortcodes::cart(); this will return cart details in html format. WC()->cart->get_cart(); code not working. i need only cart ...
Haja's user avatar
  • 3
0 votes
0 answers
118 views

Error using wordpress functions inside a plugin class

Hy! In my plugin activation class i used wordpress functions (get_user_meta, update_user_meta) <?php /* Plugin Name: Integração Pagarme Dokan Description: Integrar os plugins pagarme para ...
carlos_alvarenga's user avatar
0 votes
1 answer
61 views

Attempting to list all product categories and the price range of all products within them

I'm trying to display a list of all product categories and the price range of the products within those categories. E.g Headwear – £30-£150 Shoes – £35-£300 Where "Headwear" is the Product ...
Joe Sturgess's user avatar
0 votes
1 answer
402 views

WP Function does not trigger on Webhook API Call

I have created a function that triggers and connect parent post with Child post based on a Custom Meta Field value. If Meta field value of an existing Parent post matches with the newly created child ...
Manish Bajpai's user avatar
0 votes
0 answers
194 views

Why do I need to reload the page for WordPress to see the new custom field added with jQuery

I added custom meta boxes and dynamically add an image loader button to it. The first image uploader works fine, it is generated by php. But, if I add a new row with an image loader button, then ...
VladSiy's user avatar
0 votes
0 answers
118 views

the_posts_pagination() not working if I add wp_head() to header.php

I have WordPress template my problem is with the_posts_pagination? its not showing in archive page I try to delete same functions to see what is the function to see. when is delete wp_head() function ...
Mohamed Slimane's user avatar
0 votes
0 answers
49 views

How to copy the all Wordpress media items to another custom plugin folder?

I created a custom plugin to compress/zip all media items in a folder for that I create a plugin and inside the plugin, I create a folder. Now on that folder, I want to add/copy my all WordPress ...
Avinay Quicktech's user avatar
0 votes
1 answer
650 views

Cookie value changes back to previous value after changing

I have this custom pligin that im using in order to save the user's language preferences. I store it as a cookie like so: <?php add_filter( 'init', 'aws_set_language_cookie', 999 ); ...
user206592's user avatar

1
5 6
7
8 9
11