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

learn more… | top users | synonyms (1)

1
vote
2answers
32 views

How do I Turn This Into An if statement?

PHP noob here. I've got this query I've written to get the information of all child pages of the page you're currently on: <?php $pages = ...
2
votes
1answer
83 views

Add CSS animation as Preloader to WordPress

I found a CSS animation snippet on Codepen, and would like to add it in my WordPress site for preloader animation, but I couldn't find any related help or plugin that would allow me to add a Preloader ...
0
votes
4answers
45 views

POSTS list in WordPress by views

I need a code that causes: <?php while ( have_posts() ) : the_post(); ?> List according to the amount of VIEW, is like to list popular posts only that it will enter the table mh_postmeta, and ...
0
votes
3answers
60 views

MySQL query in Wordpress with AJAX

I have a search form which searches the DB and returns back some data. I have managed to use Wordpress wpdb to connect and use select statement on the table and retrieve data. Everything works ...
0
votes
1answer
72 views

Using Wp_Query, Json to add Highcharts series data

I just added a custom Highchart to my wordpress single custom archive page. http://propertywise.malisa.agency/en/district/khlong-toei-2/ Using the following function call from within the Highcharts ...
1
vote
0answers
24 views

wordpress 4.4 self hosted video (html5) doesn't show

I was developing WP theme on my localhost (version 4.3). The client wanted to be able to add self-hosted videos. So I wrote shortcode and implemented it in Visual Composer. Basically, this shortcode ...
0
votes
0answers
26 views

problem with php script inserting categories in wordpress

I have a php script taking categories from softonic.com, and im trying to insert them into my blog, but I have a few problems. The first of all, is that the categories are not with any link into my ...
1
vote
0answers
25 views

Insert term and child term from frontend

I have this taxonomy: "free", and I want to insert new term (ex: Season) and then insert a child to this term (ex: episode) in the same form. Taxonomy "free" Add new term: ex: Season, and then add ex: ...
3
votes
1answer
42 views

Wordpress new user / forgot password emails are broken

I have no idea why it does this - I checked my mu-plugins, functions.php, there's currently nothing that alters emails. (Note that I translated these by heart, words might not be the same but links ...
1
vote
1answer
22 views

Adding custom directory and PHP files in wordpress

I'm new to WordPress and I'm using the latest version. I am trying to add this library https://github.com/pinceladasdaweb/tweetlight which is getting the latest tweets from Twitter. Tweets should be ...
1
vote
1answer
31 views

Placing raw HTML inside a WordPress shortcode

