The server-side programming language that the WordPress core, plugins and themes are written in.
1
vote
1answer
25 views
Wordpress plugin for nicer looking slugs? Have multiple pages named the same but they get different slugs
This wordpress site I'm touching up has a page hierarchy which is responsible for the urls.
Basically the urls look like page1/subpage/subsubpage etc.
The problem is, this site is for a recurring ...
2
votes
1answer
68 views
Restrict access to post if it is currently being edited
On a platform with many Editors, the problem that I am experiencing is that two editors proofread the same post simultaneously (and disregarding the warning notice about someone else currently editing ...
0
votes
0answers
21 views
MySQL Engine vs. Charset
I am attempting to have my plugin create a new table. I am fairly new to SQL. I have found two different method for creating tables:
Method I
$table_name = $wpdb->prefix . 'cool_table';
$sql = ...
0
votes
0answers
58 views
custom styling for woocommerce categories
I am using hooks and customizing the template files to use woocommerce. On my products page I want a list of categories along the top like this. I would even settle for a neat list of them where my ...
0
votes
1answer
46 views
Creating Database Table vs. Adding MetaData to Post & User
I am creating some event functionality for my wordpress site.
Each event will have a set of tickets associated with it.
A user who is purchased at least one ticket will additionally have a set of ...
0
votes
0answers
31 views
Permalink of Custom Post Type
I am trying to create a custom post type called an 'event' and have it's permalink structure be as follows:
www.domain.com/events/238
where 238 is the post ID. However, when I navigate to the page, ...
0
votes
2answers
55 views
Plugin.php: PHP Notice: Undefined offset: 0 in
I moved a WordPress site from one domain to another and there were a lot of white spaces that needed to be removed.
The only problem that is left are the following errors:
PHP Notice: Undefined ...
0
votes
0answers
57 views
How to edit php files in Child Theme?
I created a child theme and i want to edit a php file. So i copy and paste the php file into the child's theme folder and then i edit it. But it seems that nothing changed in the site preview! In the ...
2
votes
1answer
79 views
Hide custom image sizes from media library
I want to hide a few custom image sizes from the media uploader:
The following code (posted here) works only for the default image sizes:
function remove_image_sizes($sizes) {
...
0
votes
0answers
35 views
add conditionals to a displayed external xml feed
I found the following code online and customized it to pull the xml feeds from our online calendar software and display event information on several different WP pages.
function otpl_add_class_feed() ...
0
votes
2answers
61 views
Adding code to the function file
I would like to move my large php functions out of the index or template files and into the function.php file. Would it be something like this?
function grab_code(???) {
??? .= '<div>some ...
0
votes
1answer
58 views
Where can I create a normal php file?
I have a wordpress site and I want to create a normal php file. If I put it anywhere in my wp-content folder, I always get a page not found error when I try to access it. For example, I create a file: ...
0
votes
2answers
32 views
Post's ID pattern?
Each post has an ID and I would like to know how they were assigned. Is there a pattern? Why are the ID's not being incremented by 1 every posts? It would be easier..My ID's go from 9867, to 9869, to ...
1
vote
1answer
22 views
comments_number display outside specified span
I want to display the number of comments a particular post has, so i thought i'd use comments_number, however when i use this the comment number gets printed outside of the span it's supposed to be ...
0
votes
0answers
146 views
Redirect user to a custom url after submitting a custom form using wp-comments-post.php
I am trying to make it so that a user is redirected to a confirmation page upon submission of a review... not a comment.
This is the form I'm using:
<form id="add-review-form" action="<?php ...
-1
votes
1answer
171 views
Woocommerce getting top level category parent and make all sub categories have the same template and menu
I want to get the top level category parent which is "wedgwood" so i give it a different menu and different template that what i wrote so far but it dont apply except on ‘wedgwood’ category wegdwood ...
1
vote
1answer
83 views
Adding a custom line of text to php code
The below code is used to pull in my Tweets and post them as individual blog posts on my Wordpress site.
I would like to add a "Follow me on Twitter link" after the tweet when it is displayed in the ...
0
votes
1answer
25 views
Building a List of Posts grouped by custom taxonomy as the section header only to be displayed if at least one post is in that tax
I have CPT "Dealers" and a custom tax of "States" where each post in the CPT is associated to one state. The hope is to create the header for the state then list each post in that state taxonomy under ...
5
votes
1answer
113 views
Allow Editors to edit pending posts but not draft ones
I have a large number of users with Editor Capabilities that help to go through the post submissions. This is my current setup for this role:
As you can see, they are allowed to edit_posts and ...
0
votes
1answer
42 views
Conditional Content Display
I"m trying to replace the string "Something Nice will show up here" in the block of codes below with WordPress loop but it doesn't seem to be working. I'd like when Link1 is clicked on, let the post ...
1
vote
0answers
55 views
Unique key for each row in a repeater field
Is it possible to have a unique key for each sub fields in a repeater field? I don't want to use the array index, because the array index can be changed, when adding new rows between existing rows.
I ...
1
vote
1answer
88 views
Custom image upload
I'm trying to setup upload for for attachments for my custom post form.
At first I add to my form tag enctype="multipart/form-data"
For testing purposes I have two upload forms, but in future I'm ...
1
vote
1answer
32 views
Showing a different gallery in a seperate post
i am using the [multigallery] function and I was wondering if there is a way to use the function to call attachments from another post.
For example if i was writing a post about taylor swift and I ...
1
vote
2answers
75 views
Using FirePHP with WordPress
I am trying to make it so that I can output to the console in PHP. I have already installed FireFox with the FireBug and FirePHP addons.
I downloaded the 'FirePHPCore Server Library' from here and I ...
0
votes
0answers
19 views
PHP Parse error - wordpress [closed]
can anyone please assist me?
I have this error on my website (wordpress) when trying to load it. I was in functions php doing some coding. Then I deleted the coding I placed in there, but the error ...
4
votes
1answer
76 views
function_exists call in function.php
In the function.php file of the twentyeleven the setup function checks to see whether it exists before running it:
if (!function_exists('twentyelevent_setup')):
function twentyelevent_setup() {
... ...
0
votes
2answers
314 views
Wordpress refuses to send mail, “…your host may have disabled the mail() function”
I recently implemented a comment area on my website and tried to get the email notification functionality to work. It doesn't seem to want to send email notifications when new comments are made. Just ...
0
votes
1answer
121 views
WooCommerce Tabs
In my theme, I have the WooCommerce plugin installed and would like to rename the "Catalog" tab, located under the WooCommerce > Settings submenu page.
Am I able to do this from my functions.php ...
0
votes
0answers
26 views
Issues with integrating dynamic PHP code for generating values defined in my dashboard [closed]
this is the code I've added in my functions.php for providing my users to edit social URLs on website through WP Dashboard.
// Theme Options Page Functions
function themeoptions_admin_menu() {
...
0
votes
1answer
77 views
Query specific posts per user selections from dropdown menus
This may be a little different than most people do. I'm trying to show certain posts that are determined by 4 different "categories." I have a large database table full of "products" (I'm using the WP ...
8
votes
3answers
171 views
How to change the case of all post titles to “Title Case”
I am helping my father with his WordPress website.
It has over 1,700 posts with TITLES IN UPPERCASE.
We'd like to change these to "Title Case" in the database (possibly using this PHP script).
The ...
1
vote
2answers
56 views
How can i remove all html tags from get_the_content()?
i want to remove all html tags from content like <p>, <br>, <img>, <a> i tried strip_tags()
also tried
$content = get_the_content();
$content = apply_filters('the_content', ...
0
votes
1answer
46 views
Adding Image Count to Multigallery
Ok so I am using the [multigallery] function and it works fine, but one thing I want to add.
Here is the code that I am using for the multigallery in my functions.php file
function ...
1
vote
1answer
114 views
Converting timestamps to local time with date_l18n()
I've got a WordPress cron job that sends an email periodically and saves the timestamp when it was sent as an option, and I'd like to display a date on a settings page. Something like, "The last ...
1
vote
2answers
50 views
Dynamically add id to heading tags
How do I add an id attribute dynamically to every heading tag on a wordpress website using php? I wanted to make it so that for every heading tag (h1, h2, h3, h4, h5, h6) I have a unique id attached ...
0
votes
0answers
36 views
method doesn't work when being called from wp cron
I don't know what's wrong but the method that I'm trying to execute doesn't seem to be running when being called through wp cron. In the code below I'm trying to insert a new blog post. When I have ...
0
votes
1answer
22 views
Adding Media button to only pages
I have created a media button as such:
// Create a media button for pages
function aisis_page_button_link(){
global $post_ID, $temp_ID, $iframe_post_id;
$iframe_post_id = (int) (0 == ...
0
votes
1answer
35 views
Defining multiple categories for showing latest posts
I have a function that lets me display the latest posts on my website, however i want to function to show posts of multiple categories at not just one specific category. Check the code below and what ...
0
votes
0answers
36 views
PHP script working in PHP page but not PHP widget [closed]
I have this code :
<html>
<form method="post" action="">
<div align="center">
<p><b> What to see if the server is online rite now just add the server Address and Port ...
2
votes
0answers
27 views
Modifying Footnote Plugin for Descriptive Title Attributes
I've been struggling for a couple hours now to get this working... Hopefully someone here can help me.
I just started using the wp-footnotes plugin, and I'm trying to set the title attribute on ...
0
votes
0answers
49 views
Use $_GET with permalinks on page
I'm currently trying to use a $_GET to populate a MySQL query with in a URL on another page within a Wordpress site.
URL sample:
<a href="http://site.com/file.php?alabama">Alabama</a>
...
0
votes
1answer
36 views
get_avatar won't show uploaded avatar, only default gravatar
I'm using the Simple Local Avatars plugin so my bbPress forumgoers can upload their own avatars. Now, when a user logs in, I want his/her avatar to display next to the relevant links (i.e. logout, ...
0
votes
1answer
23 views
site_url and $current_user producing undesired results
I am trying to make the link like this: site.com/forums/user/userid using the code below. I think I messed it up though because it keeps producing an error on this line.
$buttons['Edit My Profile'] ...
-1
votes
1answer
41 views
Errors while Loading Most Recent Version of jQuery
I am trying to set up my WordPress so that it will use the most recent version of jQuery. Here is what I have done so far:
functions.php
<?
add_action( 'wp_enqueue_scripts', 'RegisterJQuery' );
...
0
votes
1answer
59 views
Wordpress truncate posts question (plug-in related)
I'm using a plug-in ("Wordpress plugin random post slider") for Wordpress that pulls a random post from a category, and displays it in a slider for use as a shortcode or php code in a template.
I've ...
-1
votes
1answer
33 views
Integrating CSS Into a WP Function Call [closed]
Below is a code I use to display post views. It is integrated with an options panel which allows users to choose whether to display it.
I would like to integrate the div class .postviews directly ...
0
votes
0answers
34 views
Wordpress redirect after update profile not saving?
Im using the following code to redirect a user after they update their profile but its not saving any changes that are made (including custom user meta fields).. Any clues? Thanks!
add_action( ...
0
votes
3answers
43 views
Using a switch statement in Wordpress
I've got a piece of text in a div that I want to change on each page of my website. At the moment I'm not sure what function I should be using to do this. Here's what I have so far...
<?php
$page ...
0
votes
0answers
143 views
how to get the variable passing through the ajax url in wordpress query
i want to get the variables passing through the ajax url in wordpress query_post().
here is my javasrcipt
<script type="text/javascript">
jQuery(document).ready(function($){
...
0
votes
1answer
45 views
Countdown to date function?
When a user signs up on my site they have to select a date as part of resignation.
On their profile page I need to show a countdown to that date. Something simple like attached. How can I create this ...



