The server-side programming language that the WordPress core, plugins and themes are written in.

learn more… | top users | synonyms (1)

0
votes
1answer
7 views

same user role or copy the user role to be same as the other role

how do you make the user role "contributor" to be same as the user role "seller" by using functions.php I've tried user role editor, but it seems to be the dokan multivendor plugin has set only into ...
0
votes
0answers
11 views

Wordpress checkbox slider

Using template Sparkling: https://colorlib.com/wp/themes/sparkling/ Here slider uses a category for displaying slides. Slider Code: function sparkling_featured_slider() { if ( is_front_page() ...
0
votes
0answers
12 views

Home page template changing on modification from random pages

I'm currently having a major problem using wordpress 3.8.1. Whenever I'm modifying a page, the template on the home page changes to whatever the template of the page I'm modifying is. Home page as its ...
0
votes
0answers
12 views

4 thumbnail images for post and display them when mouseover

I want to add like 4 thumbnail images in every video post and then to display them in the video list (in the main) and i want the images start to change when mouse-over. I thought about set a links ...
0
votes
0answers
14 views

Adding custom field to permalink structure

I have a wordpress site that uses a custom post type 'external-projects'. Within that custom post type there is a custom field 'director'. What I am trying to do is rewrite the permalinks to include ...
0
votes
2answers
26 views

Adding PHP in the menu

