According to the Easy Digital Downloads support page, the way to fix this, is by editing the .php files, but to be honest, I’ve never changed anything in these files and it’s really above my capabilities. If I break anything, I won’t be able to fix it.
Is there any other easier way to let the download display on a full-width page instead of the standard?
According to the EDD support page EDD will use the single.php template file in your theme to display the download page. The single.php template will oftentimes include a call to the sidebar using the get_sidebar() function.
So my question is if there is any way that I can override the get_sidebar() function on a single download using the Additional CSS tab?
?php get_sidebar(parts); ?>
<?php get_sidebar(cos); ?>
They show up fine but getting an alert right before stating:
Warning: Use of undefined constant parts – assumed ‘parts’ (this will throw an Error in a future version of PHP) in /nas/content/staging/airtechsite/wp-content/themes/air2017-child/parts-page.php on line 30
Now I’m not getting those on the live site, only on the staging, which is using a different URL. Anyone know what’s causing this warning and how I can fix it? I’m running php 7.2. Thanks.
]]>Hoping somebody might be able to help troubleshoot adding sidebars to my site. Using the Themetrust Hardy theme.
https://74.205.124.17/~centerrocks/?page_id=972
I’d like to be able to customize a sidebar for each navbar category, i.e. “ABOUT” and “AWARDS & GRANTS” and so on.
I started with “ABOUT,” adding a new php page template called “page-about.php.”
<?php
/*
Template Name: About
*/
?>
<?php get_header(); ?>
<?php if(!is_front_page()):?>
<div id="pageHead">
<div class="inside">
<h1><?php the_title(); ?></h1>
<?php $page_description = get_post_meta($post->ID, "_ttrust_page_description", true); ?>
<?php if ($page_description) : ?>
<p><?php echo $page_description; ?></p>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<div class="wrap">
<div class="middle clearfix">
<div id="content" class="twoThirds clearfix">
<?php while (have_posts()) : the_post(); ?>
<div <?php post_class('clearfix'); ?>>
<?php the_content(); ?>
</div>
<?php comments_template('', true); ?>
<?php endwhile; ?>
</div>
<?php get_sidebar('sidebar_2'); ?>
</div>
</div>
<?php get_footer(); ?>
Then I duplicated the sidebar template, calling it “sidebar_2.php.”
<div id="sidebar_2" class="clearfix">
<?php if(is_author()) : ?>
<div class="widgetBox sidebarBox clearfix">
<h3><?php _e('Author Info', 'themetrust'); ?></h3>
<?php global $wp_query; $current_author = $wp_query->get_queried_object(); ?>
<?php echo get_avatar( $current_author->user_email, '80' ); ?>
<p><?php echo $current_author->description; ?></p>
</div>
<?php endif; ?>
<?php
if(is_archive() && is_active_sidebar('sidebar_posts')) : dynamic_sidebar('sidebar_posts');
elseif(is_home() && is_active_sidebar('sidebar_posts')) : dynamic_sidebar('sidebar_posts');
elseif(is_single() && is_active_sidebar('sidebar_posts')) : dynamic_sidebar('sidebar_posts');
elseif(is_page() && is_active_sidebar('sidebar_pages')) : dynamic_sidebar('sidebar_pages');
elseif(is_search() && is_active_sidebar('sidebar_posts')) : dynamic_sidebar('sidebar_pages');
elseif(is_front_page() && is_active_sidebar('sidebar_home')) : dynamic_sidebar('sidebar_home');
else : ?>
<?php if (!dynamic_sidebar('sidebar_2')) ;?>
<?php endif; ?>
</div><!-- end sidebar -->
These were each modified based on my theme’s files.
On the back end, I’ve been able to nest pages under the About template. And in the widgets menu, I see the Sidebar 2 and I can drag and drop widgets beneath it. However, those widgets do not appear on the page after reloading.
Anyone have any tips? Thanks so much for your time.
]]><div id="menusimple">
<?php wp_nav_menu( array( 'theme_location'=>'primary-menu', 'container'=>'menusimple', 'container_class'=>'menu', )); ?>
</div>
Rather than repeating this code in multiple templates, is there a built in tag such as get_header or get_sidebar to call it up?
Something along these lines: https://codex.www.ads-software.com/Stepping_Into_Template_Tags
<?php get_sidebar(); ?>
code in single.php right above the footer, but the sidebar still won’t appear. Any ideas of what else I need to do? Alter sidebar.php somehow? I’d appreciate any help!
Thanks!
My theme:
https://www.ads-software.com/extend/themes/yashfa
My site:
https://www.runkarlarun.com/