WordPress

WordPress is a free and open-source content management system (CMS) based on PHP and MySQL for creating websites and blogs. Features include a plugin architecture, a template system and strong management, customization and search systems; through its dynamic presentation of content, webmasters have the flexibility to create websites easily.

Share tech news, updates, or what's on your mind.

Sign up to Post

Need to come up with a potential solution regarding a WordPress-based website coupon generation.

The issue is that the coupons need to be generated from a spreadsheet of existing values. The coupon generation will be user-based and once they click the Generate Coupon button, they will have a code pulled from the database of existing coupons, to be used. However, the coupons are not usable on the website, but are a 3rd party e-commerce store coupons.

How can I achieve the generation based on the existing codes, and have the code (once generated) removed from the list of remaining coupons, so that there are no duplicates?

Any ideas are greatly appreciated!
0
Hey guys,  I am having a glitch with my RSS feed.  One of the nodes, outputs as a hyperlink (which is a google map location). Majority of the people pulling it's no problem, but for some, it's causing a problem.  How could I remove the hyperlink, but still keep the location?

the node in question is line 102  <category><?php the_job_location(); ?></category>

https://cretecarrier.com/feed/huntfeed

<?php
/**
* Template Name: Custom RSS Template - huntfeed
*/
$postCount = 500; // The number of posts to show in the feed
$cacheFile = "rsscache/huntfeed.rss";

if(!file_exists(dirname($cacheFile)))
{
  mkdir(dirname($cacheFile));
}

$posts_per_page = 50;
$paged = 0;
$theres_more = true;
$rss_items = array();
if(file_exists($cacheFile) && !isset($_GET["reset"]))
{
  $rss_items = json_decode(file_get_contents($cacheFile),true);
  if($rss_items == null) { $rss_items = array(); }
}

$charset = get_option( 'blog_charset' );
header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . $charset, true );
?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
<?php do_action('rss2_ns'); ?>>
<channel>
<title><?php bloginfo_rss( 'name' ); ?> Hunt 

Open in new window

0
I've got a strange problem with WordPress (4..9.8) That has just started. I can upload images, but when I select them the details are no longer shown on the right, like so...

screenshot
And The button to insert them into posts is not selectable?

Anyone got a clue how to fix this, Its killed my productivity?
0
Hi,

I am attempting to change a 'Message' text field to a text area on a shortcode form element part of the Enfold Wordpress theme. To get a better idea of what I mean please check this url:

http://www.headstudios.com.au/mailchimp-form-test/

As you can see this is a form that is linked to my Mailchimp list - it works perfect - except I would like the Message text field to be a text area. Since this shortcode is generated by a bunch of complex code in the Enfold theme I had asked them how this could be done - and you can see the question (and their answers) in the URL below:

https://kriesi.at/support/topic/make-message-text-area/

I am confused about the code that is recommended RE: apply_filters etc.

You can see the mailchimp.php code in the link below:
https://pastebin.com/bhszS5xw

I am confused about the advice - and I should mention that the link I had provided was to a page that is now removed - so the id of the form fields could be different - I have recreated the form since then.

Anyway I was wondering if anyone could clarify how I could apply their code to the real life example of the form here:

http://www.headstudios.com.au/mailchimp-form-test/

Any input would be much appreciated.

Thanks
0
I am needing to compress images in my media library for WordPress and when I try to upload the changed images I get this message:

https://gyazo.com/5af8526879a73fa54b0a1b70708c81bf

The original file is 25K and the compressed file is 19K.  This isn't much but I have lots of images that will need to be uploaded in the same manner.  In which the only thing that will be different is their file size.

Please tell me how I can get this accomplished thru Dreamweaver CC 2018.

Thanks,
0
I've been successfully experimenting with interfacing with WordPress's REST API using React.  I've enabled CORS for the remote WordPress site (by modifying it's .htaccess file), and I've succeeded at consuming the JSON data from the API and displaying it by rendering it in my App.js file.  

The code for my App.js file is as follows:

import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';

import { 
  BrowserRouter,
  Switch, 
  Route
} from 'react-router-dom';

import Home from './components/Home';
import Accounts from './components/Accounts';

class App extends Component {

  constructor() {
    super();
    this.state = {
      accounts: []
    }
  }

componentDidMount() {
  let accountsURL = 'https://mywordpresssite.com/wp-json/wp/v2/posts';
  fetch(accountsURL)
  .then(response => response.json())
  .then(response => {
    this.setState({
      accounts: response
    })
  })
}

