WP Plugins won't coexist - wordpress

I am using these 2 plugins:
HTML Page Sitemap
http://wordpress.org/extend/plugins/html-sitemap/installation/
SyntaxHighlighter Evolved
http://wordpress.org/extend/plugins/syntaxhighlighter/
When activating SyntaxHighlighter, HTML Page Sitemap won't render anymore (no output created).
Any idea as to why this may happen?
It's weird because I'd assume these aren't really playing in the same space...
Help is appreciated!
Have a good day!

Wordpress being a wide open playing ground for any number of programmers, beginners and experts alike, can lead to conflicts in a huge number of ways.
My best guess, without looking into the anatomy of each plugin you listed, would be that they are using some common element. Like, for example, a common function name or a common DOM element ID in output.
If the plugin is active, it can be called on every page load. It all depends on who wrote the plugin. You should crack them both open and do some inside investigation.

Related

Add id to elements in wordpress

Im working on a wordpress site and right now a lot of elements has the same id which makes it difficult to customize.
Right now my solution is to add changes to all of the elements which isn't feasible, the difficult part is I am unsure of how to add an ID to the specific element.
Do I do this in the css file or do I edit in php somehow?
Or is it possible to add an ID with some plugin or similar?
There is no short or easy answer to this.
The best way to figure out what's broken in your theme is by looking into the files it contains and how it works. I could not find the Cherry theme that you mentioned in your comment so that I could take a look.
Of course, to understand what's going on you're going to have to know a good amount about how themes are written. I can't suggest a better place to start than the Codex article on theme development. You may get better results (depending on how you learn best) from a web search for something like wp building a theme. I did and I got this and this but I learn best by reading; maybe videos will help you more. Unfortunately, you really won't be able to eliminate this step and it takes time.
Your theme most likely -- if it has been built in the WordPress way -- uses a series of included templates with the get_template() call. As you're looking, this is probably what you want to look for. I remember the first time I dissected a WP theme it was a daunting task and I had already been a very experienced developer for a long time at that point. Don't be discouraged.
Some themes and plugins use actions and filters to allow modification of their content. If your theme does this, modification could be as easy as hooking on a few of the right ones. This will still require figuring out which hooks to attach to.
I may be able to update this answer with something more specific if you point the first 5 or 10 hierarchical children directly below the <body> element in a typical page, like your home page or your blog page.
If this seems too complicated, you're probably best to consider hiring someone who is more familiar with WordPress theme modification to help you out.

Why do people purchase website themes?

I am a newbie in Web designing. I learnt about templates that are available online that people can purchase and change the content according to their requirements.
One thing puzzled me. Why do people purchase themes when they can copy the code using VIEW SOURCE option. I have tried searching the answer but google has failed me.
Also, If I am not using Wordpress, can still I use Wordpress themes for my website.
Thanks!!
Because, while often technologically possible, that's still copyright infringement.
Because WordPress themes usually are more than just their raw HTML/CSS/JS. The PHP logic is frequently pretty complex and important.
1.) Copying source code is stealing. If you're copying the html/css, you'll probably copy the images, too. Definitely could be legal issues in that.
2.) If you decide to try and steal it anyways, you'll notice in a lot of cases they've used Iframes or JavaScript to pull the code in from elsewhere, where you do not have access to it.
3.) Copying CSS and HTML wouldn't do much for a Wordpress site. You wont' be able to copy any of the server-side stuff.
4.) You can't really use the theme because a Wordpress theme comes with functions and much more. You could use the CSS with a lot of hacking.
We can only copy the Html form either full encoding of the sites ie, ref style sheet.
According to the law, copy web design structure, encoding is a crime and Definitely could be legal issues in that.
If you are a newbie in web designing, I suggest you some of the top web designing blog that you should follow.
https://blog.hubspot.com/marketing/web-design-tips
https://blog.techreshape.com/5-web-design-tips-for-a-better-website-user-experience/

