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

learn more… | top users | synonyms (1)

0
votes
0answers
4 views

Query if audio attachment AND/OR custom field

I've been trying several things but to no avail... Searched, maybe not good enough though! I have posts that either have an uploaded audio file AND/OR has a Soundcloud link (which is a custom field). ...
0
votes
0answers
12 views

WordPress page condition on plugin activate

I'm trying to load diff. template on plugin state like on woocommerce pages and bbPress pages if ( class_exists('woocommerce') || class_exists('bbPress')){ if ( is_account_page() || ...
0
votes
1answer
26 views

Use WP_Query in shortcode

I'm trying to get meta information from the first four posts that have a meta key equal to Sedan, then format that posts meta in order to set up gallery type display boxes. I believe it has something ...
0
votes
3answers
18 views

Escape html structure in php

I have code like this: <?php echo '<div class="class-name">' . __( 'Text','text-domain' ) . '</div>'; ?> in a plugin of mine. Do i have to escape this? (esc_html or similiar)?
0
votes
1answer
17 views

How to get the term before the last from a custom taxonomy?

This code displays the last term added to a taxonomy "issue" which i use to automatically display a link toward my current issue: $args = array( 'hide_empty=0' ); $terms = get_terms( 'issue', ...
0
votes
1answer
10 views

On a custom template, should I use wp_footer?

I have started to learn about WP. I was asking myself the other day : should I use, in my custom template, the wp_footer() to call my scripts or should I go with static script? I can't seem to ...
0
votes
1answer
18 views

How to add div blocks after certain set of post

Ok I broke my post down into different style settings. Like shown below. The first post is a large block. the next four post are small and aligned next to the larger post. I used the loop below to ...
0
votes
0answers
5 views

Update title of every instance of widget using text field

I have created a simple widget which looks like this: As there are going to be many instances of this I want to know if it's possible to update the title of each instance (where it says 'Membership ...
0
votes
0answers
11 views

Wordpress: Trying to echo taxonomy slugs of individual downloads, but limit them to the $atts[category] selected from shortcode from post

Note: I'm a reasonable newcomer to .PHP, starting with this project. I understand the concept of it, but I'm not yet skilled enough to figure out what functions I need to use for something a bit ...
0
votes
0answers
20 views

how to use two permalinks for one custom post type

I have a custom post type "article" where posts have a permalink structure (www.mysite.com/article/post-name). I need each post in it to have two different templates according to its permalinks: the ...
0
votes
1answer
25 views

WordPress 4.2.3 on Windows Server 2008 R2 Creating Files as read only

Whenever I attempt to update a plugin or change my configuration for W3 Total Cache, if wordpress creates a new file, it's created with the Read Only attribute. I can upload and delete content without ...
0
votes
1answer
16 views

how to edit a specific post slug using a php code?

I want a php code by which i can show a modified link to the post. when using <?php get_post_permalink(); ?> it shows e.g.: (www.mysite.com/post-name-one). what i need is something like ...
0
votes
1answer
23 views

How to pass a PHP $_GET variable and fetch/output it?

I've already looked at the Wordpress Codex, and looked around for other solutions online, but i still can't seem to get it working. Basicly what i need is to pass a GET variable in an URL, and output ...
0
votes
0answers
11 views

Add custom filter to register data in array

I would like to register a multi arry of data in a plugin and allows any developper to add new value to the array. This multi array contains a name, and different value like this: class ...
0
votes
1answer
17 views

Front end post submissions do not get submitted in the category

If I submit the post after choosing a category the post doesnt get submitted and instead it takes me to the category page i have selected.However if i delete the fieldset "category" and fill the form ...
0
votes
1answer
23 views

WooCommerce “Checkout Now” button [on hold]

Okay so I want to add an additional button to the single product page that says "Checkout Now". This checkout now button should go directly to the checkout page, not the cart page (like the regular ...
0
votes
0answers
24 views

How to display terms from two taxonomies in one php code?

Two taxonomies were added to posts : volume : in which admin enter the number of the journal volume for each post issue : where admin enter the number of the issue under which the post is published ...
0
votes
0answers
13 views

Display the video of a post_format Video

I've a post with post_format = video, in which the content are a video and a text (in the default editor). I need to display the video and the text separately. How can do it? For now, I've this code: ...
0
votes
1answer
39 views

How to call post title and post summary to other part of site?

My blog is installed at /posts of my site. It's not a mistake; I wanted to be like that. But now my homepage looks somewhat empty. Here I want to call the title of my blog to my homepage, with a ...
0
votes
0answers
12 views

Custom Taxonomy Link Text Echo Name Not Slug

I'm a little lost about where I can place a simple php echo within a loop. I have a "program" taxonomy where each program is echoed onto buttons. Right now I'm only echoing the slugs for the link ...
1
vote
1answer
14 views

Adding regex filter to feedwordpress

I'm trying to write a plugin for Feedwordpress that filters html from the incoming feeds. So far I have managed to hook it to the right place, but the function completely wipes all content (and it ...
1
vote
2answers
27 views

Get date numerical and separate?

I need to work with date function but I want to get day and month numerical and separate and pass it to a function. For example, I want work for this function. function(day,month) How can I ...
-3
votes
0answers
12 views

nonhuman administration [on hold]

Am searching for a plugins that help me to relate admin approval by a poll question answer (yes/no) to approve or disapprove a post of a member. I need the admin approval on posts automated.
0
votes
1answer
24 views

how to run a php code in widget?

I have a code to get all taxonomies and terms for a single post: $object_terms = wp_get_object_terms($post->ID, 'staff', array('fields' => 'all')); if ($object_terms) { echo '<p>' . ...
0
votes
1answer
26 views

How to add new css class

I want to change one particular element. .stats-top .stats-number{ visibility: hidden; } There is one counter with 3 rows. I want the values from 2 rows not to be visible. When I try to add ...
0
votes
1answer
13 views

problem with category menu, it doesn't want to show link

I have created a category menu but when it displays in front page it shows just text without link. thats my code: $menuname1 = $lblg_themename1 . 'categorie Menu'; $bpmenulocation1 = 'secondary'; // ...
-2
votes
0answers
10 views

I need linkedin connection email addresss [on hold]

I need linked in connections email address from php API, how can i get email address from linked in , if it possible can you provide me some details about code, i tried but LinkedIn API say that your ...
0
votes
0answers
19 views

Problem in sending data to server

I want to have a poll system in my new website. So i use the instructions here: W3Schools! with a bit changes. Now i have a hidden textbox:<input type="hidden" name="post_id" ...
0
votes
1answer
14 views

Find trigger behind occasional php undefined error

Trying to track down an error that's popping up in our php logs -- PHP Fatal error: Call to undefined function get_template_part() in ...index.php It shows up 2-4 times a day (while index.php ...
0
votes
0answers
17 views

Getting the ID of a category from a slug so I can search posts using ID

I am attempting to get the ID of a category by trying to search by the slug. I have tried a number of entries from this site and online but havent been able to return the ID of the slug. The slug is ...
-1
votes
0answers
19 views

need a good code for open and close tag wordpress editor [on hold]

hi i need a good code for open and close tag wordpress editor 1.The button on first click shoud open and on second click have to close </b> tag 2.Add active class ! 3.How to ...
0
votes
0answers
45 views

Saving Post redirects to 404 page when php $_GET variable in post body

I am having a very annoying issue where certain posts redirect to 404 page when trying to save or publish a post. It only happens to a few posts and did not happen prior to the last few WP updates. I ...
0
votes
1answer
27 views

How to protect own PHP code from Wordpress updates

I have written several own shortcode scripts which I place in the shortcodes.php file. My Wordpress installation is set to update to new Wordpress versions automatically, which is a good thing. But ...
0
votes
1answer
13 views

resizes images on the fly

I'm looking for a plugin that resizes images on the fly that I can call via php. I have searched the wordpress plugins for something that does this and wasn't able to find anything that was up to date ...
0
votes
0answers
20 views

Cannot Enqueue JS Script in Wordpress Admin

I'm running through a tutorial to add some ajax functionality to the admin area of WordPress and have hit a road block. I've been trying for a couple of hours now and as far as I'm aware, the below ...
0
votes
0answers
18 views

Wordpress admin menu pages not receiving passed info

I have a Wordpress menu page (A) and a wordpress submenu page (B). I want to pass data from A to B. A has a list of items and I want B to show the details of each item, by passing the item id to it. ...
0
votes
0answers
9 views

502 Bad Gateway When Supplying Header Content-Length To Try To Force Download

I am trying to force the browser to download an mp3 when the user visits this site. The issue I am running into is if i set the Content-Length header the page throws a 502 Bad Gateway error, and if I ...
0
votes
1answer
24 views

Manually Create PHP Page For A Redirect

I am new to wordpress and working on something for a friend, I have FTP access, and am trying to upload a php file, that checks the platform and redirects the user either to the iTunes store if they ...
0
votes
0answers
11 views

When are static class variables shared? [migrated]

My understanding of PHP static class variables in a Wordpress environment is that, if 2 or more objects of the same class are instantiated within the same http request, then their class static ...
0
votes
0answers
9 views

customizing wordpress theme slider with switch statement

i am working on an assignment for wordpress , i need help in following matter, im using wordpress today news theme, the link of my current work ca.unitysofts.com in upper three slider , while ...
0
votes
0answers
24 views

how to retrieve woocommerce product details based on their category_id using mysql -php

I have to retrieve the product details such as image title,description,image link and price from woocommerce table. I've retrieved the categories with this Query, $result = mysql_query("SELECT ...
0
votes
2answers
15 views

How to pass parameter that ends up being part of a class name with wordpress shortcode

This is the resulting html I want to produce with a shortcode - when editing page content in WordPress: <div class="shadow-wrapper half-shadow im-centered"> <div class="box-shadow ...
1
vote
1answer
20 views

body_class filter - Is there a better way to write this code?

I would like to add a body class depending on what sidebars are active, and a body class if my before-header widget area is active. I have got it to work, but I would just like to know if there is a ...
0
votes
0answers
14 views

Changing time format beyond normal customization [migrated]

We all know we can customize the time format for Wordpress using basic customizations as outlined here: https://codex.wordpress.org/Formatting_Date_and_Time But, in order to match the styleguide a ...
0
votes
1answer
12 views

Things that saved lose when logout

i been working on theme for my portfolio on my host and domain name http://alyelgarhy.com/ and things i saved when login changed when logout for example i change the tagline to senior web designer ...
0
votes
0answers
26 views

Echo date picker field returns fatal error

I'm having a semi PHP/AdvancedCustomFields question so I hope that it's ok to ask it here. I'm trying to echo the value of a date picker field which is formatted as DD d MM yy (JS date format). If ...
0
votes
0answers
18 views

Is it possible to place plugin files inside a Wordpress theme?

Is it possible to place plugin files inside a Wordpress theme? I have customize the plugin and on updation of the plugin all the code will be lost.
0
votes
0answers
22 views

How to rename the page category link [duplicate]

I have tried multiple different ways to get a piece of functionality to work in my site. I have also attempted to hire multiple freelancers but after being told my orginal idea wont work I am having ...
0
votes
1answer
25 views

Page returning ID from array, how to return the correct values for post in acf wordpress

Im having a little trouble returning the correct value with the relationship field. My end result is to use the relationship field to add selected locations to a drop down in gravity forms. I can ...
-1
votes
0answers
26 views

Backend editing admin, I wanted to insert this metabox into the product>category

Backend editing admin, I wanted to insert this metabox into the woocomerce product category or product>categories>clothes add_meta_box('pmpro_page_meta', __('Require Membership', 'pmpro'), ...