  render() {

    let accounts = this.state.accounts.map((account, index) => {

    return (    
        <div key={index}>
          <p>{account.title.rendered}</p>
          <hr/>
        </div>   
      )
    });      

    return (
      <div className="App">

        <header className="App-header">
          <br />
          <img src={logo} className="App-logo" alt="logo" />
        </header>

        <br />     

        {accounts}

        <div className="row">
          <BrowserRouter>
            <Switch>
              <Route path="/" exact 

Open in new window

0
Hey all,

I am trying to finish off an RSS script for our wordpress site.  We have 1200 jobs, and vendors want to access our feed to get these jobs.  the normal feed crashes, if you have over 400 jobs in the feed.

I tried following along to a solution on here, about creating a script which would cache the rss file, and loop through the jobs, and write 100 at a time, and then flush the memory, allowing me to have all 1200 jobs in a single rss file.  

When i goto https://cretecarrierdev.local/feed/testcretefeed  it downloads a file in the browser with 100 jobs in.  It creates a directory and file 'rsscache/testcrete.rss". But in testcrete.rss there is only 1 job?

Can you help me modify the template below, so it will write all 1200 jobs to testcrete.rss, and not be a huge memory issue?

<?php
/**
* Template Name: Custom RSS Template - testcretefeed
*/
$postCount = 500; // The number of posts to show in the feed
if(!file_exists("rsscache"))
{
  mkdir("rsscache");
}
$posts_per_page = 100;
$paged = 0;
$theres_more = true;
while($theres_more)
{
  $result = query_posts( array(  
    'post_type' => 'job_listing', 
    'paged' => $paged, 
    'posts_per_page' => $posts_per_page, 
    'tax_query' => array( 
        array( 
            'taxonomy' => 'job_listing_type', //or tag or custom taxonomy
            'field' => 'id', 
            'terms' => array('497') 
        ) 
    ) 
  ) );
  $number_of_results = $result->found_posts;
while(have_posts()) : the_post(); ?>

Open in new window

0
I have a new installation of woo commerce and I have noticed the urls are inconsistent regarding my products on the site.  Some urls are showing the product id and others aren't.  My preference is to not show the id.

https://www.theherbsplace.com/product/sf_p_1458/[code] - With id

[code]https://www.theherbsplace.com/product/neroli-organic-5-ml-100-pure-essential-oil/

Open in new window

- Without id

It seems when the id is in the url it goes to a category page first rather than the single product page.

I have tried changing the perma-links to something else then saving them.  Then immediately putting them back to their original setting and save again but there was no change.

Please show me how to get the product url's consistent with no id on them.
0
I have a wordpress website and there is a responsive menu that shows the menu when viewing the site on mobile device. (the button is three horizontal lines)
i want to add a code on this button that will also scroll the page on top.
the button is on the header of the page
please help
0
Hi Have a wordpress site that has been build for me. It has been uploaded to BT hosting service, but I need someone who knows how to complete the install and link an SQL file that came with the site.
0
Hi,

My site seems to be loading slow on my computer and I don't know why this is. I am with GoDaddy the hosting provider and for me there are times when it takes 10 seconds for a blog page to load.

I have done some independent speed test - and Pingdom for example - gave it a C score.

I was wondering - is anyone aware of what I can do to speed it up? Is there a way to see how much of the issues that I am facing are caused by a server error?

Also - I suspect that it could be caused by my Cloudflare and various redirects - this is just a hunch but I thought I'd throw it out there.

Any input would be much appreciated.

Thanks
0
Hi,

I have a form located here: www.headstudios.com.au/sample-mailchimp-form/

This is a Mailchimp sign up form that comes standard with the Enfold Wordpress template. What I would like to do is to modify it so that the 'Message' field is a textarea.

When I try to change this manually in the inspector the validation and the submission options don't work.

What I would like to do is to know what elements have to be changed in the JS so that this form works to submit as a textarea - which will pass both the validation (so it becomes green if you try to submit without an email) and the PHP submission. I assume that once it passes PHP submission it won't matter on the php processing page whether or not it's a text area since it'll only receive the data.

Any input would be much appreciated.

Thanks
0
NinjaForms with wordpress - I have created a Ninja form that inputs custom values (ROW_IDs from another table) when the form is submitted.

Example:
Q1: What type of bar do you own
A) Dance club = integer value 7
B) Wine bar = integer value 1
C) Speak-Easy = integer value 12

When I get the form emailed to me it looks great..like this:
Dance club | 7

However I finding the form submission data is not as easy as I thought. In the past when I have used "form builder", the submission data is written to a single easily identified table and is stored in a way that is very easy to query and join to other custom tables I have created.

What I am looking for is help creating a SQL query that I can use in a view that will give me the Ninja form output in the same format as the HTML email: QUESTION VALUE

WordPress 4.9.7
Ninja Forms Version 3.0.34
FORM_ID = 3

Thanks in advance experts!
0
Hi,

I was wondering if anyone can tell me where the validation code is for the form located in headstudios.com.au/hsfast

If the form is not entered correctly.

Thanks
0
Hi Experts,

I am having some issues with my custom rss feeds, in wordpress.   I'm using the wp-job manager plugin, and have 3 custom feeds.

https://cretecarrier.com/feed/cretefeed
https://cretecarrier.com/feed/shafferfeed
https://cretecarrier.com/feed/huntfeed

The problem i am having is Crete has around 1100 active jobs, but if i try to have all 1100 jobs in the feed it crashes. I currently get around 400-500 without crashing.  The memory of the site is already at 768M, and cannot go up anymore.

I've attached the template for https://cretecarrier.com/feed/cretefeed

Any ideas on how i could improve this so that i can show all 1100 jobs in the feed and not crash?

<?php
/**
* Template Name: Custom RSS Template - cretefeed
*/
$postCount = 500; // The number of posts to show in the feed
$postType = 'job_listing'; // post type to display in the feed
$taxonomy = 'job_listing_type';
//query_posts( array( 'post_type' => $postType, 'showposts' => $postCount,  ) ); 

query_posts( array(  
    'post_type' => 'job_listing', 
    'paged' => $paged, 
    'posts_per_page' => 500, 
    'tax_query' => array( 
        array( 
            'taxonomy' => 'job_listing_type', //or tag or custom taxonomy
            'field' => 'id', 
            'terms' => array('497') 
        ) 
    ) 
) );

$charset = get_option( 'blog_charset' );
header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . $charset, true );
?>
<rss version="2.0" 