css vs dreamweaver templates

what is the difference in performance between css templates and dreamweaver templates , or are they the same. Need to know which one gets indexed quicker by google.
I want to move my website to one the best templates for quick uploads and ftp linkups with linkmanagement tools
please advise
thanks
This is why I despise Dreamweaver and the alike...
Dreamweaver creates websites, which consist of HTML and CSS code, and maybe some JavaScript.
HTML: the "glue". It's the structure which browsers read.
CSS: the "perty stuff". It's what browsers read to determine how to make your page look (colors, layout, etc.).
Since Dreamweaver makes websites, a Dreamweaver template also helps Dreamweaver to make websites, which implies that it follows the above structure.
Templates just style your site and might provide some basic functionality, so they have nothing to do with uploads. Some might be bloated and cause slow loading times, but that's dependent upon the template.
In the end, Dreamweaver Template is more or less CSS + HTML.
A DW template file helps to isolate parts of your HTML code on a page/page basis. Editable content and "locked" content together (in hopes of making development quicker). If you like DW, and have a template you like - 0use it. But don't expect that to be your silver bullet.
There's no advantage to either template where search engines are concerned (good/bad content withstanding).
Content...(pertinent content) is what Google is after. Having a 1M file of valid content will beat a 200k file of sparse/bait-n-switch content every time (well, it's supposed to, right?).
The answer you are looking for: Every Dreamweaver template is a CSS+HTML template. So it depends on the CSS template you are using. For the most part Dreamweaver is pretty bad about writing optimal CSS and it also uses inline styles which is bad for performance.
The real answer: It is obvious you are a beginner and don't know how silly your question is, it is not even one question, and is open ended and has no answer. There is no such thing as a CSS template, CSS by itself is not enough to create a template and this is just a marketing word to use to sell templates to people looking for such a thing as a better alternative to HTML templates, and etc, there is CSS for a certain type of template or certain Document Object Model, so if that is your definition of a CSS template than every Dreamweaver Template is a CSS template, as Dreamweaver itself is not a web technology or language. Dreamweaver is a WYSIWYG/IDE that helps you to write CSS (and other code) without knowledge of CSS, or in my case I use it because I love the pink/purple syntax highlighting it has for CSS in code view.
*Need to know which one gets indexed quicker by google - FTP Upload - linkmanagement *
This has nothing to do with your question, you can create a website in notepad that gets better SEO results. You are mixing all these different concepts together, SEO, CSS, HTML Templates, google indexing,templates, quick uploads, ftp linkups, linkmanagement tools, these are all different concepts and each require years of experience for you to achieve this. At the end of the day what I am trying to tell you is, building a website as you describe is not a few clicks to create a template with dreamweaver. You first need to learn enough to be able to ask the right questions. And then you will be able to create such a website, not the best and ultimate "templates for quick uploads and ftp linkups with linkmanagement tools" but something that works, even though I'm not sure what exactly you are trying to build.
I Think you should look into a CMS like WordPress and get a nice looking wordpress template for your site and eventually become more familiar with these concepts. WordPress has a really good SEO/(google indexing as you say) that it even gets better results than expensive websites built by professionals. This is definitely what you want! trust me!
http://wordpress.org/

How do you organize your plugins and themes code?

I starting working with WordPress as a CMS, now that the V3 makes it way easier to manage taxonomies and custom post types. My work is mostly focused on developing plugins and themes.
My biggest plugin does some admin stuff (add admin menu items and the related pages and features), but also does some importing and exporting, and hooks some of the base post processing treatments ("when a new post is created").
My biggest theme is pretty small, and all it does is display custom posts in a custom way.
After a few weeks of work, I have several thousands of LoC, and it's getting harder and harder to dig into it. Which leads me to the following question: How do you organize your WP plugins code? And what about your WP themes code?
several thousands of LoC
That's pretty epic! I've always found the beauty of WP is that I can, as jQuery put it;
Write less, do more!
You might be much better off using Pods CMS alongside WP to cut down your code.
This is how we structure client deployments that include themes, third-party plugins, and custom code.
wp-content/plugins only contains third-party plugins, no code in here is modified, and the site should not be deadlined by any of these plugins being disabled / removed.
wp-content/themes should contain the code related to presentation of the front-end. The trick is not not overload the theme (functions.php and other theme-related files) with code not directly related to presentation.
mu-plugins/ contains all of your implementation-specific business logic. Things in here should never be disabled, and are required for operations.
That is avery brief summary, but in a nutshell that is the logical compartmentalization of code that we've found to be most failure proof.
Why not to split plugin into several files by function? The same goes to themes. Any problem you have with that?
There are basically three ways you can do this: prefixed functions, with require_once's including files by functionality, which is quite common.
The other "right" way that's touted a lot is having one giant class with all your plugin code in it. While keeping things nice, as you said, once that file gets into the thousands of lines of code, you're screwed for manageability.
The way I like to do it is a way coming from my C# background - have one main plugin class, and other "worker" classes (you can put them in a namespace to keep classnames short). For example, have a class dedicated to the admin section (it can have its own little "subclasses" too, say one for each page). It'll take a while to refactor all this code into the different classes and files, but it'll be worth it - it'll be much easier to keep track of everything, as well as for example getting people to work on the codebase together. It also forces you to think more of how your application all fits in together, which lends to better thought out code.
I'm actually writing an article series about this, outlining the three different methods. You can take a look at the first instalment here. There are two more coming in the following weeks.
Hope I helped!

PreMade Webdesign and Drupal

I'm terribly new to web development. I'm trying to make a pretty simple site with a friend. My friend has taken the time to design the layout for our site, and we have things looking how we want in a static HTML page.
What I'd like to do now is move over to a Content Management System like Drupal but keep the same design that we have all ready laid out.
Since I'm completely new to this field, I'm looking for some best-practices advice as to how to make this leap.
It's apparent to me that I could probably edit some existing Drupal Theme to make it give me the layout that I want, but is that the path I should go down?
Thanks!
Update: Also, is it more than just replacing my style.css with their style.css?
Update 2: The end goal is for people to be able to log in and create news entries, very similar to a blog that will then appear on the front page. There will be other items on the left- and right- but they don't need to be directly accessed by anyone, really. They'll stay pretty static.
The Zen theme is sort of a meta-theme that's designed to be fully standards compliant and make pretty much every aspect of theming readily customizable, with lots of informative commenting. It's the best place to start if you want to develop your own theme. Even if you find a theme that looks a lot like the one you want to create, it's probably still better to start with zen because it's extremely well laid out and instructive. That being said, I've never built a theme from scratch, but it sure looks like a lot of work.
Update
In general the best approach will likely end up being to use your designer's HTML and CSS as a reference, and to edit the Zen-based templates and CSS files to recreate that appearance. It's a bit magical.
You will end up breaking the styles used in your designer's layout into chunks that are part of various template files. The mostly-static stuff on the side columns will become what Drupal calls "blocks"; you'll likely use the top part of the page to refine the HTML for the header section of the main page template; and you'll use the central part to add any necessary tags to the content section of the main page template.
I tend to make liberal use of the Firebug extension for Firefox, or the developer tools built into Chrome. These tools let you quickly locate a given CSS element that you want to change, and edit it to see how the change will look. At first though it's probably better to just read through the whole CSS file to get a feel for how it works. Again, Zen's CSS is very easy to digest.
Pour your heart and soul into the Drupal Theming Guide for the next few days. Theming, like most things, is best done if followed by a gratuitous amount of time in the documentation.
Start with either Zen or Framework themes. They provide good starting points for working with the CSS to adapt to your design.
This helps too:
http://drupal.org/theme-guide
Whatever you do, don't take Garland theme as how a good drupal theme is done. I went down that path when I first started Drupal...

Resources