Jump to content

Search the Community

Showing results for tags 'theme'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 5 results

  1. Hi ~ I am having problems with the below code switching our 11 different full-HTML themes to our one mobile theme. The code in black was what we had initially, and I added the code that I have bolded red. I'm guessing I probably just have stuff in the wrong order, because I am quite new to PHP, but not really sure. Any insight and assistance would be greatly appreciated. function settheme() { $theme = 'default'; $theme_param = getUrlParm('theme'); if ($theme_param) { $theme_param = strtolower($theme_param); } $theme_session = $this->CI->session->getSessionData('theme'); if ($theme_param) { $theme = $theme_param; } else { if ($theme_session) { $theme = $theme_session; } if (($theme = "euf/assets/themes/$theme") && array_key_exists($theme, $CI->themes->setTheme())) { setcookie('theme', $setTheme, 0, '/'); $CI->themes->setTheme($theme); } elseif (((strpos($_SERVER['HTTP_USER_AGENT'], 'iphone', 'Android', 'webOS', 'ipad', 'Blackberry') != false)) && ($theme = "euf/assets/themes/mobile") && array_key_exists($theme, $CI->themes->setTheme())) { $theme = "/euf/assets/themes/mobile"; $CI->themes->setTheme($theme); } elseif (($setTheme = $_COOKIE['theme']) && ($theme = "euf/assets/themes/$theme") && array_key_exists($theme, $CI->themes->setTheme())) { $theme = "/euf/assets/themes/$theme"; $CI->themes->setTheme($theme); } if ($theme !== $theme_session) { $this->CI->session->setSessionData(array('theme' => $theme)); } $CI =& get_instance(); if ($theme) { $theme = "/euf/assets/themes/$theme"; $CI->themes->setTheme($theme); } } }
  2. Hi Guys Struggling to get this working. This code appears on my page-blog.php When the links are clicked the url changes to /page/2/ etc but the posts themselves don’t change. I have some very similar code in my single.php and its working fine. My code is below, what am I doing wrong? <section role="main"> <?php $page = get_page_by_title('the blog'); $content = apply_filters('the_content', $page->post_content); echo $content; ?> <?php $blog_posts = new WP_Query(); $blog_posts->query('showposts=5'); if ( $blog_posts->have_posts() ) : while ( $blog_posts->have_posts() ) : $blog_posts->the_post(); ?> <article> <?php the_title(); ?> </article> <?php endwhile; ?> <nav id="post-nav"> <span class="prev"><?php next_posts_link( '← View Older Posts', $blog_posts->max_num_pages ); ?></span> <?php previous_posts_link('<span class="next">' .( 'View more Recent Posts →' ). '</span>'); ?> </nav> <?php else: ?> <p>Sorry it looks like you need to add some posts to this blog!</p> <?php endif; wp_reset_query(); ?> </section>
  3. Hi Guys i am getting the following error when trying to install a theme in my wordpress. "Parse error: syntax error, unexpected '}' in /home/partypor/rightawayprinting.com/wp-content/themes/daisho/framework/admin/background-menu.php on line 1" This is the code for the background-menu.php. Can someone please help me find whats wrong. Thanks! <?php add_action( 'admin_init', 'backgroundmenuregs' ); add_action( 'wp_head', 'add_bg_changerstyle' ); function backgroundmenuregs(){ wp_enqueue_script('jquery'); wp_register_style( 'FlowTypographyMainStylesheet', WP_PLUGIN_URL . '/typography/js/colorpicker/css/colorpicker.css' ); wp_register_style( 'FlowTypographyLayoutStylesheet', WP_PLUGIN_URL . '/typography/js/colorpicker/css/layout.css' ); wp_register_script('jquery_colorpicker_script', WP_PLUGIN_URL . '/typography/js/colorpicker/js/colorpicker.js', array('jquery'), '1.0' ); wp_enqueue_style( 'FlowTypographyMainStylesheet' ); wp_enqueue_style( 'FlowTypographyLayoutStylesheet' ); wp_enqueue_script('jquery_colorpicker_script'); } function add_bg_menu(){ //must check that the user has the required capability if (!current_user_can('manage_options')) { wp_die( __('You do not have sufficient permissions to access this page.') ); } echo '<div class="wrap">'; echo "<h2>" . __( 'Styling', 'menu-test' ) . "</h2>"; if($_POST['bg_submit_h'] && $_POST['bg_submit_h'] == "Y"){ $bgrepeat = array("repeat"=>"repeat","repeatx"=>"repeat-x","repeaty"=>"repeat-y","norepeat"=>"no-repeat"); update_option("bgchanger_color", $_POST['bc']); update_option("bgchanger_imgsrc", $_POST['bi']); if($_POST['bpx'] == "left" || $_POST['bpx'] == "center" || $_POST['bpx'] == "right"){ update_option("bgchanger_posx", $_POST['bpx']); } if($_POST['bpy'] == "top" || $_POST['bpy'] == "center" || $_POST['bpy'] == "bottom"){ update_option("bgchanger_posy", $_POST['bpy']); } if($_POST['ba'] == "fixed" || $_POST['ba'] == "scroll"){ update_option("bgchanger_attach", $_POST['ba']); } if(array_key_exists($_POST['br'], $bgrepeat)){ update_option("bgchanger_repeat", $bgrepeat[$_POST['br']]); } ?> <div class="updated"><p><strong><?php _e('settings saved.', 'menu-test' ); ?></strong></p></div> <?php } $bgcval_bc = get_option("bgchanger_color"); $bgcval_bi = get_option("bgchanger_imgsrc"); $bgcval_bpx = get_option("bgchanger_posx"); $bgcval_bpy = get_option("bgchanger_posy"); $bgcval_ba = get_option("bgchanger_attach"); $bgcval_br = get_option("bgchanger_repeat"); ?> <script type="text/javascript">jQuery(document).ready(function(){jQuery(".attcolorpicker").each(function(){jQuery(this).ColorPicker({onShow:function(cp){jQuery(cp).fadeIn(500);return false;},onHide:function(cp){jQuery(cp).fadeOut(500);return false;},onChange:function(hsb, hex, rgb){jQuery(this).parent().find('.attcolorpicker').val('#'+hex);jQuery(this).parent().find('.colorSelector div').css('backgroundColor', '#'+hex);jQuery(this).parent().find('.colorSelector').ColorPickerSetColor(hex);}});jQuery(this).parent().find('.colorSelector').ColorPicker({onShow:function(cp){jQuery(cp).fadeIn(500);return false;},onHide:function(cp){jQuery(cp).fadeOut(500);return false;},onChange:function(hsb, hex, rgb){jQuery(this).parent().find('.attcolorpicker').val('#'+hex);jQuery(this).parent().find('.colorSelector div').css('backgroundColor', '#'+hex);jQuery(this).parent().find('.attcolorpicker').ColorPickerSetColor(hex);}});});});</script> <form method="post" action=""> <table class="form-table"> <tr><th>Background color</th><td> <input type="text" class="attcolorpicker" name="bc" value="<?php if($bgcval_bc) print($bgcval_bc); ?>"> <div class="colorSelector"><div<?php if($bgcval_bc) print(" style=\"background-color:".$bgcval_bc.";\""); ?>></div></div> </td></tr> <tr><th>Background image</th><td><input type="text" name="bi" value="<?php if($bgcval_bi) print($bgcval_bi); ?>"><span href="#" title="" class="briskuploader button">Upload</span><br/><div class="briskuploader_preview"></div></td></tr> <tr><th>Background position</th><td><select name="bpx"><option value="left"<?php if($bgcval_bpx=="left") print(" selected=\"selected\""); ?>>left</option><option value="center"<?php if($bgcval_bpx=="center") print(" selected=\"selected\""); ?>>center</option><option value="right"<?php if($bgcval_bpx=="right") print(" selected=\"selected\""); ?>>right</option></select><select name="bpy"><option value="top"<?php if($bgcval_bpy=="top") print(" selected=\"selected\""); ?>>top</option><option value="center"<?php if($bgcval_bpy=="center") print(" selected=\"selected\""); ?>>center</option><option value="bottom"<?php if($bgcval_bpy=="bottom") print(" selected=\"selected\""); ?>>bottom</option></select></td></tr> <tr><th>Background attachment</th><td><select name="ba"><option value="scroll"<?php if($bgcval_ba=="scroll") print(" selected=\"selected\""); ?>>Scroll</option><option value="fixed"<?php if($bgcval_ba=="fixed") print(" selected=\"selected\""); ?>>Fixed</option></select></td></tr> <tr><th>Background repeat</th><td><select name="br"><option value="repeat"<?php if($bgcval_br=="repeat") print(" selected=\"selected\""); ?>>repeat</option><option value="repeatx"<?php if($bgcval_br=="repeat-x") print(" selected=\"selected\""); ?>>repeat-x</option><option value="repeaty"<?php if($bgcval_br=="repeat-y") print(" selected=\"selected\""); ?>>repeat-y</option><option value="norepeat"<?php if($bgcval_br=="no-repeat") print(" selected=\"selected\""); ?>>no-repeat</option></td></tr> </table> <p class="submit"> <input type="hidden" name="bg_submit_h" value="Y"> <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" /> </p> </form> </div> <?php } function add_bg_changerstyle(){ $bgcval_bc = get_option("bgchanger_color"); $bgcval_bi = get_option("bgchanger_imgsrc"); if($bgcval_bc || $bgcval_bi){ print("<style type=\"text/css\"> body{ "); if($bgcval_bc){ print("background-color:".$bgcval_bc.";"); } if($bgcval_bi){ if($bgcval_bi == "none"){ print("background-image:none;"); }else{ print("background-image:url(".$bgcval_bi.");"); $bgcval_bpx = get_option("bgchanger_posx"); $bgcval_bpy = get_option("bgchanger_posy"); $bgcval_ba = get_option("bgchanger_attach"); $bgcval_br = get_option("bgchanger_repeat"); if($bgcval_bpx == "left" || $bgcval_bpx == "center" || $bgcval_bpx == "right"){ if($bgcval_bpy == "top" || $bgcval_bpy == "center" || $bgcval_bpy == "bottom"){ print("background-position:".$bgcval_bpx." ".$bgcval_bpy.";"); } } if($bgcval_ba == "fixed" || $bgcval_ba == "scroll"){ print("background-attachment:".$bgcval_ba.";"); } if($bgcval_br == "repeat" || $bgcval_br == "repeat-x" || $bgcval_br == "repeat-y" || $bgcval_br == "no-repeat"){ print("background-repeat:".$bgcval_br.";"); } } } print(" } </style>"); } } ?>
  4. Hello everyone, This is very weird, I have installed a theme, modified it, and it was working great, after a while, the theme started appearing in the admin area please check screenshot to see what I mean I don't know what caused this or how to fix it any help?
  5. Hope this is the right topic for my problem and maybe someone can help me with this! My blog is in wordpress and when you look at the default category page it looks empty, just plain post list so i figured it would be nice to have last few category posts before the content. With the theme which I'm using silverOrchid i already have front page slider which i like so i would like to copy that slider in the category.php which i created earlier and change it to show and change latest posts per category which users are reading. Here is slider code from index.php //include slider if ( $gazpo_settings['gazpo_show_slider'] == 1 ) { get_template_part('includes/slider'); } So my question is how to change this code (if possible) to show latest posts from category which users are reading? I tried a few different forum threads but non of them seams understandable enough for me so i would appreciate help .... thanx
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.