Tag Info

New answers tagged

0

what framework do you use for your theme-panel? You need to make image upload into your theme panel page and a line of code to call it everywhere of your theme you want. This is an example: in theme panel function page $options[] = array( 'name' => __('Introduction Image', 'options_check'), 'desc' => __('This is your site logo.', ...


0

I think you are doing this right... but in the wrong direction. What if you separate your default structure like: content-header.php <?php get_header(); get_sidebar(); ?> <div id="content"> content-footer.php </div> <?php get_footer(); ?> And then you can use get_template_part to put all together: index.php <?php ...


0

Have you look for a plugin called ACF (Advanced Custom Fields) the plugin can be found here: https://wordpress.org/plugins/advanced-custom-fields/ with this plugin you can add as many custom fields as you want and also there is the logic functionality in the plugin you can make dependencies. for example you want to create some additional custom field for ...


0

If you have sucessfully added option field in Theme options; Now you just need to call it on front end. For that just use get_option( $option, $default ); For example if you are saving your social link with key "text_box_value", then you can simply call it in front end as following; <a href="<?php echo get_option( 'text_box_value' , '#' ); ...


0

If you look at how the code works, you should notice that theme mods are saved in the *_options table under theme_mods_{theme_slug} with the theme slug being, as near as I can tell, the directory name containing the theme stylesheet, so: $ptheme = get_template_directory(); $theme_slug = basename($ptheme); $mods = get_option( "theme_mods_$theme_slug"); As ...


0

I have just upgraded a large WordPress site through a number of environments, taking each one completely offline whilst I performed the upgrade. We're using IIS as the web server, but since I appreciate most people use Apache, I'll try and keep the steps as generic as possible to apply to both setups. These are the steps: Take site offline (bear in mind ...


0

Well what is part of the blog and what belongs to the rest of the site will probably differ so it is hard to split. E.g. is header and footer the same? Anything else that is shared? Anyway, here are two options: 1.Separate instances If the blog and the rest of the site look totally different you may consider separate WordPress installs or a Multisite ...


0

I would get a copy of the files and then work locally using VVV, MAMP or whatever your tool of choice is. WP_Engine allows for git deploys so you could work locally and use git for version control and back up as well as deploy the changes as needed.


1

Have you tried is_front_page()? It should do what you're looking to do. Unless you've set up front-page.php with the Page Template commented header syntax that identifies the file is a Page Template, I don't think you can use the is_page_template() or get_page_template() functions. As for the category page, if you are loading category-foo.php, then aren't ...


0

You can use this software for free only for no-profit projects. This restriction is not compatible with the GPL which says: This License explicitly affirms your unlimited permission to run the unmodified Program. Either ask the author to put the code under a GPL compatible license, or remove that dependency from your code.


0

The problem was with exclude_from_search parameter when I registered the post type. exclude_from_search (boolean) (importance) Whether to exclude posts with this post type from front end search results. Default: value of the opposite of public argument 'true' - site/?s=search-term will not include posts of this post type. 'false' - ...


0

You should follow appropriate naming convention (aka Template Hierarchy) of your templates to make your job done. If I'm clear about your query here then I'd suggest you to name your custom taxonomy archive template(s) as "taxonomy-{your-taxonomy-name-here}.php" (i.e. taxonomy-vegetable.php, taxonomy-fruit.php and so on) There must not be any blank ...


0

About the link you provided The black bar is part of the .pagewrapper but there is no width specified for pagewrapper. .pagewrapper { left: 0; position: relative; transition: left 500ms ease-in-out 0s; } The post content is set a max-width: 700px, it will not extend the boundary. .wrapper { margin: 0 auto; max-width: 700px; width: 90%; } ...


0

You have wp_head_callback as parameter at your arguments array, which is wrong. It should be wp-head-callback which is the correct spelling. Because of the wrong spelling the default value for wp-head-callback which is _custom_background_cb has been used, as the wrong spelling is unknown to Wordpress - of course.


1

As suggested, went to the function reference and from there to the Source File (located in wp_includes/link-template.php) in which there are four functions that each return similar results. <?php echo get_post_permalink() ?> http://newdep.localhost/instruments/jester/ <?php echo post_permalink() ?> ...


1

As Nilambar mentioned, the correct function is <?php the_permalink(); ?>. However, if you are using trial and error - try the WordPress Codex, particularly the_permalink for more info, examples and related functions.


0

It is extremely unlikely that code file of identical content would behave differently. From your description of situation I see two possibilities: File does get changed for some reason, you should not only upload clean copy, but actually compare what you have on server at that point against what you have locally You are mis-identifying upload as the key ...


0

This is my personal view if I am the theme user. I would say it depends on the theme features If it's a one page theme? I will like to have all the options in the customizer window. If it's a niche/app based theme? I will just use the customizer for basic options and setup all the other options in my very Theme options panel in Admin Area.


2

That's the Jetpack Stats image, it's necessary to track the stats. You can disable it by disabling Jetpack Stats but it shouldn't be full width, that will be a CSS problem


0

As @Tom J Nowell says, don't nest functions. Just write them normally: function my_theme_prefix_setup() { // Add theme support etc. } add_action( 'after_setup_theme', 'my_theme_prefix_setup' ); function my_theme_prefix_init() { // Register a post type } add_action( 'init', 'my_theme_prefix_init' ); Or using a class: class my_theme { ...


0

I'm not familiar with the Cherry Framework but a quick search looks like the theme options allow for "Custom CSS" right under the General tab. To quote: Custom CSS - if you need to add some CSS rules, but you don't want to mess with the main CSS file, you can use this field. Just insert your new css rules. ...


0

Solved (edit: May 7, 2015) A while ago I deleted header('Content-Type: image/png'); and it magically works. I used to use comments (//header('Content-Type: image/png');) to disable it, but that didn't seem to do the trick.


1

Any reason you've chosen Docker over other virtual solutions like Vagrant? I prefer to use Bedrock, which is a modern take on the Wordpress stack using Vagrant for managing environments (from the guys that made the Roots aka Sage starter theme for Wordpress). https://roots.io/bedrock/


0

This may not be the exact answer to the problem. But it helped me to solved the very problem we are discussing. As using 'transport' => 'postMessage', I was not able to see previews lively. So I created new files using the following code at Github I just copy pasted this code. Verified it and then tweaked it according to my requirements. I know this is ...


0

I was trying the same thing to achieve this but finally i found a better solution here. It works with regular taxonomies (categories) and also work with custom taxonomies. You should check its code inside or can use it as it is if the requirements are the same.


0

Remove a pre exising customizer setting in wordpress theme with this code. add_action( "customize_register", "ruth_sherman_theme_customize_register" ); function ruth_sherman_theme_customize_register( $wp_customize ) { //============================================================= // Remove header image and widgets option from theme customizer ...


1

I'm going to post a partial answer to start the discussion in the hope of getting some helpful comments to fill in the blanks or alternative answers... Step 1: Install and Set Up boot2docker Docker only runs on Linux. So in order to use Docker on our Mac, we need to install boot2docker, which will run Docker in a Linux VM. You can install boot2docker using ...


0

Have you looked at 'wocker'? It uses docker within Vagrant.


1

Concur with @perpetualstudent about offline development. If you start by installing on the webserver, then always copy in the direction of your PC dev you won't be overriding user data. There are two fields in wp_options table that need to be modified each time you copy the database, these are siteurl and home that need to change to point to your local PC ...


1

The taxonomy-$taxonomy-$term.php template is a template for an archive, a listing. It's not a template for a post, be it a post of type page, or anything else. It overrides taxonomy-$taxonomy.php, then taxonomy.php, then archive.php followed by index.php


1

One thing you might want to do is add this code to the output: <pre><?php print_r($meta); ?></pre> Then have a look and make sure you are accessing the correct array keys. Once your sure, I think you need to verify checkboxes against a value of on or off. So you may need to change this line: if ($meta['is_offered'][0]==true){ ... to ...


3

I think you're over thinking things. I'd simply create a new Custom Post in the plugin. That will come with it's own backend automatically. You can then create the individual pages based on the Template Hierarchy for both the listings and individual pages. For any additional fields you need, you can either set the meta fields to show on the backend or add ...


0

This is a bit of a broad question and I don't have time to hash out the whole thing, but your search code needs to modify the query something very much like: add_action( 'pre_get_posts', function ($qry) { if ($qry->is_search()) { $qry->set('orderby','title'); } } ); I have a feeling a lot of details are missing from the question ...



Top 50 recent answers are included