Open in new window

0
I used do a lot of Classic ASP!

Now on a Wordpress site, I want to have a QUIZ, with some questions and dropdowns and textboxes, with Submit buttons.
I need to collect the answers in a database table, grab username, store in session variable (as need several pages).

Can someone point me in the right direction please?

Thanks
0
Hi,

I am trying to move my blog posts with featured images from my old site to my new site. I have tried to do this with Wordpress' built in Import/Export tool however it has only imported the blog posts without the featured images attached.

Please note that I don't have the option during export to export the images:
https://screenshots.firefox.com/b2wfEFNJBaOhzJSs/www.headstudios.com.au

What I would like to do is the following:
- Export the current blog posts along with the featured images (please note I have uploaded all the images into the new site's uploads folder)
- Overwrite the current blog posts (the blog posts are correct - I just want to make it so they point to the featured images - so I would need to just update them)

Thanks
0
Hello,

I just added SSL to my website. My site is a wordpress site. As my server was not enforcing the use of SSL, I added the redirect code to my .htaccess file. But after adding the redirect code, my wordpress admin dashboard does not open. When I remove the code from .htaccess file, the admin dashboard functions properly but my home page does not show https and security lock. It shows a small circle which shows not secure. All other pages of my site are properly showing https and security lock. Following is the redirect code I added to .htaccess file.

RewriteCond %{HTTP_HOST} witage\.net [NC] 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.witage.net/$1 [R,L]

Open in new window


Can somebody help me on this.
Regards
Saxena
0
I am having a VERY tough time with this.  This is a wordpress site.  Its a CSS/PHP issue.  Each entry from DB has a picture, name, title.  I want to line them up left to right. 2 people per row.

Here is the code:
<style>
				.ev-speaker-img {
					max-width: 250px;
				}
				
				.ev-list-row {
    				display: table;
    				width: 100%; /*Optional*/
    				table-layout: fixed; /*Optional*/
    				border-spacing: 10px; /*Optional*/
				}
				.ev-list-column	{
					display: table-cell;
				}
</style>
				<?php if($rows): ?>
					<?php foreach($rows as $row): ?>
					<div class="ev-list-row">
					<div class="ev-list-column">
						<img class="ev-speaker-img" src="<?= $row['speaker_image']; ?>"/><br>
						<?= $row['speaker_name']; ?><br>
						<?= $row['speaker_title']; ?>
					</div>
					</div>
					<?php endforeach; ?>
				<?php endif; ?>

Open in new window


Each entry seems to be its own row, no matter how I configure this from a CSS perspective.  Im out of ideas.
0
I'm trying to move a web-app built in html, css and js to Wordpress running the Genesis Theme.
The app uses Leaflet.js to display a map on which the user can navigate and click to perform an action with that place.

In the original web-app, all the css and scripts required were loaded in the header section of the html page. In the Wordpress version they are called from a php file in the plugin which uses
wp_register_script(ScriptName, scriptURL)

Open in new window

and then
wp_enqueue_script(ScriptName)

Open in new window

for each of the scripts.

The Wordpress version is available to view at https://notetheplace.app - if you go there you will see it displays the map OK. But nothing happens when you click on it. looking at the browser console, you will see the error - "leaflet.js?ver=1.3.1:5 Uncaught TypeError: t.addLayer is not a function" - so it appears to be having trouble reaching the leaflet script even though it is loaded when the page loads.

If you look at the page source, you'll see that the actual html for the map section, plus the javascript required to render it, have been embedded after the closing </body> tag.

So I'm obviously doing something wrong...

Can anyone explain to me how I should structure this page as a Child Theme template so that the scripts can be called when the map is clicked?

This is the current structure of the template page. What structure should it have to ensure the html appears within the <body> tags instead of after them... if indeed that is the problem - its likely there may be more than one... can anyone help?


Open in new window

0
Hi,

I am attempting to update my Wordpress website but am having issues. Firstly when I go to the Updates page it doesn't actually give me the option to update from the Dashboard.

http://prntscr.com/kcpqs9
http://prntscr.com/kcpqxw

I'm currently on a very old version. I tried to update manually from File Manager by copy the wp-admin and wp-includes from a fresh Wordpress install but when I do that I just get a white screen of death (with no errors reported).

Any idea why my site is crashing like this?

Any input would be much appreciated - otherwise I will just try to setup a new WP install and start copying files over and see if that works.

Thanks
0
When I upload an image to the Wordpress media section the permissions for the file uploaded are not propagating correctly.
I am using a temp folder in the website for the upload process and the IIS_Iusrs group is not getting read permission on the image.

the temp folder and the upload folder has the IIS_Iusrs group set to full control but the image uploaded they end with special permissions which indicate that the group can see the file but not read it.

any resized images of the original do get the correct permissions for all groups and users (full control).

I have replaced the permission (resetting inheritance several times) and created a new folder for the image to upload into.
Resetting the permission manually does hold and you can view the image via browser.



I am working on a Wordpress website running under IIS on a windows 2016 server.
0
This plugin required woocommerce installed - URGENT, site down!
https://www.cartdial.com
0
I need to re-build a legacy PHP-based site using WordPress, and one of the challenges that I'm facing is that I need to find a way to somehow convert an image gallery into ...

1) A print friendly version of the gallery that contains all of the images in a thumbnail grid (with 3 images per row)
2) A downloadable multi-page PDF file that has all of the images stacked one on top of the other - with 2 images on each page
3) A downloadable ZIP file that contains all of the images in it (preferably generated on the fly)

You can see an example of what I'm talking about on this page:

http://www.miamisites.com/www/locations/?c=138&l=205

You can click on the 3 rightmost icons underneath the gallery to see examples of each of the functionalities I've described (ie: Download images, Print View & PDF Download)

My assumption is that I'll need to create some similar PHP scripts that have the post ID values passed to them via URL parameters, and that I'll then need to somehow extract all of the gallery image URLs from the content so that I can either format/render them accordingly, or create a zip archive that contains them, etc.  

Does anyone here have any suggestions as to how I might achieve something like this using PHP, .. using either the techniques I've described or something similar/better?

Thanks,
- Yvan
0
What Wordpress plugins or other things would be a good starting point to make a website similar to Patreon.com
0

WordPress

WordPress is a free and open-source content management system (CMS) based on PHP and MySQL for creating websites and blogs. Features include a plugin architecture, a template system and strong management, customization and search systems; through its dynamic presentation of content, webmasters have the flexibility to create websites easily.