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

learn more… | top users | synonyms (1)

0
votes
0answers
37 views

set new link as permalink

i have external link stored in a variable $extlink which is generated based on different selections in the post. how do i set the permalink to be this $extlink so that when i click on the post it ...
0
votes
0answers
52 views

How to add a code for lastpostdate after/inside a specific menu link?

So, I have a news website. The designers want me to have a link in the menu that says "Latest News - [time of the last post]". I know I can get the datetime of the latest post with ...
0
votes
1answer
95 views

Repeatable field within repeatable group of fields

Compounding on Saving metabox repeatable fields ... I've created a metabox with a series of fields that are repeatable. However, within those fields, I'd like to create another field named Choices ...
0
votes
1answer
44 views

See output of a sql query while plugin installation in wordpress

Doing wordpress plugin development, I am creating a table (while installing the plugin) with the following string: $sql = "CREATE TABLE (query skipped)..."; /*someting*/ For example: I have this ...
1
vote
1answer
279 views

wp_mail file attachment not being placed in upload folder?

I have a form where I want users to be able to select an image to upload. The image gets temporarily uploaded to the wp-content/uploads folder, is attached to the e-mail and then is destroyed. Right ...
-3
votes
1answer
23 views

Retrieve Array from within Array [closed]

I have an array being created within another array in Wordpress and I need to get the ID value from each Array. This is the code I am using to pull the array <?php $pages = get_field('products'); ...
0
votes
1answer
190 views

Wordpress pagination not working in search result page

I have a problem with pagination on search results page. The page links appear, but when i click onto page 2, it gives me a 404 error. Page 1 : ...
0
votes
1answer
79 views

Shortcode Display From Wordpress Dashboard Page Without Using post_id

