Multiple editable content on page

EDIT: I've found out that by using Advanced Custom Fields I can edit multiple fields on a page. Why WP doesn't have this feature by default I'll never know. This is the kind of ability I was looking for that PerchCMS has by default. Thanks for your answers. I'm new to writing websites using Wordpress as a CMS, and in the past I've used a CMS called PerchCMS which allows me to add extra multiple sections by using the php …
Topic: cms Wordpress
Category: Web

Wordpress as a CMS - best way to decouple publishing/front-end

For various reasons, this is important, but I am unsure if their are better ways OR other ramifications: CMS = Wordpress as a CMS. WebSite = Static site generator. Currently when a post publishes on CMS I used API to send the info to WebSite which generates the page. All works. However, I don't want the CMS to ALSO publish post. I current handle this by redirecting all traffic to CMS to /wp-admin/ page. This seems not ideal. I would …
Category: Web

How to prevent a post from being deleted?

For auditing issue, I only want a post can be trashed, but not deleted - for all users. So I have a plugin like add_action('before_delete_post', function($id) { wp_die(0); }); But seems not all delete action are ajax, so it will be show a black screen with return an error page with result "0" Feature wise the above code is ok, but are there any better way?
Category: Web

How do I access the contents of Wordpress Classic editor in admin area with JavaScript?

I am working on a small Wordpress plugin which uses JavaScript to add html tags with a css class to the visual text view in the Wordpress editor. I use the Classic Editor. According to Chrome Developer tools, the visual text editor consists of a few div elements, and then an iframe element with the id "content_ifr" which loads a second body element which then contains all html tags pertaining to the post: <body id="tinymce" class="mce-content-body content post-type-post post-status-publish post-format-standard …
Category: Web

Should I use "Categories " or "Pages" for a WordPress Static Site (A non blog site)?

I want to use WordPress for a Company Site which is not a blog; that will have regular pages, such as "About Us", "our Products", "Our Services", etc. What is the best way to use WordPress for this project ? Should I use "Pages" to define individual pages, or Should I use "Categories" to define pages ? I'm planing to use some free WordPress Themes to design/customize and deploy the site, what should I be aware of if I'm to …
Category: Web

Style custom columns in admin panels (especially to adjust column cell widths)

I am using Wordpress as a CMS for a project which makes extensive use of custom post types. I need to display columns in admin panels for each custom post type in a different way. I've already created the necessary columns and populated them. What I need to do is to adjust the CSS a bit. Most importantly I'm trying to tweak the width of certain columns. For example I don't need a column listing the post ID to be …
Category: Web

Get wordpress post with featured image, category and tag from Wordpress API

