Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4126368
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T00:01:22+00:00 2026-05-21T00:01:22+00:00

I am using the wordpress shopp plugin to sell products on my site. On

  • 0

I am using the wordpress shopp plugin to sell products on my site. On my template file, I am using a shopp short code to display a particular category. It looks like this:

<?php shopp('catalog','category','load=true&id=16'); ?>

I would like the number 16 to be changeable, so I have stored the correct dynamic number in a variable as follows:

<?php $shopid = get_field('store_id'); ?>

The Variable $shopid is the correct number that should replace the ‘16‘ above. The question is, how do I place a variable in the shopp shortcode? I tried as follows without luck:

<?php shopp('catalog','category','load=true&id=$shopid'); ?>

Any ideas how to pull this off?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T00:01:23+00:00Added an answer on May 21, 2026 at 12:01 am

    Within single-quoted strings variables are not getting replaced by their values:

    Note: Unlike the double-quoted and heredoc syntaxes, variables and escape sequences for special characters will not be expanded when they occur in single quoted strings.

    Use double quotes or string concatenation instead:

    shopp('catalog','category',"load=true&id=$shopid")
    shopp('catalog','category','load=true&id='.$shopid)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a wordpress plugin called shopp sell products, and one aspect of
I am using Wordpress Custom Field Template Plugin - http://wordpress.org/extend/plugins/custom-field-template/ I create some File
Im using wordpress to develop a site ... im doing the template in a
Im using wordpress to develop a site ... I want to display everything in
I am using wordpress and use custom permalink structure: /%category%/%postname%/ My problem is that
I created a site using wordpress. I installed the 'starkers' theme and modified it.
I just started out using wordpress as a CMS. On the site I have
I'm putting up a site using Wordpress and I'd like to piggyback on its
I'm using a wordpress backend on my site and displaying the articles via my
Im using wordpress 3.0 here: http://www.adventure-service.com On homepage i am using template that creates

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.