martinpetrov
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Google SitemapI’m not sure if my question has been already answered, but do you know how to exclude specific Pages from the sitemap (using Google Sitemap 2.7.1 plugin) ?
Thank you in advance!
Forum: Fixing WordPress
In reply to: rich editor for excerpts?do you know a plugin for adding excerpts to pages?
Forum: Fixing WordPress
In reply to: Custom Sitebar per Page – solution?Well it’s stil doesn’t work. The code displays the content of my Home Page.
see https://speakingofresults.com
(the “client” requested to hide the page from the “public” with a passowrd. User and pass are both “123”)I have a static front page (with a plugin) which is actually a Page called Home. This page is loaded in the sidebar ??
I’m afraid I have to abandon my idea for a custom sidebar and your efforts. It seems I have to learn more about WordPress before implementing complicated things…
Forum: Fixing WordPress
In reply to: Custom Sitebar per Page – solution?Kafkaesqui,
I really appreciate your help… especially since it is for free ??A naming scheme “parent-page-name-sidebar” is good. Don’t do it with a same name for each Page if only the first one in the database is hit. The user, even though not competent, will be told where to look for the page slug before creating a sidebar Page (it’s easy enough).
Btw, I really enjoy your web site. The font families and sizes are perfect, and the the color scheme too. It has a unique look and at the same time it gives a professional feeling. I would like to see more sites like yours, but creating new layouts is difficult. I admit I have copied most of the elements on the site I’m building.
Forum: Fixing WordPress
In reply to: Custom Sitebar per Page – solution?Sorry Kafkaesqui, I wasn’ very clear. English is not my first language, and I also started with WordPress a few days ago.
This is the case as you suggested in your last post. However…Now I don’t think I need the name of the current Page. The “slug” is only what is needed, I guess.
Can your plugin include a Page with a name (slug?) “sidebar” which is a subpage of the current? Maybe if it can get the requested url and add “/sidebar/” at the end it will include the desired Page.
And then ,for example the content of my Page named “sidebar” will be included in it’s ancestor page.
Or maybe maelgwn’s code is all what is needed:
<?php include ($_SERVER[REQUEST_URI]'sidebar') ?>
I couldn’t make it work. Does maelgwn’s code look for a Page or a page? ??
Forum: Fixing WordPress
In reply to: Custom Sitebar per Page – solution?Kafkaesqui, is it possible to do what I want if I’m trying to include the content of a Page? I’m confused.
Forum: Fixing WordPress
In reply to: Custom Sitebar per Page – solution?I’m trying to include the content of a Page.
I was thinking, maybe the name of that Page to be included can be just “sidebar” instead of current_page_name + sidebar. And there will php include code sniffing for a subpage called sidebar. Is it possible?
Forum: Fixing WordPress
In reply to: Custom Sitebar per Page – solution?Thanks for the suggestions..It seems I’m dump too though. I thought those WordPress Pages don’t exist for real. They are not real .php pages.
There is a plugin called “Improved Include Page”. With it and the follwing code you can include a wordpress page:
<?php if(function_exists('iinclude_page')) iinclude_page('51'); ?>
. With it I have currently included a sidebar page, but it is static. It’s on the right side( see the url under)I see you know php ?? could you modify the code for the include plugin to look for the name of the current page + some extension? Or it doesn’t work like that?
About the “client”. It is not a real client, I’m not paid. It is an internship and I will get credits for school. It’s my first web site. Take a preview at https://speakingofresults.com/ (under construction…)
Forum: Fixing WordPress
In reply to: Custom Sitebar per Page – solution?I will tell the client to create a new page with the same name as the page where the sidebar will appear + sidebar at the end of that name. For example: there is a page named “contact” and if she wants a sidebar there she will create a new page named “contactsidebar”.
Creating pages in WordPress is really easy.. My whole website is made of static pages listed in the navigation menu (using a single template file).
As I said, I’m looking for a php code that includes pages named after the current page + some extension (contact + sidebar = contactsidebar).
I was astonished to see the “client” doesn’t know how to rename files, or copy them or move…. ??
Forum: Fixing WordPress
In reply to: Custom Sitebar per Page – solution?Hi, thanks for the suggestion…
I could do it the way you say, but as long I understand then I have to manually add these conditions for every different page I want to include. The problem is that I’m building a site for a client who is dump ?? I don’t want to maintain the website for her once it’s done.I could ask the client to wrap the text that she wants to appear in the sidebar with a <div id=”sidebar”></div>, however it is too much for her. And I also noticed the WYSIWYG editor makes some changes with the divs and it breaks the design.
It would be really easy for the client to create a page with a name “currentpage_sidebar” and not to worry about anything.
What do you think?
Forum: Fixing WordPress
In reply to: is_404() real 404 ErrorI also added the 404 header.
Sorry, my I don’t know anything about php, could please check it:
<?php if(is_404()) { header(“HTTP/1.1 404 Not Found”); $Error='[client ‘.$_SERVER[‘REMOTE_ADDR’] .’] File does not exist: /path/to/www-root’.$_SERVER[‘REQUEST_URI’];
if ($_SERVER[‘HTTP_REFERER’]) $Error .=’, referer: ‘.$_SERVER[‘HTTP_REFERER’];
error_log($Error, 0);} ?>