So, I have following php code: <?php global $my_profile; ?> <?php if (is_user_logged_in()) : ?> <div class="img" data-key="profile"><?php echo get_avatar( ...
0
votes
0answers
11 views

the_content interrupts sidebar

I am using a shortcode in a sidebar which is getting the excerpt, and a plugin which is using the_content filter to edit the content. The problem is that what ever changes I make through the_content ...
0
votes
1answer
25 views

Trying to make a simple wordpress plugin, having difficulties understanding how to make it?

I am currently trying to develop a simple wordpress plugin for a client, but am having issues with how complicated wordpress makes its APIs and plugins. The code so far: ...
0
votes
0answers
16 views

How pass GET request to file that does not belong to the theme folder

Must pass a GET request for a file.php via information that is not part of my wordpress theme.
0
votes
1answer
19 views

I created a custom form in HTML/CSS and now I need it to submit … should I create custom PHP or is there a plugin I can use?

I'm new to WordPress development and any advice would be appreciated! I have been a front-end developer for a while and have always handed off forms I created to a back end guy or gal for them to ...
0
votes
0answers
11 views

Query post by category using only one custom page template

Is it possible to query a post by category using only one custom page template? Basically I created a custom post called "Vehicle" and each post are assigned to a different a category. Instead of ...
0
votes
1answer
30 views

Theme Options Page - User Updates Logo

I'm a newbie to WordPress Development so bear with me. Site: https://wordpress-portfolio-zacnespral21.c9.io/ On the site above I would like to add an option in the themes options page for the user ...
0
votes
0answers
13 views

Grab text from other website and copy into wordpress Contact form

I am making a wordpress website with a contact form. Of course, the information typed in by the user must be sended to the owner of the website. This is pretty simple by just putting in the right ...
0
votes
1answer
23 views

How passing values ​​to construct function with Actions?

Must use a do_action (); to pass values ​​to my class. How do I do that?? add_action( 'plugins_loaded', array( 'someClassy', 'init' )); class someClassy { public static function init() { ...
-1
votes
1answer
17 views

Php inside the shortcode is getting commented

<?php echo do_shortcode('[learn_more caption="ancila"] <p> <?php echo get_post_meta($postid,principal_1,true)"; wp_reset_query(); ?> </p> ...
0
votes
1answer
22 views

WordPress the_content Page Load

I am creating a Quiz for WordPress in which it replaced the WordPress post content with a Quiz if you have enabled it. There are a total of 5 questions per post and to proceed further you need to ...
0
votes
0answers
8 views

Buddypress - how to display user role on profile page?

Hi: n00b with Buddypress, and not very experienced w/PHP hacks either. I have a staging site where the user is prompted to choose a role (Musician or Venue) during registration. This goes well, but ...
-1
votes
0answers
14 views

How Do I make site-description stay in the same position when making it to a smaller size? [on hold]

http://abraham-accountants.co.uk/ This is the website #logo .site-description { float: left; font-size: 2.5em; font-weight: bold; color: #004488; font-family: 'Bitter', Georgia, Arial, ...
0
votes
1answer
14 views

WP Admin Bar - Get current theme name as custom menu title

I wish to echo the current theme in text in my WP Admin Bar sub menu. How would I go about display a snippet of PHP inside the 'title' => 'php snippet here', ? ...
0
votes
0answers
31 views

Function is creating too many queries

I have code that displays a list of categories and orders them by the number of ACTIVE posts in the category. This is determined by comparing the custom field of due date against the current date. If ...
0
votes
0answers
7 views

wordpress list table, action, export phpexcell

so i've setup up a working list table to my table. i'm trying to add export as an option but i'm stuck at the start with phpexcel :( if('export' === $this->current_action()) { require_once ...
0
votes
2answers
19 views

Get Current user email as a return string value

if(strpos($query, '%get_email%') !== false){ $query = str_replace('%get_email%', get_the_author_meta( 'user_email' ), $query); } Okay so am trying to make a MySQL query and in the ...
0
votes
0answers
13 views

How to Update GravityForms User Registration / User Meta in Edit Profile?

I am using the GravityForms User Registration, with a custom User Meta, umnum = mobile number. The theme I'm using has an edit-profile.php page. I placed the following HTML code into the file and ...
0
votes
2answers
16 views

Wordpress 4 invalid username special charachters issue

I have some danish users that uses special chars like æøå and they can't log in to my wordpress blog. I tried on a fresh install on 4.2.2 and on 4.1.5 and it did not work, for example Andrew ...
-1
votes
1answer
29 views

probleme adding Txt and Links in preg_match()

I'm newbie in PHP, i use this PHP code who work as a charm (@Brian Fegter) : add_action('template_redirect', 'foobar_explode_if_no_citation'); function foobar_explode_if_no_citation(){ #Get the ...
-1
votes
0answers
10 views

Woocommerce Refunds Functions?

I created a separate orderslist page for our employees so that they dont have to use the Orders tab in wp-admin as we have a lot of custom functionality. I am now trying to allow my employees to ...
0
votes
0answers
21 views

Whats your oponion? Laravel's new “Lumen” for WordPress plugin development? [on hold]

Would it make any sense to use Lumen for WordPress plugin development? I'm curious. The new lightweight "Lumen" framework, made by Laravel creator Taylor Otwell.
0
votes
0answers
22 views

Loop only displaying one post

After a WordPress update the following code started only displaying one post on the page. I thought something was deprecated so I updated the parts I was sure about. But I'm still getting pretty much ...
1
vote
1answer
14 views

How to Internationalize Wordpress - Extract strings with textdomains, per textdomain individually

I spent several hours searching, and have not found a solution, how to extract Strings dedicated by Textdomain from a PHP File (in a wordpress plugin): In my plugin and theme I use for example ...
0
votes
0answers
8 views

how to clear cache of checkout details for guest in woocommerce after certain time of inactiveness

In wooocommerce a guest shopping items (before loggin) and after that that person goes to checkout page. Now I've create checkout form in such a way that after selecting country from the dropdown it ...
0
votes
0answers
14 views

how to change shipping cost after changing the currency from “WooCommerce Currency Switcher” plugin

I'm developing a woocommerce wordpress shopping cart website, where I use "WooCommerce Currency Switcher" plugin for currency conversion. There are three currencies.. pound, dollar and euro in the ...
0
votes
0answers
14 views

validate phone on wordpress (woocommerce)

I'm trying to validate the next code of woocommerce to only accept 10 digits not more and not less. I already found a regex but not sure why I still can put more than 10 digits yet ...
0
votes
0answers
6 views

My customizer's setting doesn't set to the default and needed to click the control's “Default” button before it'll be set

Here's my sample customizer's setting and control: $wp_customize->add_setting( 'themename_img', array( 'type' => 'theme_mod', 'default' => ...
0
votes
0answers
15 views

Using Isotope in WordPress portfolio

I'm trying to create a custom post type portfolio and use Isotope for filtering according to categories but I'm not doing something right. I've loaded scripts in my header.php, created a custom post ...
0
votes
1answer
18 views

How to use TCPDF library in wordpress

I would like to use the library TCPDF to create pdf. Specifically, I want to create a pdf after clicking a button available in every custom post type called Property. This PDF has to have Property ...
0
votes
4answers
46 views

how to hide or disable some part in specify page

i want from my footer.php file some part like <div class="form">----------</div> this part will be visible all page but not show in home page and few other other. i think it is possible ...
0
votes
1answer
22 views

how could I load a different template part by page

I would like to use get_template_part(); to load a different template parts on different pages. so on the home page it loads get_template_part( 'content', 'home' ); and on the blog page it would load ...
0
votes
0answers
9 views

Auto Add Category to RSS Feed Posts

I pull in a RSS feed that creates posts using the Push Syndication plugin. Those posts come in without a category. I need them to come in with a category automatically. Is this possible using some ...
1
vote
0answers
21 views

How to Create a Subscribeable News Feed?

I am working on a subscribeable feed for my WP site, but I have little knowledge in PHP/storing items in a database. Here is what I need it to do: -You register for an account and you are taken to ...
0
votes
0answers
29 views

Add options to Wordpress backend

I hardcoded a page to use for a Wordpress-Site I'm managing but then my boss decided that said page needs to be editable from the backend for our customers. Long story short: How do I add editablity ...
2
votes
2answers
52 views

What is the most efficient way to search users by their display name?

Initially I thought I'd use get_users() but it turned out it doesn't support the display_name field. Then I've read about using WP_User_Query, but when I do it always exhausts the allowed memory size ...
0
votes
0answers
20 views

Filtering with woocommerce data attributes

I'm working on woocommerce based booking system. I want to filter product by availability. Now I have custom data attributes for dates. It's submitting in wp_postmeta table. My date returning array ...
0
votes
2answers
29 views

If else statement based on referral URL

I am trying to display content in a custom template based on referral URL. I put a link in my footer called http://domain.com/?ref=special and image2.gif shows still when I click it and go to the ...
-1
votes
0answers
35 views

PHP Warning: Invalid argument supplied for foreach() [closed]

I am trying to set up a theme locally but am getting the error "Warning: Invalid argument supplied for foreach()..". The custom field images/data that are supposed to be showing up are not & it's ...
0
votes
0answers
6 views

Save the outputted image into the Media Library, with a different filename and extension

For example, I have this "/image.php" file in my "/theme-directory": header ('Content-Type: image/png'); $im = @imagecreatetruecolor(120, 20) or die('Cannot Initialize new GD image stream'); ...
0
votes
0answers
18 views

How to get values from Gravity Forms fields? [closed]

I'm using gravity forms to allow users of my site to submit posts from the front-end. I have a URL field, where they enter a URL to an external webpage into the form along with a title field. In my ...
1
vote
1answer
57 views

How to store the_title() into a variable to reutrn the value, not just echo it

I have a loop, and need to pass one more argument through it. I need to get the current page's single post title, and then use that as the value. I tried going about it like this: $tagz = ...
0
votes
0answers
23 views

Create a simple mu-plugin that appends “?mobile” to all links

I have a wordpress website that is set to switch themes when "?mobile" is present in the url. I'm using it for a specific mobile design that will launch from a particular link. So, instead of ...
0
votes
1answer
13 views

Changing layout with wp_customise

So I'm trying to build a conditional statement to display different layouts depending on the option selected. Having a bit of trouble. $wp_customize->add_setting('layout', array( 'default' ...
0
votes
0answers
34 views

Querying latitude and longitude into google maps correctly

Im have custom fields for lat/lon and querying them into google maps. The query im using works if I know the exact number of lat/lon. $args = array( 'post_type' => 'events', ...