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

learn more… | top users | synonyms (1)

0
votes
1answer
18 views

WordPress Setting API - There is no field in options.php

I am creating a small WordPress plugin. I created setting page and there are two user inputs in setting page. I created two option types. Those are rmpm_post_newcount and rmpm_post_newname. After ...
0
votes
0answers
19 views

Pagination redirection in WordPress

I had a blog website in a custom CMS. I recently re-developed the website in WordPress. The old website had pagination urls like "?page=2" But WordPress shows pagination urls like "/page/2" Now what ...
0
votes
1answer
26 views

How to use functions [closed]

I have installed the plugin WPdeposit on my site, it allows users to deposit into their account balance. I am trying to manipulate users balances when they press an anchor tag on the page. In the ...
0
votes
1answer
33 views

Rewrite Most Wordpess URLs

I have a wordpress site that's approximately 25% "business" pages and 75% "techie" pages. The current site: mysite.com, I'm splitting into two separate domains: mysite.com for the business stuff and ...
0
votes
2answers
39 views

PHP Output also in Child theme, but different

I have a multilingual site setup: www.jeroenbrugman.com The main dutch version uses Fluxus. On the artwork page I output a link using this from Functions.php function prefix_term_name($terms, ...
0
votes
2answers
31 views

Wordpress cron is running with previously set time intervals and not the updated one

For testing purposes I keep short time intervals for cron and when the functionality is working fine, I change it to the required time interval. Whenever I change the time intervals for ex: from ...
1
vote
1answer
46 views

Limiting woocommerce line_total decimal length

I am trying to get line_total woocommerce price, but i just cant figure out how to deal with number of decimals. It is now showing price with 4 decimals like 5.5444$ and i want it to show max 2 ...
0
votes
0answers
294 views

Insert data into mysql database with php and ajax

I made admin menu inside wordpress and I have form that allows admin to insert some values. I have html: <form id="prices_form" method="post" action=""> <div ...
0
votes
1answer
33 views

what is -> -> means in wordpress

I'm bit confusing what is the meaning of this line. $show_title = Ninja_Forms()->form( $form_id )->get_setting( 'show_title' ); "-> ->" available in PHP or it used only within wordpress.
0
votes
0answers
24 views

Save the value of a wp_dropdown_pages

I have created a wp_dropdown_pages based upon the WordPress codex page global $post; $args = array( 'date_format' => get_option('date_format'), 'depth' => 0, ...
0
votes
1answer
71 views

WP_Query count of different meta key values [duplicate]

I need to get count of different values of meta_key: Let's say I've got meta_key $class & there's only three different values: 1, 2 & 3. //My WP_Query $ads = new WP_Query(array( ...
0
votes
1answer
56 views

Invalid argument supplied for foreach() in search.php

I'm using this code on a search.php template to display search results, posts are formatted differently using a template part depending on the post term. This method works great on the index.php but ...
0
votes
1answer
50 views

Find all strings between an enclosing shortcode

I want to look for all strings in my theme located between my enclosing shortcode [question] desired string [/question]. Then I want to output the so collected strings somewhere in my theme , e.g. ...
0
votes
0answers
7 views

Post formats in 2 columns display

I'm having a hard time trying to figure out what's wrong in my loop. Here is my loop for a 2 columns post display : <?php $i = 0; ?> <?php if (have_posts()) : while (have_posts()) : ...
0
votes
1answer
31 views

How to change layout of shop page in wordpress? [closed]

Currently I am working on shop page. And according to the design I have to insert a banner after 4th product and after 7th product and I have 3 products in each row and Banner's size is equal to the ...
0
votes
1answer
47 views

Error in WP_update_post

i make php file outside from wordpress folder to edit wordpress post and i get error when i use this code. wp_update_post <?php include '/go1/wp-includes/post.php';?> <?php // Update post ...
0
votes
1answer
26 views

Search only working on front page (index) , not working on other pages

I'm currently building a custom WordPress template and I've run into a problem with the search box. When I use the searchbox from the homepage, it works as intended. It also works as long as ...
0
votes
1answer
28 views

Are WordPress widgets cached?

I'm not sure if it is true but seems that the content of the widgets is cached. I initially thought there was a problem with my code (I need to hide/show a section in a custom widget according to a ...
0
votes
2answers
42 views

Widget edit and add in any page

So I have this site and on the bottom of the site you can see the map and search. I have 2 problems with that: The search if offset not in line with the other elements. I want/need it to be full ...
0
votes
0answers
41 views

Remove Special Characters from Wordpress Media File Names in HTML

I've removed all the special characters from media filenames in the database (meta_key - _wp_attached_file - filename), I've renamed the files in the FTP and rebuilt the thumbnails a few times. ...
0
votes
5answers
52 views

How to redirect all 404 in a Wordpress subdirectory to the index.php of subdirectory?

I have a folder with name: wordpress_install/dev/abc Now, I have created a index.php in abc folder and I want all the urls like: wordpress_install/dev/abc/asdfasdfsdf (a 404 page) to be ...
0
votes
1answer
65 views

How to add together (get the sum) a field from all author's posts

Using the plugin WPeddit I want to count the epicredvote score from all posts of an author together to get the sum. The following is a custom field that puts out a score, like "3" or "-2" or ...
0
votes
1answer
113 views

Live search from database table

I have wordpress site. I made custom table and sotred values in one row. Now I made admin menu and added input field into it. <input id="location1" type="text" /> I need to predict search ...
0
votes
1answer
47 views

Add data-id attribute to child page links

The should be simple but I just can't figure it out nor find an answer. I need to add a data-id attribute to the <li> parent container of the respective child page <a> links. The HTML is ...
0
votes
1answer
41 views

Splitting the_content() by size?

I have a situation where users don't want to format quotes in post body and want to just paste their content, assign a quote in a custom field, and the template will now render the quote when viewing ...
0
votes
2answers
17 views

Adding wrapper elements in the_date() like in the_title()?

So this works: the_title( '<h1 class="entry-title">', '</h1>' ); But this does not: the_date( '<h4 class="entry-date">', '</h4>' ); I don't know enough if this is ...
2
votes
3answers
87 views

Get only the grandchildren, not the direct children of page/current page?

I know javascript pretty well now but I am new to php and wordpress theme building. I have searched a fair bit and can't find a solution to something that seems like a pretty simple task, all I would ...
0
votes
2answers
114 views

Get post id within comments loop

I have a custom comments loop on my author.php page. I am trying to get the post id so that I can echo the permalink for the post that the comment belongs to. Also so I can echo some post meta custom ...
0
votes
1answer
19 views

widget: input the px value from user and use it as inline style in widget function

I am trying to dynamically add margin-bottom property to my widget. For example, I am inputting the value "50px" from my widget and want to use this value to adjust margin-bottom property for the ...
0
votes
0answers
41 views

site-title to logo image

So question is following i am working on this website and i need to put a logo which i uploaded inside the header where the title is as text ..problem is ..i tried fiddling with header.php and ...
0
votes
1answer
17 views

<a> with PHP within splits the link

I've finally found out how to call a the project-type in a link so the link changes depending on which page it shows. This is the code: <h3 class="widget-title"> <a href="../">Terug ...
1
vote
1answer
166 views

How will php 7 affect Wordpress?

Will the new php 7 version be backwards compatible or will we face compatibility issues? Will it greatly affect the way we code for WordPress? My host offers php 7, should I use it for a WordPress ...
1
vote
0answers
26 views

Converting acf repetears to a datatable on frontend [closed]

I'm working on this more then 2 weeks and its driving me crazy. I'm really hope to find some help here so thanks in advanced for your time. My problem: because I don't even know if my way is feasible ...
0
votes
1answer
44 views

Showing the project type in HREF

Im kinda new to PHP so bear with me. Im building a site for my uncle using the Fluxus Theme in Wordpress. He's an artist, his art is displayed in the following order: Menu Category1 --Actual Art ...
0
votes
0answers
23 views

How to add Cron to WordPress

I trying to develop a plugin to send emails to users in a specific time, so I have created my plugin like that : register_activation_hook(__FILE__, 'my_activation'); add_action('my_hourly_event', ...
0
votes
0answers
15 views

How to limit each front-end user to view just his own uploaded files on Amazon S3?

In my Wordpress website Users can upload video files directly to a Amazon S3 bucket, all of them use the SAME bucket for their uploads. After the upload is done each user should be able to view/delete ...
0
votes
1answer
35 views

search bar for page that search only particular page id's

How can i create a search bar in a page that searches only in particular page id's. This shouldn't affect the search bar in other pages. I tried add_filter( 'pre_get_posts', ...
0
votes
1answer
65 views

PHP calling function within a class

I'm writing my own php class and I have multiple functions within the class. Something like this: class JSON_API_Hello_Controller { public function test_cat(){ global $json_api; ...
0
votes
1answer
239 views

Processing ajax call to php to insert into mysql database

I made top menu in wp admin dashboard. There I will have input field. It will be input where admin can enter Google locations. After picking correct location admin will press save and location will be ...
1
vote
1answer
25 views

Sort meta-value in the sequence array in pre_get_post

I am customizing the display of posts in a category with pre_get_posts and meta_value . Each will receive a meta_value posts and wish them to be in the order of the array. I want it that way ( 1 ) ...
0
votes
1answer
57 views

How to use Amazon Elastic Transcoder from Wordpress using AWS SDK for PHP?

Use Case: The user uploads his video from the frontend of my website in any format he wants to Amazon S3. Now I want to covenrt that video file to MPEG-4 using Amazon Elastic Transcoder by applying ...
0
votes
1answer
28 views

How to create a dashboard for logged-in users with custom functionality? [closed]

I am developing a Wordpress website in which each logged-in user should have a dashboard from which (s)he can upload video files. Each user has an upload limit of X GB. He also should be capable of ...
0
votes
0answers
43 views

Trying to update User Meta with Ajax

I am trying to make a plugin to record the users browser based location as user meta data stored as Latitude and Longitude. This current version is trying to make user meta via form, but ultimately I ...
0
votes
1answer
20 views

Relationship between custom post type and page/single templates

I'm trying to create a relationship between my custom post type, "Movie" and multiple page and single templates. The idea is for each page to query "Movie" and display different content from the post. ...
0
votes
2answers
44 views

is there a benefit in using a constant over get_stylesheet_directory_uri?

Is there any benefit perfomance wise when defining a constant in the wp-config.php like so <php define('PATH_TO_THEME', get_stylesheet_directory_uri() ); ?> and then referring to ...
0
votes
1answer
73 views

How do I make this Metabox show current DB value?

<p> <?php $options = get_option( 'city' ); $names = explode( PHP_EOL, $options ); ?> <label for="City" class="timeshare-row-title"><?php _e( ...
0
votes
0answers
17 views

Custom menu problem

I have following menu coded under header.php and i want to add an page under a category menu as an example instead of 36 (category id) i want to display the page id 8197 P.S. i tried to remove the ...
0
votes
0answers
25 views

Making custom web application in wordpress?

I am making a web application in PHP using Codeigniter. Now the client wants to have the backend as well to customize the content. I was thinking can I make it in wordpress ? Application features : ...
0
votes
1answer
19 views

How do I pull information from one wordpress backend into another? [closed]

I am not even sure this is possible, but here is what I have in my head. I have 3 installations of wordpress. They each run affiliate WP. I have a main management site where my affiliates log in and ...
1
vote
1answer
24 views

Wordpress blog post url on category page

My Wordpress theme (Big Point) allows me to showcase a list of posts by category. I have set the format of my posts with a 'documents' category to all be 'links' and when I choose the 'link' format ...