Skip to main content

All Questions

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

wordpress custom login successful redirect hook

I am using a custom login form imported on my theme's home page through jqModal. In that, when i successfully login it redirects to the same page. I want to redirect based on the logged in user role. ...
Assad Nazar's user avatar
1 vote
2 answers
605 views

Scope for PHP Variables Assigned in functions.php or a plugin

I'm a web developer who works on WordPress sites and want to ensure I keep PHP variables out of the global scope. I have questions about this: If I created a $new_title = "test seo title"; ...
risingPhoenix1979's user avatar
1 vote
1 answer
1k views

Override the filter from plugin in child theme

I have a filter below from plugin file: $review_num_fetch = apply_filters('tourmaster_review_num_fetch', 5); I want change the number from 5 to 3, I’ve tried change it like below: // reviews number ...
Loc_rabbirt's user avatar
1 vote
1 answer
139 views

The Point of Using apply_filters()

While i'm Trying To Develop a plugin, i tried to See some other plugin do the same stuff my plugin will achieve, then i saw The developer in the most functions work with the function apply_filters() ...
Simo Patrek's user avatar
1 vote
2 answers
1k views

How to get post URL in the_content filter?

In WordPress, I use a function in functions.php to only not show certain posts(by category) if a user is not signed in: function my_filter( $content ) { $categories = array( 'news', ...
user8292439's user avatar
1 vote
1 answer
253 views

Add a plugin before main container

If I have a plugin that prints (simply) "Hello World", and I want it be outside of the main container, so, like this: <h1>Hello world!</h1> <div id="content"> . . . </...
Naor Hadar's user avatar
1 vote
1 answer
5k views

WP Job Manager Category Drop-down; Change Placeholder Text Via Filter

I have been googling for hours with no really helpful outcome, I have a site that uses WP Job Manager. One of the search fields that comes with this plugin is a category drop-down list. I would like ...
Craig Watson's user avatar
1 vote
2 answers
11k views

How to get subscription key or id using Woocommerce Subscriptions [closed]

I need to get the subscription key of a particular subscription to pass into a custom function. I have referenced the documentation where it shows how to get the key, but I have failed to integrate ...
nerdalert's user avatar
  • 131
1 vote
2 answers
2k views

How to get variables from fucntion.php to my plugin files

I have written a function in functions.php that gets variables from a contact form and sends the inputs (and some other info like IP and location..) to my email. I am starting to work on my first ...
Kar19's user avatar
  • 255
1 vote
1 answer
2k views

Get all categories of custom post even not assigned

I know how to get all categories with get_categories and name custom taxonomy name, but wordpress only shows those categories those are assigned to a post. Those which are created, but not assigned, ...
Shah's user avatar
  • 49
1 vote
1 answer
770 views

While Using Static Pages, How Can I Get /blog into the URL of Each Post?

I have Wordpress installed on the root of my website. It is using a static homepage and posts page. As it stands, each post will look like this example.com/blogpostname. I don't want to use category ...
Jack's user avatar
  • 139
1 vote
1 answer
373 views

Function to prevent users from trashing comments

Is there any way to prevent/hide trash button for comments? Note that I only want to prevent users from emptying the trash for comments. Can't seem to find a way. Is there any possible way to do that ...
M3o's user avatar
  • 445
1 vote
2 answers
751 views

Avoiding Duplicate function names in Post Loop (WP_Footer script)

Say I created a plugin that injects content (used as a shortcode) into a post. I'm trying to push that code for each post to the bottom of the page. This works fine, however when you are on an ...
Joe's user avatar
  • 283
1 vote
1 answer
2k views

Custom Taxonomy Tag Search

I have an existing WordPress search function, what I'd like to be able to do is extend the search to the tags from my custom taxonomy...how do I do that? <form method="get" id="searchform" action="...
Josh Rodgers's user avatar
  • 1,173
1 vote
1 answer
338 views

May i Use ShortCode in Template?

Am Using Wordpress Blog.Here i want Use Tweetmeme Plugin.I want to show the output of the Tweetmeme Plugin to Customizing place(Side of the Post[Not Before or After]).The Plugin Creators are providing ...
Ramkumar M's user avatar
1 vote
1 answer
2k views

Missing argument 3 for wp_register_sidebar_widget()

I installed the Deprecated Calls plugin and it's telling me to change register_sidebar_widget() and register_widget_control(), essentially add wp_ first. I did but I'm getting Missing argument 3 for ...
wpStudent's user avatar
  • 141
1 vote
1 answer
2k views

Plugin onclick button activate other plugin

I have some code that have a button in the backend page. I want to click on the button and have it activate a plugin that's already in the plugin's directory. Here's the code: <?php add_action('...
MarkBill3000's user avatar
1 vote
4 answers
1k views

Redeclare theme's function in a plugin

I'm trying to figure out how to redeclare a theme's function from within a plugin. The problem is that I'm getting a "Fatal error: Cannot redeclare" when trying to activate the plugin. But if I add ...
Nikita's user avatar
  • 419
1 vote
2 answers
40 views

How to add class in plugin only for network site?

I created an input field in general - settings. It's in a plugin for a for a local ngo network site. It looks like this, and it works great. $ngob_sitelist_slug = new ngob_sitelist_slug(); class ...
George Bredberg's user avatar
1 vote
2 answers
4k views

Pass info from functions.php to plugin

What is the best way to pass some information from functions.php to a plugin? I need to give a user the ability to pass a piece of data from their functions.php file to my plugin. (It can be any data,...
hommealone's user avatar
1 vote
1 answer
73 views

How does Wordpress process plugin installations?

Please consider that I am not a Wordpress plugin developer, but I am maintaining a lot of Wordpress websites. In case I have to perform a change to all of them, I will have to log in each site and ...
zilog's user avatar
  • 13
1 vote
1 answer
613 views

Removing user contact methods works from functions.php but not from a plugin

I'd like to remove user fields and I used this code: add_filter( 'user_contactmethods', 'newfields' ); function newfields( $user_contact ) { unset($user_contact['facebook']); unset($...
Erfo's user avatar
  • 99
1 vote
1 answer
141 views

I have functions in my wordpress plugin. How do I get them to work for me?

This code is edited but comes from this site. If I want to use a remote website to insert data using the last function from a URL link how do I do that? My code is: <?php /** * Plugin Name: ...
M1 Creative Developer's user avatar
1 vote
1 answer
567 views

Wordpress Plugin Page is Loading in Admin Content Container Instead of Separate Page

I am creating a wordpress plugin that has it's own UI. It looks like a standard web application, so everything that is done within the plugin is handled in this UI instead of integrating it with the ...
user1632018's user avatar
1 vote
1 answer
853 views

Woocommerce Attributes pulling in wrong data

My Problem is very strange - I don't fully understand all the aspects of woocommerce just yet and am still fiddling with things to understand it. I'm trying to pull in the size attributes for each ...
dannyw24's user avatar
  • 451
1 vote
2 answers
8k views

How to create TEMPORARY Download links in a wordpress POST?

I'm creating a WordPress blog with some members-only page. In those members-only posts I have my own tutorial download links which i have uploaded for FREE. Problem is I want them to stop sharing the ...
mCrazy eng's user avatar
1 vote
1 answer
473 views

Conditionally add apt. Open Graph meta data to different pages on WordPress site

The official Facebook plugin does an excellent job of adding appropriate Open Graph meta tags to different pages (Home, Posts, Pages, Archives, etc.) of a WordPress site. The problem is it does many ...
its_me's user avatar
  • 4,512
1 vote
2 answers
5k views

PHP Fatal error: Call to undefined function plugin_basename

I'm receiving this error: [27-Jun-2012 18:22:39 UTC] PHP Fatal error: Call to undefined function plugin_basename() in /XXXX/public_html/wp-content/plugins/price-update/price-update.php on line 68: ...
whatsthebigidea's user avatar
1 vote
1 answer
94 views

plugin development: problem with functions

I have this very basic scheme to build my first plugin, but now I have one problem: when I put a hook to add_action on point 1 works, but i need to get the color from shortcode function, so, when i ...
greenbandit's user avatar
1 vote
1 answer
3k views

add_query_arg not working

I added a filter to append a parameter onto the URL when navigating in categories. This is used to sort posts by their votes when browsing a category only if a sort parameter is set. For instance ...
wpStudent's user avatar
  • 141
1 vote
1 answer
96 views

How to get next day date of a specific day

I have created a shortcode in WordPress to show next day date of a specific day but it does not show the correct date when I am passing the parameter through the shortcode. Can anyone tell me what I ...
v morgesh's user avatar
1 vote
1 answer
104 views

Shortcode button dosent work for all posts. Work for first post only

I am creating a custom wordpress theme and i am little stuck in one situation, Actually i added a download link button and add some Java Script on it. The button on all posts showing and downloading ...
Jain's user avatar
  • 29
1 vote
1 answer
214 views

Is there a way I can find wordpress posts that don't contain a word?

Am trying to unpublish wordpress posts that don't contain a word., Its like the inverse of search, Search is finding a string in wordpress posts, I need to find wordpress posts,. I think this will be ...
hindisong.cc's user avatar
1 vote
1 answer
825 views

creating html reusable blocks via shortcodes

I'm using a really simple and fast theme in order to reach a good speed score, so i'm not using any visual composer, but writing my own sections in pages via html i have some sections and cta that i'...
Robert's user avatar
  • 111
1 vote
1 answer
3k views

Prevent shortcode from being wrapped in <p> tags

I'm using a latex plugin to display formulas on my wordpress site, and I would like to add shortcodes with formulas inside them, so the content of the shortcodes must be processed by the plugin before ...
sound wave's user avatar
1 vote
1 answer
797 views

AJAX button run function

I want after click button run function, . All is in one class. JQUERY jQuery('#text2').click(function() { var data = { 'action': 'myfunction', 'whatever': $button.data('text2'), ...
Jaron's user avatar
  • 45
1 vote
1 answer
493 views

Change wordpress current_time function to different timezone

I'm using plugin to set the earliest possible date for order delivery in woocommerce. Piece of code below: $current_time = current_time( 'timestamp' ); if( $prdd_minimum_delivery_time != '...
Łukasz Gręźlikowski's user avatar
1 vote
2 answers
4k views

Inserting HTML tag with ACF into shortcode

Let me start off by saying that I usually make alot of research before asking publicly for help - due to likelyhood of information already being on the web - altho I've done several days of reseach ...
Pr0metheus's user avatar
1 vote
1 answer
6k views

custom post type not showing in menu

I have created a simple plugin to manage my portfolio as a custom post type. everything is OK and works great, but there is no ability to add my custom post type to the menu(also for its taxonomies). ...
Ali Qorbani's user avatar
1 vote
2 answers
3k views

Executing my function once on a specific time

On our WordPress website we are using the Events Manager Pro plugin. This allows us to create events. However we need to somehow send a thank you E-mail to the attending people 1 day after the event ...
Rick Spanjers's user avatar
1 vote
1 answer
1k views

How to append to title via functions.php for auto-posting plugin [duplicate]

What I've got so far I've finally got the functions.php plugin to append a string to custom post titles of a certain post type with this function: function append_album_review_to_title( $title ) { ...
Andre Bulatov's user avatar
1 vote
1 answer
1k views

How to stop or remove an action being called inside a function of an extended class

The Problem I am trying to remove an JSON+LD block being added by a WordPress plugin called The Events Calendar. I believe it is being added by the function called: ...
Andre Bulatov's user avatar
1 vote
1 answer
48 views

Missing Argument

I have the following code in my functions.php to show a lightbox on the Simple Paypal Shopping Cart Plugin function make_wpspsc_thumbs_lightbox_previews( $thumbnail, $atts ) { // Code Credit: ...
Lowis's user avatar
  • 11
1 vote
2 answers
5k views

load_plugin_textdomain error

I receive this error while debug mode is enabled: Notice: load_plugin_textdomain was called with an argument that is deprecated since version 2.7 with no alternative available. in /home/xyz/...
Omid Toraby's user avatar
1 vote
1 answer
2k views

How to override a plugin function wrapped in a class?

The class is from someone else's WP plugin and I want to adapt one of the functions from that class (there are more functions). The (edited) original code: class some_class { private function ...
Yuri's user avatar
  • 1,131
1 vote
1 answer
1k views

Bootstrap Drop Down menu is not working

Bootstrap dropdown is working when i added the jquery( https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js ) in footer and by deregistering wodpress default jquery. When i disabling the ...
Aparna Mathew's user avatar
1 vote
2 answers
843 views

WP Query. Is there a maximum size?

I develop a plugin that searches for a duplicates of WooCommerce products in a very specific way. It works great in our test environment, but on the client's original setup it does not execute. It ...
Jan Rohweder's user avatar
1 vote
1 answer
1k views

How to Display a Plugin function (content) on frontpage using index.php

Slightly Advanced Noob Alert: {Sorry}. I'm designing a WordPress Site {No Active Yet}. I have a plugin [feelbox], but currently it displays only on the single post page. There is no option in the ...
user4644682's user avatar
1 vote
1 answer
214 views

wordpress plugin is not activating from widget

I am just creating a plugin in wordpress. In this plugin I am trying to create a widget, In that widget it will show a title, input text and text area in the widget section and when the values will be ...
user159377's user avatar
1 vote
2 answers
3k views

woocommerce: change default setting > is_sold_individualy function

In woocommerce/classes/abstracts/abstract-wc-product.php on line 338. The is_sold_individualy function is default "false". Is there a way to set this default option to "true"? So in de Wordpress back-...
user2028526's user avatar

1 2
3
4 5
11