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

learn more… | top users | synonyms (1)

0
votes
0answers
2 views

restrict content in product category in woocommerce

how can I restrict the product category in woocommerce. Most of the restriction plugin were in page, but in product category, there is no page for that. If I just the woocommerce shortcode ...
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
2answers
477 views

Get unique post in parent category

I have a parent category and several child categories. I also have several posts that belong to the child categories. Each post can be belong to several categories. I want to know how to query the ...
0
votes
1answer
796 views

Link a lightbox thumbnail to a post instead of opening the lightbox

On my website portfolio I use a heavily modified version of the Swatch theme from Woo Themes. The theme makes the thumbnails for my portfolio pieces link to the lightbox. I want the thumbnails to ...
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
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() { ...
0
votes
1answer
215 views

Correct Syntax for uploading files to custom directory in Wordpress

I have current PHP code that works when attaching files on a form. The files have to go to a certain directory. I know that while attaching in Wordpress I need to use a different syntax. However, I've ...
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
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
3k views

How to order posts by modified date without using 'query_posts'?

I have an example basic wordpress theme template here for you. First, please take a quick look at it to get an idea. <?php get_header(); ?> <div id="primary"> <div ...
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
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
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
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 ...
1
vote
2answers
387 views

Date archives for custom post type

I have seen many questions/posts regarding this, but have yet to find a decent solution. Basically I am trying to do what wp_get_archives does, but for a custom post type (personally I am unsure why ...
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 ...
1
vote
2answers
348 views

Custom gallery in wp3.5

I used a tutorial I found for a slick little custom gallery in 3.4, but upon upgrade to 3.5 it no longer works. I'm trying to learn php still and can't seem to get this working again, as I either get ...
-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
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
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 ...
0
votes
2answers
490 views

Simple seo-friendly custom $_GET url rewrite with htaccess

I have this url: http://sitename.com/?game=runescape Is it possible to modify the htaccess file or rewrite the url via Wordpress to become like this: http://sitename.com/game/runescape
0
votes
1answer
417 views

foreach pagination

I am looking for help in how to paginate my foreach output. I've looked at other questions and answers and cannot find a solution that works for me or that I can figure out on my own. Right now my ...
-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', ? ...
1
vote
2answers
448 views

Wordpress most popular post own code, per week

The plugin Most popular posts doesnt support WPML and therefor I have tried creating my own. I have found this tutorial in creating your own code for showing the most popular posts on my site. ...
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
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
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
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
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 ...
1
vote
1answer
897 views

Fatal Error relating to sessions.php

here is the error code I have Warning: Unterminated comment starting line 2079 in /home/teamspor/public_html/wp-includes/user.php on line 2079 Warning: ...
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 ...
2
votes
2answers
7k views

How build a custom login/register form with error handling?

So, I'm working on a plugin in which I'm making a custom page containing a login form as well as one for user registration; I have the forms built and operational, below is my code. <!-- Begin ...
-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 ...
1
vote
1answer
563 views

Specified file failed upload test. wp_upload_handle

So I managed to write a peice of code that allows me to upload a zip file, im not even sure where it gets uploaded too, and I am doing it on my localhost with apache in control (www-data). the code is ...
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
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 ...
3
votes
2answers
1k views

Shortcode to insert <!--nextpage-->

Since wordpress does not have a menu icon (aka "user friendly) way to add the command to a post or page, I'm trying to create a shortcode to do it. However, as logic would have it, its not that ...
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 ...
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
1answer
548 views

Issue displaying multiple TinyMCE editors with WPAlchemy

I have a custom post type with a WPAlchemy admin meta box class including multiple textareas with TinyMCE editors(for adding content to the custom post template). I've gotten the editors to display ...
0
votes
1answer
1k views

How to access global variable $menu inside a class function

am puzzling why can't i access the global variable $menu inside a php class function class adminMenus { public function getWPdefaultmenus(){ global $menu; return $menu; } } using ...
0
votes
1answer
443 views

Sort posts by custom fields value using dropdown menu

I'm trying to sort my posts by a custom field value, called price. Only using numbers in the custom field value. I want that the visitors of the website can sort the posts on price by using a ...