I have this code for showing recent posts on my home page custom theme and it works well. functions.php code: function my_recent_posts_shortcode($atts){ $q = new WP_Query( array( ...
0
votes
1answer
56 views

Dynamically replicate custom metabox in custom post type

I'm building a custom post type in Wordpress which will be used to author and display BuzzFeed style quizzes on a clients blog. Within the custom post type there are custom meta-boxes which represent ...
0
votes
2answers
54 views

Using Shortcode to Grab Archive Listing, Separate by Year

Here's code I've modified to display an archive list of every month I've posted news. Each month of course links to the archive for that month. I can then include the shortcode wherever I like. ...
0
votes
1answer
89 views

Dynamically display font icons in widget

All, have a movie review site that I assign a score to. Currently I'm using a widget which works fine...but I changed all of my scores to a 5 star rating system (3.5/5, 5/5, etc.) so the widget that ...
0
votes
0answers
29 views

Opengraph getting thumbnail image and description

Here is the code that I am using to call OpenGraph > $response = $facebook->api( 'me/objects/article', 'POST', array( > 'app_id' => 304895636200481, > 'type' => ...
0
votes
2answers
56 views

How to delete remain data in WP database after deleting custom post via admin interface

I'm trying to create a plugin that will delete pictures and additional info from database on deleting custom post (sp_venue) via admin panel (wp-admin/edit-tags.php) In the plugin I'm using this to ...
0
votes
0answers
46 views

Saving custom form fields

I am creating a plugin. So far I have created a menu and a page containing the form. I want to save these form fields for any user with 'Doctors' role. I think it should be saved under wp_usermeta ...
1
vote
1answer
425 views

Recent post display using shortcode

I am trying to display recent post in static page home-content.php. I've added this code in function.php function my_recent_posts_shortcode($atts){ $q = new WP_Query( array( 'orderby' ...
0
votes
0answers
2k views

solved - wp-admin/index.php gives a "500 Internal Server Error

experts, UPDATE: hello dear experts UPDATE. many many thanks for the great ideas and tipps. overwhelming - really your are overwhelming!!! i have done as adviced and this method made it clear. i ...
0
votes
1answer
42 views

How to get the slug of the homepage when editing it in WP admin?

According to the WP_Class reference, $post->post_name holds the value of the slug of the current page being viewed. If I'm currently viewing the WP admin edit screen for my homepage as set under ...
0
votes
1answer
46 views

Search page results conflicting logic - Search result caching?

I recently stylized my search page results from the base template _S, and got everything to work quite nicely. I've developed it to return false/positive header/body. It should only return a positive ...
0
votes
1answer
79 views

wordpress admin part is not accesbile after server shifting

one of my site's wp-admin is not accesible but the site front part is loading. This happens after i accessed the site from my new server second time. at first nothing happens and i can logg into ...
0
votes
1answer
153 views

Wordpress Staging and Testing of Plugins Best Practices

I'm just being testing a lot around for pagespeed. Doing this on a live system is a pain since you only can work between 2am to 7am. I do have employees creating content on the live system also ...
3
votes
1answer
183 views

How to get the custom header image's alt text?

I'm using a custom header in my theme. My aim is to add an alt attribute to my custom header img element. My img element so far looks like this: <img src="<?php header_image(); ?>" ...
3
votes
2answers
696 views

How to correctly add Javascript in functions.php

I would like to remove some ugly looking arrows that are standard on cart buttons in WooCommerce. To achieve this, I found a tip of adding the following code, which should remove the arrows when the ...
1
vote
2answers
94 views

Guidance with The Loop for CMS

Maybe I'm going about this the wrong way but this is my scenario... I would like to use WordPress as a CMS rather than a blogging platform. I have a website that will have somewhere between 25-50 ...
0
votes
0answers
63 views

Wordpress Custom Post Type and sort by Tags

I am currently making a custom Wordpress theme, but so far I am stuck at this little problem. I have created this custom post type. And in that page (media.php) I want to be able to click on the tags, ...
0
votes
1answer
50 views

Setting a default thumbnail url if no thumbnail

I have created a code to get an existing post's thumbnail and echo the url, but I would like to be able to have it get a default url is the post doesn't have a set thumbnail. Any help would be ...
1
vote
1answer
201 views

Run a filter when a walker runs

Is there any way to run a particular add_filter function whenever a specific Walker_Nav_Menu class runs? The function always needs to run when the walker goes, and I'd like them to share variables, in ...
0
votes
2answers
144 views

Resize Image without cropping

Currently I’m working on a WordPress plugin and as part of it users can upload Images. What I want to do is that these uploaded images of any size will be resized to 100px by 100px without cropping. ...
0
votes
1answer
56 views

Adding custom tables to Wordpress

I have a database which has thousands of rows of data in each of the tables. I would like to migrate this database into a Wordpress website. I would like the user to be able to log in to Wordpress ...
0
votes
1answer
27 views

Shortcode for a Series of Elevating Image Files, Excluding a Range?

I'm not sure if shortcodes have the capability of doing this and could not figure out how to do it on my own. Is this even possible? I have a series of images in several folders outside of WP. They ...
0
votes
0answers
228 views

using ACF datepicker to filter posts on a page

i’m using a wp-query to display posts from a category on a custom post type page. it works fine, and I’ve been also abble to sort my posts depending of datepicker field called “date_debut”. my posts ...
0
votes
1answer
49 views

On selecting shortcode generate selected shortcode table inside page editor worrdpress

i want to create a different different shortcode while choose particular shortcode relative table is show on page editor for example when user choose [some_random_code_sc] that shortcode then relative ...
0
votes
1answer
172 views

Add php function into .js file (for tinyMCE button)

I am creating a tinyMCE button for the wp WYSIWYG editor. Basically what happens is when a use clicks on the button a modal form pops up and they have to enter a few fields. However One of the fields ...
0
votes
2answers
61 views

Capitalize Shortcode Value on Output

I wrote this shortcode to take a filename I specify and output it as an image with title and alt tags: function cwc_pkmn($atts) { extract(shortcode_atts(array( "name" => 'http://', ...
0
votes
3answers
55 views

Add a variable in functions.php and call it in single.php

I am new to PHP and am building a WordPress theme. I would like to add a variable in the functions.php and use it in single.php as an if statement. At present, my single.php has the following code - ...
0
votes
2answers
120 views

Replace Post-Title with variable

I want to set a custom post-title with a custom-field meta in my Wordpress Theme. The user will add a new post to the post-type. When they do they will only see the "Title", "URL", and "Publish" ...
0
votes
0answers
30 views

how to get wordpress categories list with thumbnails?

i am trying to get thumbnails list with their thumbnails images .i tried code below but it only gives categories list . i know there a could do using feed_image but i can't figure out how to do it ...
0
votes
0answers
74 views

Wordpress and advanced custom fields subcategory inherit category color automatically

Hi is it possible if I added a subcategory and inherit the parent category's color? currently im using advanced custom field plugin. i dont know to show it inthe front end that if the user left the ...
0
votes
1answer
95 views

Replace shortcode in substring

I've created these two functions to toggle between the first paragraph of the content and then everything but the first paragraph so when the user selects 'More' it slides out the article smoothly ...
0
votes
1answer
40 views

Adding theme support for a custom header image

I'm using add_theme_support( 'custom-header', $defaults ); to support custom header images in my theme. The $defaults are described in the Custom Headers article $defaults = array( ...
0
votes
0answers
193 views

Pull latest Youtube Video from json url and make new post

I am trying to automatically "add-new" Wordpress post when a Youtube User uploads a new video. Using wp_insert_post(); I can echo what I need to, but how do I write a function that determines: "If ...
0
votes
1answer
105 views

Uploading files using the Settings API

I've used the Settings API in the past to output text inputs and checkboxes but am unsure if I can use file inputs. My add_settings_field() is: add_settings_field( '1', 'File 1', array( $this, ...
8
votes
1answer
1k views

Mega Menu Walker

I'm trying to create a mega menu walker. Unfortunately, walkers completely escape my coding knowledge. I could really use some help getting it working. Here's the features I need: Wrap the ...
0
votes
1answer
63 views

Wordpress loop is not working

Can anyone tell me why this wordpress blog is looping the header and banner over and over? It seems like instead of just looping the post it is looping the whole page. This code is inside of my ...
0
votes
0answers
48 views

How to extract URLs from wordpress taxonomies

I am in quite a trouble. I need to extract all possible url from my wordpress blog be it of post, tag, category or anything else after domian-name.tld/*. I tried my hand on few available codes and ...
0
votes
1answer
209 views

implementing a jQuery “click to expand” link in Wordpress [closed]

Novice coder - apologies for any stupid comments I've been trying to make a show more button on one of the div s on my Wordpress blog page. I've looked at a number of tutorials that all seem to agree ...
0
votes
0answers
10 views

Fluid full window width carousel Image Problem in WordPress [duplicate]

Slider link:- http://coolcarousels.frebsite.nl/c/2/ Here is my HTML script for the slider- <div id="wrapper"> <div id="carousel"> <img src="<?php echo ...
0
votes
0answers
38 views

Adding fields to user profiles, modifiable only by admins

I'd like to create a field called "Subscription" on user profiles that would have one of three values : "Active", "Out of date" and "Inactive." In the form of a dropdown ideally. I would like this ...
0
votes
2answers
129 views

Shortcode won't execute

I've created a shortcode using my limited knowledge, google, and stackexchange to do so. But when I load the page, it loads above the page contents and appears as html text. (shortocode text) ...
0
votes
1answer
60 views

Dynamically Generate Functions and Hooks

I'm trying to find if it's possible to dynamically generate functions and hooks. All functions do the same thing, and all hooks are essentially the same. Here's an example of a hook/function combo: ...
0
votes
1answer
33 views

Redirect loop upon installation of my plugin

I have created a plugin that uses a shortcode [MyCreditStatus] to display a form (multi-page form). This plugin uses an API that I also made. When I try to install the plugin, there are times that ...