I have to transfer data from Wordpress website to custom CMS ( I don' t have access to database), and I need to transfer post data (title, excerpt, content) along with featured image link and category (preferably just category ID) if it' s possible using Wordpress API? Thank you! EDIT I need someone who can make query for API e.g. example.com/v2/json/posts=-1&meta_key=all&featured_image=url
Category: Web

Combining fancybox with multiple thumbnail plugin

I'm combining fancybox(jquery) with multiple post thumbnail plugin. Basically the idea is when the user click the featured image post it will display the image on the secondary featured image. Here is the code that i'm working on. <?php query_posts('posts_per_page=-1&cat=10'); if(have_posts()) : while(have_posts()) :the_post(); ?> <div class="collections_thumbnails"> <a class="fancybox" href="<?php MultiPostThumbnails::get_the_post_thumbnail(get_post_type, 'secondary-image'); ?>"><?php if ( has_post_thumbnail()) { $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large'); echo '<img src="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '">'; } ?></a> <div class="hover_dress"> <h3><a class="dress_title" …
Category: Web

Where to put code that customizes API

I am building a native mobile app where I need to display categories of products in different screens, and my client uses Wordpress as their CMS. I see that in order to return images from a gallery, I will need to use get_post_galleries() or get_post_gallery() per the instructions here: How to get the attached gallery in the rest API? My question is, to which file do I add the custom endpoints? So far my CMS is very bare bones so …
Category: Web

How to add Wordpress Featured image in <a> tag ..?

I am trying to add Wordpress featured image in tag. I used these 3 shortcodes. &lt;?php echo $image_large[0]; ?&gt; &lt;?php echo get_the_post_thumbnail(null,'thumbnail');?&gt; &lt;?php echo get_the_post_thumbnail( $page-&gt;ID, 'full' ); ?&gt; Example &lt;a href="&lt;?php echo get_the_post_thumbnail( $page-&gt;ID, 'full' ); ?&gt;" &gt;View Larger&lt;/a&gt; But nothing working. Please help me ...
Category: Web

403 forbidden when changing settings on WP Multisite non-main sites

So I installed a fresh 5.2 WP and set up the Multisite network working with subdomains, then created 2 new test sites. From the outside all works great, I can browse the main site and the 2 test sites properly. On the admin panel though, I can go and change the main site settings tab under network admin -> Sites and it saves properly. When I try to do the same on any of the 2 test sites though I …
Category: Web

How to Create a Learning Management Plugin in Wordpress to Manage Courses [LMS]

I'm looking to build a small learning management plugin to manage courses The first feature that i want to implement is the front-end course builder Meaning that after designing a course page (using it as a default canvas) This course builder will do the following: [Button] -> Create new Course - Add Course title: - Add Course Picture: - Add Sections: - Add Lectures: [Button] -> Publish Course After hitting 'Publish' a course page will be created automatically and added …
Category: Web

How do you create a re-useable HTML fragment in wordpress

Let's say you want all pages to have a common footer, and have that footer editable in WordPress; how would you accomplish this? My current solution is to create a page "footer" and include it using custom template function. But I am wondering if there is a better way to do it, without requiring custom coding. As an example, in the footer of this page you have the text statement "WordPress is a trademark of the WordPress Foundation, registered in …
Category: Web

How can I import users into WordPress?

I have a spreadsheet (XLS) of names, email addresses, and passwords from another content management system. Is there a way to import these folks as users (I think subscriber level, but some may be Editors as well) into WordPress?
Category: Web

How to use filters/params in wordpress as headless cms api

we are using wordpress as a headless cms, using custom post type and advanced custom field plugin, we are entering data in the fields in custom posts, localhost:8888/wordpress/wp-json/wp/v2/places?city=xyz this is working fine but we need to use filters in this url so that we can fetch data as per the required filter(field specific from custom post).
Topic: api cms Wordpress
Category: Web

Can't access Dashboard after WordPress 3.3 Update?

Hi I am having a problem, I updated my wordpress site to version 3.3 and the site itself seems to be working fine except I cant log into the dashboard anymore. When I login using my admin details it keeps re-directing me to /forums/profile page for admin user. Please can anyone help me out or has anyone came across this problem before? Thanks Louise
Topic: cms Wordpress
Category: Web

WordPress for a business catalog site

I am completely noob with WordPress so I apologize in advance if my questions sounds completely stupid. Background I have a small business catalog site that I wrote long ago in plain HTML. Now I want to add some SEO and improve the design therefore I am looking to use a CMS for easy content management. Questions Is WordPress a right choice for my requirements? Is it only for blogging or can be used for any kind of site? (corporate, …
Category: Web

WordPress in Drupal

I got a Drupal site, and I must install WordPress in it. If I install WordPress to "www.mysdrupalsite/wordpress/", will it work as a standard WordPress installation ? THANKS !
Topic: cms Wordpress
Category: Web

Changable favicon

I am looking for help to put single page favicon that would overwrite global one. Say for example I have wordpress website that is example.com and it has favicon set for every page. What I want is for example.com/page3 to have diffrent favicon. I have seen quite a few options around but I cannot figure out how to make it work (my coding skills are limited). This solution: &lt;?php echo '&lt;link rel="shortcut icon" href="http://www.yoursite.com/favicon.ico?t=' . time() . '" /&gt;'; ?&gt; …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.