My shortcode: function fullwidthFunc($atts, $content = null) { $atts = shortcode_atts(array( "backcolor" => 'transparent', "backimgurl" => '', "color" => 'black', ...
1
vote
3answers
60 views

How to only show page id as body class?

Some call it light OCD, some might call it security risk. I just don't like how it throws it all in there, especially template names. How to only assign page id or even better - slug? Note that ...
0
votes
0answers
8 views

Displaying only post from certain category on index [duplicate]

Currently on my homepage, I have a portion which displays my post but it also has page navigation for all of the post now what I am trying to achieve is having the same layout nothing changing other ...
0
votes
0answers
12 views

Trouble figuring out slider for post containers

There is a section on the site I'm working on that loads 4 containers that are links to posts. I need to add functionality that allows you to scroll through more containers in the section by clicking ...
0
votes
0answers
17 views

can't see categories in appearance-menu-categories

I have a php script that takes categories from softonic.com. It is supposed to insert these categories inside an apps category. It does it with wordpress functions. After launch my script I can see ...
2
votes
1answer
57 views

How to paginate a list of custom taxonomy terms?

I made a custom taxonomy named "books" and with a little help on SE I managed to display its contents on an image grid, the code below shows how I did this: add_shortcode('taxography' , ...
-1
votes
1answer
19 views

Trouble figuring out how to get my button to submit comment

I have a text area in the sidebar (sidebar-chat.php) of my posts page with an input that is an image. When this image is clicked, the comment is supposed to submit. I am just having trouble figuring ...
0
votes
0answers
19 views

Search by terms of a custom taxonomy

I have a custom post Download and this custom post has a taxonomy naming category. And i have 4 type of category in this category taxonomy.I want to retrive search result according to the 4 terms in ...
0
votes
2answers
67 views

Create custom post type on successful woocommerce order

On the checkout page I have a custom field that gets saved to the order meta data. I need to grab the order meta data and create a custom post type and fill the custom fields with order meta data. ...
0
votes
1answer
10 views

How can I turn a url with get method as a clean url with segment as the get method?

I got a page called profile my current way to view the profile of user 1 www.sample.com/profile/?id=1 how can I make this something like this www.sample.com/profile/1/
0
votes
1answer
20 views

enumerating custom taxonomies?

I made this function that displays tags as an image grid function execute_taxography() { $wpbtags = get_tags(); $output.= '<div class="grid"><div ...
0
votes
1answer
82 views

How do I update product shipping using PHP in WooCommerce?

I am creating products using a PHP/HTML form. Here is how it works: Specify dimensions, quantity, and attributes in the form Send that info to create a new product on the fly when I hit "Calculate" ...
0
votes
0answers
28 views

Send New Order email to Admin on custom Status

I have created my custom order status "Pending Approval" as Default Order Status, Means if a customer order something from store, it will place it under "Pending Approval" instead of "Processing", ...
0
votes
1answer
37 views

insert thumbnail image from php script

I'm trying to insert a post image thumbnail from my php scritp. It's inserting the post, the content, a download link, and I only need to set the thumbnail image to finish my script. This is my code ...
0
votes
1answer
35 views

Only show posts from the last trailing 12 months

I have this query <?php $post_args = array( 'post_type' => 'tribe_events', 'eventDisplay'=>'past', 'tax_query' => array( ...
0
votes
0answers
33 views

Active menu item post detail

I'm trying to make the menu item active in WordPress when clicking on a a post item. The way im matching it is based on the browser url and the url of the menu item. However it is making all my menu ...
0
votes
1answer
36 views

Change colour of table td based on value

I have this code in my table calling in a number <tr> <td>Total: <?php echo $total_credit;?></td> </tr> I would like to change the background colour or the text ...
0
votes
1answer
43 views

get_post_meta with variable

I’ve created a custom post type and a corresponding meta box for a site I’m developing. As there are several entries for similar 'products', some of the post metas repeat, albeit with a trailing ...
0
votes
1answer
35 views

Wordpress loop causing timeout errors (maximum execution time of 30 seconds exceeded)

All of a sudden I started getting memory and time out errors whenever I try to make a loop with WP_Query. Heres the code: $args = array( 'post_type' => 'post', 'posts_per_page' => '3', ...
0
votes
1answer
19 views

How to slow down server response

I've been trying a few methods to slow the loading of my Wordpresss installation by x seconds but I've had problems which each try: Javascript sleep() does the job but my hoster emailed me saying my ...
4
votes
4answers
437 views

Moving a PHP web-app to Wordpress

I've been running a niche job-search web-site for the past several years. I wrote it from scratch in PHP. Essentially it allows members to search for or post job ads. As you can imagine it has ...
0
votes
0answers
20 views

Problem with importing large number of images in post

I was make plugin which create gallery post. It need to import more then 100 image files, wallpapers, in one post. When start to import if is images smaller in size all goes well...but if is images ...
-1
votes
1answer
41 views

What is the source outline for a basic word press plugin?

I'm a fairly skilled PHP developer, and watching a tutorial on how to build a WP plugin, with the intention to get my name out there. What is the outline for a WP plugin that includes database calls? ...
1
vote
1answer
17 views

Notify Wordpress Site I Have Linked To Them

I have noticed that when a Wordpress site puts a link to my site in a post it shows their website in the comments section of my site. I'm wonder how could I make my PHP application do this? I mean ...
0
votes
1answer
23 views

Adding link on title its in description but not in title see screenshots attached

This should be simple fix. I am learning php so am not that good to spot the obvious. Here's the website http://goo.gl/tE4OSO. here's what I want http://imgur.com/qZXPPYu . Here the code I believe ...
0
votes
1answer
48 views

`update_post_meta` not working anymore

Originally my goal was to compress my code, now after I altered it, it is not working anymore. I can't figure out why. I simplified it a bit, now this code should save one date entered in the backend ...
0
votes
1answer
30 views

offset and max_num_pages in pagination gallery

I rewrote the code galleries and stopped at the pagination. How can I get the maximum number of pages? at the moment I can not define it, and put a test for the number 5. (Here "for ($ i = 1; $ i ...
0
votes
1answer
24 views

How to make a cookie be on the whole site instead of being on a specific page/

So I had an idea to make a button that swaps between css files in order to do random stuff such as making 2 backgrounds that the site users will be able to swap between. I had no idea how to do it, ...
0
votes
1answer
9 views

Theme editor removes backslashes

I'm having issues with backslashes being when saving changes to files in the Wordpress theme editor (theme-editor.php). So for example, Appearance > Editor > style.css I'm fairly certain that ...
1
vote
2answers
18 views

If no image, bigger text

Working on a categories/ front page, I would like to display an image and title for posts with an image. When there is no image, it leaves a big blank space -- looks empty, of course ... So I'd like ...
0
votes
1answer
15 views

Passing link parameter values to form

I've added edit|delete options in every row of a table, created in the admin panel. function column_A( $item ) { $actions = array( 'edit' => sprintf( '<a ...
0
votes
0answers
30 views

Isotope filtering with wordpress by categories

I am using the isotope by metafizzy script, need to use it on projects page of my website, it's working fine but what i want to do is filtering by custom post categories (portfolio categories), here's ...
10
votes
2answers
653 views

To close or not to close php

I have read that it is advised (especially with php 7) to not close the php files with ?> Many of my WP php files end like this: <?php get_sidebar(); ?> <?php get_footer(); ?> ...
0
votes
1answer
26 views

Custom pagination (Previous / Next)

So I'm working on a custom pagination following code: <?php if ($wp_query->max_num_pages > 1) : ?> <?php $next = get_next_posts_link( 'Previous', $the_query->max_num_pages ); ...
0
votes
0answers
14 views

How to make an item appear in page 2?

I will keep it short. I created this menu under shop page to sort my product by popularity, price..... not the primary navigation, Just something I made through CSS Well since I created it inside the ...
0
votes
1answer
53 views

Processing forms with php to wordpress database

I'm simply trying to process data from an html form into my wordpress database through php. I've tried multiple times to get the data inserted but have had no luck. The setup is as follows: Database ...
0
votes
0answers
21 views

Integrate Stripe api into Bedrock/Sage theme

My question is how do i get WordPress to recognize my new class so i can use it in my charge-card.php AND how do i get it to load Stripe in my actual class, using doesnt seem to work. I'm pulling in ...
0
votes
0answers
24 views

Remove “<?php” tag at the beginning of the file

I'm developing a WordPress plugin and I have a php file that is being used as a CSS file. The php file is being loaded through the wp_enqueue_style function, like this: ...
0
votes
0answers
16 views

Allowing site subscribers to create a poll

So I am currently working on a site where I want the user to be able to create a poll that can then be posted to a main 'feed' for others to vote and comment on. This 'feed' will be a simple blog, and ...
1
vote
0answers
19 views

Trouble making searchbar responsive [closed]

I have a searchbar in my header, which I need centered horizontally and just a little bit above the bottom of the header. I was able to achieve this by using display: flex; justify-content: ...